zhu327 / gemini-openai-proxy

A proxy for converting the OpenAI API protocol to the Google Gemini Pro protocol.
MIT License
554 stars 101 forks source link

ERROR: {"code":400,"message":"message.multiContent: json.Unmarshal: json: cannot unmarshal string into Go value of type []openai.ChatMessagePart","type":""} #32

Closed jarlin8 closed 4 months ago

jarlin8 commented 4 months ago

docker run --restart=always -it -d -p 8080:8080 --name gemini \ -e GPT_4_VISION_PREVIEW=gemini-1.5-pro-latest \ zhu327/gemini-openai-proxy:latest

报错。

zhu327 commented 4 months ago

https://github.com/zhu327/gemini-openai-proxy?tab=readme-ov-file#usage

It seems that the error is caused by the data you passed in. If you are using the version format, you need to fill in the array in the content, not the string. For specific usage of the version api, please refer to the openai api documentation