mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-15 06:50:58 +00:00
feat: 通过 one-api 支持google gemini
This commit is contained in:
@@ -49,6 +49,7 @@ CHAT_COMPLETION_MODELS = {
|
|||||||
"qwen-plus-v1",
|
"qwen-plus-v1",
|
||||||
"ERNIE-Bot",
|
"ERNIE-Bot",
|
||||||
"ERNIE-Bot-turbo",
|
"ERNIE-Bot-turbo",
|
||||||
|
"gemini-pro",
|
||||||
}
|
}
|
||||||
|
|
||||||
EDIT_MODELS = {
|
EDIT_MODELS = {
|
||||||
@@ -90,6 +91,7 @@ def count_chat_completion_tokens(messages: list, model: str) -> int:
|
|||||||
"qwen-plus-v1",
|
"qwen-plus-v1",
|
||||||
"ERNIE-Bot",
|
"ERNIE-Bot",
|
||||||
"ERNIE-Bot-turbo",
|
"ERNIE-Bot-turbo",
|
||||||
|
"gemini-pro",
|
||||||
}:
|
}:
|
||||||
tokens_per_message = 3
|
tokens_per_message = 3
|
||||||
tokens_per_name = 1
|
tokens_per_name = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user