feat: 对 claude api 的基本支持

This commit is contained in:
RockChinQ
2024-03-17 12:44:45 -04:00
parent 550a131685
commit 1dae7bd655
5 changed files with 92 additions and 4 deletions
+15
View File
@@ -29,6 +29,21 @@
{
"model_name": "gemini-pro",
"name": "OneAPI/gemini-pro"
},
{
"name": "claude-3-opus-20240229",
"requester": "anthropic-messages",
"token_mgr": "anthropic"
},
{
"name": "claude-3-sonnet-20240229",
"requester": "anthropic-messages",
"token_mgr": "anthropic"
},
{
"name": "claude-3-haiku-20240307",
"requester": "anthropic-messages",
"token_mgr": "anthropic"
}
]
}
+10
View File
@@ -3,6 +3,9 @@
"keys": {
"openai": [
"sk-1234567890"
],
"anthropic": [
"sk-1234567890"
]
},
"requester": {
@@ -10,6 +13,13 @@
"base-url": "https://api.openai.com/v1",
"args": {},
"timeout": 120
},
"anthropic-messages": {
"base-url": "https://api.anthropic.com/v1",
"args": {
"max_tokens": 1024
},
"timeout": 120
}
},
"model": "gpt-3.5-turbo",