Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it easier to see output scene #2

Open
kfarr opened this issue Sep 19, 2023 · 15 comments
Open

make it easier to see output scene #2

kfarr opened this issue Sep 19, 2023 · 15 comments
Assignees

Comments

@kfarr
Copy link

kfarr commented Sep 19, 2023

As a user making a text-to-street request via the python console running get_streetmix_json function inside texttostreet.py, when a response is provided I should be able to see the scene output after a few seconds.

ideas:

  1. have an index.html with copy/paste destination clearly marked with comment. copy/paste the json output from the python function console output.
  2. create 3dstreet json that can be downloaded, copy / pasted into a new file, or a new file is created in local filesystem that includes the new street json from open ai response as well as the original prompt in the title field.
@kfarr
Copy link
Author

kfarr commented Sep 21, 2023

ticket for @Algorush but I can't seem to assign this

@Algorush
Copy link

@kfarr hi, what if I create simple flask server with form.html to send user queries to text-to-street.py, that will opened new tab with 3dstreet scene? Is this ok for first version?

@Algorush
Copy link

But I also created index-bot.html for option 1

@kfarr
Copy link
Author

kfarr commented Sep 25, 2023

here is the ideal case for demo purposes:

  1. a request is sent from python command line (done)
  2. the response from chatgpt is shown streaming in console (done, see Algorush@e4303d2)
  3. upon json being received, it opens up a new browser tab with the url of the generated scene -- needs help

I could use help with #3

You mentioned that you already made an index.html that can copy / paste?

Maybe we can use that, and the python command-line script generates a url with the generated JSON passed directly in the URL as URL encoded data such as localhost:7001/index-bot/#streetmix-json:[URI ENCODED STREETMIX JSON HERE]

@kfarr kfarr moved this from To Do - High Prio to In progress in 3DStreet Dev Tracking Sep 25, 2023
@Algorush
Copy link

You mentioned that you already made an index.html that can copy / paste?

Yes, I slightly changed the code of the streetmix-loader component so that I could generate a scene from the ready-made json with streetmix format

@kfarr
Copy link
Author

kfarr commented Sep 25, 2023

@Algorush great could you share that or use it do to the above idea of passing the json directly as URI data?

@Algorush
Copy link

Yes, now I’m doing just this to transmit json as URI data.
I just made a version yesterday with a simple flask server that returns generated json upon request. But it still needs to be checked first, validated before using it to generate a street. Because GPT sometimes returns invalid data in json (for example, the type of buildings that is not in the enum array).
I came up with this option - if the generated segment type or variant is not in the json schema, then use the default value from the schema

@kfarr
Copy link
Author

kfarr commented Sep 25, 2023 via email

@Algorush
Copy link

I found this (how to run function_call with streaming): https://community.openai.com/t/functions-calling-with-streaming/305742

@Algorush
Copy link

Judging by what I read about function_call, it is still better to use them when generating JSON, with them the structure of the model response is more accurate (in accordance with schema)

@kfarr
Copy link
Author

kfarr commented Sep 25, 2023 via email

@Algorush
Copy link

I'll try the streaming option later, okay? Now I have finally achieved that the street opens in a new tab upon request from the flask form

@kfarr
Copy link
Author

kfarr commented Sep 26, 2023

congrats! do you mind checking in and sharing the current state? I could also use the index-bot.html file you mentioned

@Algorush
Copy link

Algorush commented Sep 26, 2023

congrats! do you mind checking in and sharing the current state? I could also use the index-bot.html file you mentioned

Yes, I had created PR with it: #3

@Algorush
Copy link

the server can also accept a user request and send streetmix json. That is, we can also use streetmix-loader (adding some code) to sending a user query as an attribute. This can be helpful for future UI interface for queries

@kfarr kfarr moved this from In progress to For Review in 3DStreet Dev Tracking Sep 27, 2023
@kfarr kfarr moved this from For Review to To Do - Soon in 3DStreet Dev Tracking Oct 5, 2023
@kfarr kfarr moved this from To Do - Soon to Backlog (Not Ready) in 3DStreet Dev Tracking Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants