Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么我的模型列表仅支持九个模型? #2110

Open
RoadtoAGI opened this issue Jan 10, 2025 · 2 comments
Open

为什么我的模型列表仅支持九个模型? #2110

RoadtoAGI opened this issue Jan 10, 2025 · 2 comments

Comments

@RoadtoAGI
Copy link

AVAIL_LLM_MODELS = ["qwen-max", "o1-mini", "o1-mini-2024-09-12", "o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12",
"gpt-4-1106-preview", "gpt-4-turbo-preview", "gpt-4-vision-preview",
"gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-4-turbo-2024-04-09",
"gpt-3.5-turbo-1106", "gpt-3.5-turbo-16k", "gpt-3.5-turbo", "azure-gpt-3.5",
"gpt-4", "gpt-4-32k", "azure-gpt-4", "glm-4", "glm-4v", "glm-3-turbo",
"gemini-1.5-pro", "chatglm3", "chatglm4", "deepseek-chat"
]

with gr.Tab("更换模型", elem_id="interact-panel"):
print(f"可用模型数量: {len(AVAIL_LLM_MODELS)}")
print(f"模型列表: {AVAIL_LLM_MODELS}")
md_dropdown = gr.Dropdown(AVAIL_LLM_MODELS, value=LLM_MODEL, elem_id="elem_model_sel", label="更换LLM模型/请求源").style(container=False)

输出结果:
可用模型数量: 9
模型列表: ['gpt-3.5-turbo', 'api2d-gpt-3.5-turbo', 'gpt-4', 'api2d-gpt-4', 'chatglm', 'moss', 'newbing', 'newbing-free', 'stack-claude']
QQ20250111-010605

@RoadtoAGI
Copy link
Author

debug显示:执行到 CHATBOT_HEIGHT, LAYOUT, AVAIL_LLM_MODELS, AUTO_CLEAR_TXT = get_conf('CHATBOT_HEIGHT', 'LAYOUT', 'AVAIL_LLM_MODELS', 'AUTO_CLEAR_TXT')
重新定义了AVAIL_LLM_MODELS,且默认值为['gpt-3.5-turbo', 'api2d-gpt-3.5-turbo', 'gpt-4', 'api2d-gpt-4', 'chatglm', 'moss', 'newbing', 'newbing-free', 'stack-claude']

@SakuraPuare
Copy link
Contributor

盲猜一手你设置了环境变量或者创建了诸如config_private.py等文件

读取优先级:环境变量 > config_private.py > config.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants