Hi, guys! I'm trying to use Ai Gateway to cache requests for Gemini using Google Ai Studio but maybe

Hi, guys! I'm trying to use Ai Gateway to cache requests for Gemini using Google Ai Studio but maybe i am doing something wrong :/ I am getting some errors regarding the system_instruction and generationConfig parameters The same request works by using the direct endpoint on google https://generativelanguage.googleapis.com/v1beta/models/
400 Bad Request: "{<EOL> "error": {<EOL> "code": 400,<EOL> "message": "Invalid JSON payload received. Unknown name \"system_instruction\": Cannot find field.\nInvalid JSON payload received. Unknown name \"response_mime_type\" at 'generation_config': Cannot find field.",<EOL> "status": "INVALID_ARGUMENT",<EOL> "details": [<EOL> {<EOL> "@type": "type.googleapis.com/google.rpc.BadRequest",<EOL> "fieldViolations": [<EOL> {<EOL> "description": "Invalid JSON payload received. Unknown name \"system_instruction\": Cannot find field."<EOL> },<EOL> {<EOL> "field": "generation_config",<EOL> "description": "Invalid JSON payload received. Unknown name \"response_mime_type\" at 'generation_config': Cannot find field."<EOL> }<EOL> ]<EOL> }<EOL> ]<EOL> }<EOL>}<EOL>"
400 Bad Request: "{<EOL> "error": {<EOL> "code": 400,<EOL> "message": "Invalid JSON payload received. Unknown name \"system_instruction\": Cannot find field.\nInvalid JSON payload received. Unknown name \"response_mime_type\" at 'generation_config': Cannot find field.",<EOL> "status": "INVALID_ARGUMENT",<EOL> "details": [<EOL> {<EOL> "@type": "type.googleapis.com/google.rpc.BadRequest",<EOL> "fieldViolations": [<EOL> {<EOL> "description": "Invalid JSON payload received. Unknown name \"system_instruction\": Cannot find field."<EOL> },<EOL> {<EOL> "field": "generation_config",<EOL> "description": "Invalid JSON payload received. Unknown name \"response_mime_type\" at 'generation_config': Cannot find field."<EOL> }<EOL> ]<EOL> }<EOL> ]<EOL> }<EOL>}<EOL>"
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?