Open LuciAkirami opened 1 month ago
Taking a look!
Please!
Also interested in this.
Do we have an answer yet?
Really sorry about the delay on this. Will have an update by the next of next week at the latest
A PR for Gemini using Google AI studio is out. Everyone is welcome to test: https://github.com/phidatahq/phidata/pull/1044
gemini-1.5-pro returns JSON with control characters; should deal with this in a way that's similar to Anthropic models by being less strict in JSON parsing:
WARNING Failed to validate response: 1 validation error for ExplainAnswer Invalid JSON: control character (\u0000-\u001F) found while parsing a string at line 4 column 0 [type=json_invalid, input_value='{\n "answer": "C",\n "..."string"\n }\n }\n}', input_type=str]
@sigren can you please share the steps to recreate this warning?
@ysolanky my particular example is very complicated with tool use, RAG and chain of thoughts. Quite often structured (JSON) response from models by Anthropic and Gemini contain control characters. This issue was fixed in "instructor" library by parsing JSON string in non-strict mode.
I wish to use the Gemini model through the free API Key provided by the Google AI Studio. But I could not find a way to do so in phidata. The existing Gemini Integration requires me go through the GCP Vertex AI process. So is there such a way, where I could work with Gemini with the free API key in the existing phidata library?