加入符合oneapi项目接口的国内模型

oneapi是一个api整合项目,通过这个项目的反代理,可以像使用gpt系列的/v1/completion接口一样调用国内的大模型,仅仅需要更改一下模型名字
This commit is contained in:
Shi Zhenning
2023-08-22 12:38:37 +08:00
committed by RockChinQ
parent 91ebaf1122
commit 1a73669df8

View File

@@ -32,7 +32,15 @@ CHAT_COMPLETION_MODELS = {
'gpt-4',
'gpt-4-0613',
'gpt-4-32k',
'gpt-4-32k-0613'
'gpt-4-32k-0613',
'SparkDesk',
'chatglm_pro',
'chatglm_std',
'chatglm_lite',
'qwen-v1',
'qwen-plus-v1',
'ERNIE-Bot',
'ERNIE-Bot-turbo',
}
EDIT_MODELS = {
@@ -66,6 +74,14 @@ def count_chat_completion_tokens(messages: list, model: str) -> int:
"gpt-4-32k-0314",
"gpt-4-0613",
"gpt-4-32k-0613",
"SparkDesk",
"chatglm_pro",
"chatglm_std",
"chatglm_lite",
"qwen-v1",
"qwen-plus-v1",
"ERNIE-Bot",
"ERNIE-Bot-turbo",
}:
tokens_per_message = 3
tokens_per_name = 1