You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a Pydantic model for my output field type hint. in the model, one of the fields is a string. The LLM returns the correctly formatted json string, but it sometimes puts quotes inside the string. For example, if the field is: "reason":"the man is having "fun"", the quotes around fun is causing the JSONDecodeError in the parse_value function of the adapter. Any solutions? I am using gemini-1.5-flash-002.
The text was updated successfully, but these errors were encountered:
Update: I went to the json_adapter parse_value, and switched the json.loads(value) to json_repair.loads(value). it fixed the quotations. Could this be updated in the next release?
I am using a Pydantic model for my output field type hint. in the model, one of the fields is a string. The LLM returns the correctly formatted json string, but it sometimes puts quotes inside the string. For example, if the field is: "reason":"the man is having "fun"", the quotes around fun is causing the JSONDecodeError in the parse_value function of the adapter. Any solutions? I am using gemini-1.5-flash-002.
The text was updated successfully, but these errors were encountered: