@@ -67,7 +67,7 @@ def num_tokens_from_messages(messages, model): | |||||
elif model in ["gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0613", "gpt-3.5-turbo-0613", | elif model in ["gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0613", "gpt-3.5-turbo-0613", | ||||
"gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-35-turbo-16k", "gpt-4-turbo-preview", | "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-35-turbo-16k", "gpt-4-turbo-preview", | ||||
"gpt-4-1106-preview", const.GPT4_TURBO_PREVIEW, const.GPT4_VISION_PREVIEW, const.GPT4_TURBO_01_25, | "gpt-4-1106-preview", const.GPT4_TURBO_PREVIEW, const.GPT4_VISION_PREVIEW, const.GPT4_TURBO_01_25, | ||||
const.GPT_4o, const.LINKAI_4o, const.LINKAI_4_TURBO]: | |||||
const.GPT_4o, const.GPT_4o_MINI, const.LINKAI_4o, const.LINKAI_4_TURBO]: | |||||
return num_tokens_from_messages(messages, model="gpt-4") | return num_tokens_from_messages(messages, model="gpt-4") | ||||
elif model.startswith("claude-3"): | elif model.startswith("claude-3"): | ||||
return num_tokens_from_messages(messages, model="gpt-3.5-turbo") | return num_tokens_from_messages(messages, model="gpt-3.5-turbo") | ||||
@@ -32,6 +32,7 @@ GPT4_TURBO_11_06 = "gpt-4-1106-preview" | |||||
GPT4_VISION_PREVIEW = "gpt-4-vision-preview" | GPT4_VISION_PREVIEW = "gpt-4-vision-preview" | ||||
GPT4 = "gpt-4" | GPT4 = "gpt-4" | ||||
GPT_4o_MINI = "gpt-4o-mini" | |||||
GPT4_32k = "gpt-4-32k" | GPT4_32k = "gpt-4-32k" | ||||
GPT4_06_13 = "gpt-4-0613" | GPT4_06_13 = "gpt-4-0613" | ||||
GPT4_32k_06_13 = "gpt-4-32k-0613" | GPT4_32k_06_13 = "gpt-4-32k-0613" | ||||
@@ -57,7 +58,7 @@ GEMINI_15_PRO = "gemini-1.5-pro" | |||||
MODEL_LIST = [ | MODEL_LIST = [ | ||||
GPT35, GPT35_0125, GPT35_1106, "gpt-3.5-turbo-16k", | GPT35, GPT35_0125, GPT35_1106, "gpt-3.5-turbo-16k", | ||||
GPT_4o, GPT4_TURBO, GPT4_TURBO_PREVIEW, GPT4_TURBO_01_25, GPT4_TURBO_11_06, GPT4, GPT4_32k, GPT4_06_13, GPT4_32k_06_13, | |||||
GPT_4o, GPT_4o_MINI, GPT4_TURBO, GPT4_TURBO_PREVIEW, GPT4_TURBO_01_25, GPT4_TURBO_11_06, GPT4, GPT4_32k, GPT4_06_13, GPT4_32k_06_13, | |||||
WEN_XIN, WEN_XIN_4, | WEN_XIN, WEN_XIN_4, | ||||
XUNFEI, ZHIPU_AI, MOONSHOT, MiniMax, | XUNFEI, ZHIPU_AI, MOONSHOT, MiniMax, | ||||
GEMINI, GEMINI_PRO, GEMINI_15_flash, GEMINI_15_PRO, | GEMINI, GEMINI_PRO, GEMINI_15_flash, GEMINI_15_PRO, | ||||
@@ -17,7 +17,7 @@ available_setting = { | |||||
"open_ai_api_base": "https://api.openai.com/v1", | "open_ai_api_base": "https://api.openai.com/v1", | ||||
"proxy": "", # openai使用的代理 | "proxy": "", # openai使用的代理 | ||||
# chatgpt模型, 当use_azure_chatgpt为true时,其名称为Azure上model deployment名称 | # chatgpt模型, 当use_azure_chatgpt为true时,其名称为Azure上model deployment名称 | ||||
"model": "gpt-3.5-turbo", # 可选择: gpt-4o, gpt-4-turbo, claude-3-sonnet, wenxin, moonshot, qwen-turbo, xunfei, glm-4, minimax, gemini等模型,全部可选模型详见common/const.py文件 | |||||
"model": "gpt-3.5-turbo", # 可选择: gpt-4o, pt-4o-mini, gpt-4-turbo, claude-3-sonnet, wenxin, moonshot, qwen-turbo, xunfei, glm-4, minimax, gemini等模型,全部可选模型详见common/const.py文件 | |||||
"bot_type": "", # 可选配置,使用兼容openai格式的三方服务时候,需填"chatGPT"。bot具体名称详见common/const.py文件列出的bot_type,如不填根据model名称判断, | "bot_type": "", # 可选配置,使用兼容openai格式的三方服务时候,需填"chatGPT"。bot具体名称详见common/const.py文件列出的bot_type,如不填根据model名称判断, | ||||
"use_azure_chatgpt": False, # 是否使用azure的chatgpt | "use_azure_chatgpt": False, # 是否使用azure的chatgpt | ||||
"azure_deployment_id": "", # azure 模型部署名称 | "azure_deployment_id": "", # azure 模型部署名称 | ||||