zuisong / gemini-openai-proxy

OpenAI to Google Gemini https://gemini-openai-proxy.deno.dev
https://gemini-openai-proxy.zuisong.workers.dev
MIT License
317 stars 89 forks source link

Error: [400 Bad Request] Invalid JSON payload received. Unknown name "$schema" #67

Closed StevenTruong89 closed 2 months ago

StevenTruong89 commented 3 months ago

Hi zuizong,

I'm facing below issue, you please help me to take a look if have free time. Thank you so much

2024-08-06T10:03:58.433Z WARN 2adc933d-95c5-4fd6-bc2c-53223dd551d3 <-- POST http://10.20.95.28:8000/v1/chat/completions Error: [400 Bad Request] Invalid JSON payload received. Unknown name "$schema" at 'tools[0].function_declarations[0].parameters': Cannot find field. Invalid JSON payload received. Unknown name "additionalProperties" at 'tools[0].function_declarations[0].parameters': Cannot find field. Invalid JSON payload received. Unknown name "$schema" at 'tools[0].function_declarations[1].parameters': Cannot find field. Invalid JSON payload received. Unknown name "additionalProperties" at 'tools[0].function_declarations[1].parameters': Cannot find field. Invalid JSON payload received. Unknown name "$schema" at 'tools[0].function_declarations[2].parameters': Cannot find field. Invalid JSON payload received. Unknown name "additionalProperties" at 'tools[0].function_declarations[2].parameters': Cannot find field. [{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"tools[0].function_declarations[0].parameters","description":"Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[0].parameters': Cannot find field."},{"field":"tools[0].function_declarations[0].parameters","description":"Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[0].parameters': Cannot find field."},{"field":"tools[0].function_declarations[1].parameters","description":"Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[1].parameters': Cannot find field."},{"field":"tools[0].function_declarations[1].parameters","description":"Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[1].parameters': Cannot find field."},{"field":"tools[0].function_declarations[2].parameters","description":"Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[2].parameters': Cannot find field."},{"field":"tools[0].function_declarations[2].parameters","description":"Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[2].parameters': Cannot find field."}]}] at makeRequest (file:///data/app.mjs:490:13) at eventLoopTick (ext:core/01_core.js:168:7) at async generateContent (file:///data/app.mjs:456:20) at async streamingChatProxyHandler (file:///data/app.mjs:596:22) at async file:///data/app.mjs:654:24 at async Object.pull (file:///data/app.mjs:667:31)

StevenTruong89 commented 3 months ago

image

I'm using docker for desktop

zuisong commented 3 months ago

It will be better if you can provide your request body😃