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
17.97k stars 4.07k forks source link

Add Support to Claude 3 #1080

Closed JamesFlare1212 closed 6 months ago

JamesFlare1212 commented 6 months ago

例行检查

功能描述

支持Claude 3系列API,https://twitter.com/AnthropicAI/status/1764653830468428150

文档已经释出,似乎格式有所变动,此外Claude 3支持Vision功能。如果需要API调试我乐意提供

lqhl commented 6 months ago

同求。

claude 3 只支持 antropic 的 message API,而 one-api 用的是 text completion API: https://docs.anthropic.com/claude/reference/migrating-from-text-completions-to-messages

Caixiaopig commented 6 months ago

+1 claude出了三个版本的模型,价格费率也都不同 https://docs.anthropic.com/claude/docs/models-overview#model-comparison

ImYrS commented 6 months ago

提供一些信息供开发者和贡献者参考:

[!TIP] 贡献者需要 Claude API Key 用于临时调试可联系我

ahkimkoo commented 6 months ago

+1 期待

asakuras commented 6 months ago

同求😊

deepziyu commented 6 months ago

目前通过 text completion API 调用 claude3模板报错如下:

{
    "error": {
        "message": "\"claude-3-sonnet-20240229\" is not supported on this API. Please use the Messages API instead. (request id: 20240305140****************)",
        "type": "invalid_request_error",
        "param": "",
        "code": null
    }
}
TangSY commented 6 months ago

+1

zwluoqi commented 6 months ago

急急急,找我拿APIKEY;然后谁顺便把那个自动封禁渠道的功能实现了吧;目前只能对openai的渠道有效。

songquanpeng commented 6 months ago

预期周末处理

songquanpeng commented 6 months ago

已经支持

ZhangTianrong commented 6 months ago

已经支持

v0.6.1 支持吗?测试似乎还是

API Error: Status Code 400, {"error":{"message":"\"claude-3-sonnet-20240229\" is not supported on this API. Please use the Messages API instead. (request id: 2024030821332639501441300310184)","type":"invalid_request_error","param":"","code":null}}
hondaya06 commented 6 months ago
iShot_2024-03-09_16 10 44 iShot_2024-03-09_16 11 26

自定义sonnet模型还是不行呀

ImYrS commented 6 months ago

自定义sonnet模型还是不行呀

更新到 v0.6.2-alpha.1 即可

hondaya06 commented 6 months ago

自定义sonnet模型还是不行呀

更新到 v0.6.2-alpha.1 即可

好用了