gd3kr / BlenderGPT

Use commands in English to control Blender with OpenAI's GPT-4
MIT License
4.39k stars 314 forks source link

"Failed to generate Blender Python code" #2

Closed Shraknard closed 1 year ago

Shraknard commented 1 year ago

Couldn't make it works. After adding the API_KEY, I get a "Failed to generate Blender Python code" right after clicking the Execute button.

Capture

gd3kr commented 1 year ago

Huh. Can you check if the latest release solves the issue? I updated the UI to include a field for the key in the addon preferences

Shraknard commented 1 year ago

Nope, exact same error as before. I'm running the latest blender version, added the API key in the filed but still got the "Failed to generate Blender Python code".

actualactual commented 1 year ago

Seems I'm stuck with the same issue, was about to pop in here and mention the same thing

gd3kr commented 1 year ago

Huh, super weird. I tested with Blender 3.3, and assumed 3.4 would be fine. I'm investigating if it's a 3.4 issue right now. In the meantime, could you check if it works for an earlier version?

gd3kr commented 1 year ago

Just checked, works fine on 3.4 as well. Could you paste the stack trace when the error is shown? image

actualactual commented 1 year ago

Here's the console error: Warning: 1 x Draw window and swap: 7.0847 ms, average: 7.08470005 ms INFO:openai:error_code=model_not_found error_message='The model:gpt-4does not exist' error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False

gd3kr commented 1 year ago

Fixed in the latest release (1 minute ago). It was an issue with GPT-3.5 not being used when the API key does not have access to GPT-4 https://github.com/gd3kr/BlenderGPT/releases/tag/v1.0.2

Shraknard commented 1 year ago

Great, it seems to work well now, thanks!