#AttributeError: 'str' object has no attribute 'get'

3 messages · Page 1 of 1 (latest)

humble folio
#

Morning all!

Running into an error running Autogen with LM Studio - mistral instruct 7b q4 and q5.

Python terminal says: File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 765, in _interpret_response_line
raise self.handle_error_response(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/openai/api_requestor.py", line 418, in handle_error_response
error_code=error_data.get("code"),
AttributeError: 'str' object has no attribute 'get'

LMStudio says:
}
[2023-11-13 12:55:30.087] [ERROR] Error: 'messages' array must only contain objects with a 'content' field that is not empty.

Any ideas or suggestions would be super appreciated!

tacit gorge
#

I believe the openai APIs being used to access the model is sending an error in a different format than expected. in the openai/api_requestor.py try printing the actual error being raised or use breakpoints.

humble folio
#

@tacit gorge ty I'll try tonight!