MartialBE / one-hub

OpenAI 接口管理 & 分发系统,改自songquanpeng/one-api。支持更多模型,加入统计页面,完善非openai模型的函数调用。
https://one-hub.xiao5.info/
Apache License 2.0
1.13k stars 229 forks source link

调用 google/gemma-2-9b-it 模型报 422 错误 #324

Closed 80imike closed 1 month ago

80imike commented 2 months ago

调用 nvidia.com 官方的 google/gemma-2-9b-it 模型报 422 错误,这是报错日志

one-api  | 2024/08/06 - 17:26:55    INFO    GIN request {"status": 422, "request_id": "20240806172654824173977Fm2YBeMJ", "method": "POST", "path": "/v1/chat/completions", "query": "", "ip": "1.2.3.4", "user-agent": "sd/JS 4.54.0", "latency": "691.722531ms"}
one-api  | 2024/08/06 - 17:26:55    ERROR   20240806172654824173977Fm2YBeMJ | relay error (channel #36(api.nvidia.com)): Provider API error: bad response status code 422 (request id: 20240806172654824173977Fm2YBeMJ)

测速时,能通过

one-api  | 2024/08/06 - 17:29:39    INFO    [SYS] | 测试渠道 api.nvidia.com : google/gemma-2-27b-it 返回内容为:{"id":"c27086f7-046a-40a8-b50a-370f9e6762b3","object":"","created":null,"model":"","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":19,"completion_tokens":1,"total_tokens":20}}
image

渠道通过自定义渠道配置

image
MartialBE commented 2 months ago

没有使用过 api.nvidia.com, 如果它支持OpenAI API,那么应该是没有问题的