abi / screenshot-to-code

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Home Page:https://screenshottocode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why result code is empty?

it-tin opened this issue · comments

why result code is empty

the front websocket result : {"type":"status","value":"Code generation complete."}
image

and llm.py :
stream = await client.chat.completions.create(**params)
messages_20240409_142906.json

image

All the pictures are like this,completion is empty,I am using a proxy URL

Solved, we need to add v1 after the proxy URL, for example: https://xxx.xxxxx.xxx/v1

I am running on localhost with docker. I have the same issue, it seems from the log, some code is generated, while from the UI which is http://localhost:5173/ nothing shows up. what do you mean by "we need to add v1 after the proxy URL, for example: https://xxx.xxxxx.xxx/v1" do you mean I should access from http://localhost:5173/v1 ? thx

the logs shows the code is generated:
Screenshot 2024-06-22 at 11 52 44

@tianerphil your logs image upload didn't seem to work. Can you share your backend and front-end logs? Please open a new issue so I can help you out.

The proxy is for the connection to OpenAI, not for this backend. The proxy URL needs to be specified in the front-end settings.
Screenshot 2024-06-23 at 5 46 17 PM