songquanpeng / one-api

OpenAI 接口管理 & 分发系统,支持 Azure、Anthropic Claude、Google PaLM 2 & Gemini、智谱 ChatGLM、百度文心一言、讯飞星火认知、阿里通义千问、360 智脑以及腾讯混元,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用. OpenAI key management & redistribution system, using a single API for all LLMs, and features an English UI.
https://openai.justsong.cn/
MIT License
18.22k stars 4.12k forks source link

cannot unmarshal object into Go struct field ChatCompletion.tool_choice of type string #1461

Closed bincooo closed 4 months ago

bincooo commented 4 months ago

例行检查

问题描述

{
    "error": {
        "message": "json: cannot unmarshal object into Go struct field ChatCompletion.tool_choice of type string"
    }
} 

https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice

复现步骤

预期结果

相关截图 如果没有的话,请删除此节。