MiniMax-01 icon indicating copy to clipboard operation
MiniMax-01 copied to clipboard

OpenAI SDK接口调用: Function Calling 的 parameters参数和OpenAI 标准不统一 。导致第三方agent库(如:langchain)调用出错。希望能修复一下。

Open can2apple opened this issue 1 year ago • 5 comments

tools = [ { "type": "function", "function": { "name": "get_weather", "description": "获得天气信息", # "parameters": { # "type": "object", # "properties": { # "location": { # "type": "string", # "description": "要获得天气的地点" # }
# },
# "required":[ # "location" # ] # }

    # parameters参数和 OpenAI 标准有点差异:MiniMax:参数这里接收的是字符串, OpenAI 接收的是对象。
    "parameters":json.dumps({
        "type": "object",
        "properties": { 
            "location": {
                "type": "string",
                "description": "要获得天气的地点"
            }  
        },  
        "required":[
            "location"
        ]
    })
    
  }
}

]

can2apple avatar Jan 26 '25 15:01 can2apple

This is expected. Deepseek v3 has similar issues. You could check ChatMCP or Cline for mitigations.

https://github.com/SecretiveShell/MCP-Bridge/issues/23#issuecomment-2609507094

You can also patch LiteLLM before the officials.

James4Ever0 avatar Jan 27 '25 02:01 James4Ever0

這問題我也遇到 真是麻煩 不知道何時才能解決

r1171125 avatar Jan 28 '25 17:01 r1171125

This is expected. Deepseek v3 has similar issues. You could check ChatMCP or Cline for mitigations.

SecretiveShell/MCP-Bridge#23 (comment)

You can also patch LiteLLM before the officials.

乱说了。Deepseek v3、kimi等用过的大模型,function定义中parameters接收的是object,就是从v3切换到minimax才发现这个问题。

amchii avatar Feb 05 '25 02:02 amchii

感谢反馈,我们正在处理中。 Thank you for your feedback. We are currently addressing the issue.

iamwzt avatar Feb 06 '25 06:02 iamwzt

已解决,请重试。 Resolved, please try again

iamwzt avatar Feb 10 '25 11:02 iamwzt