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

Update mode list #2046

Merged
merged 6 commits into from
Jun 20, 2024
Merged

Update mode list #2046

merged 6 commits into from
Jun 20, 2024

Conversation

6vision
Copy link
Collaborator

@6vision 6vision commented Jun 4, 2024

No description provided.

@Saboteur7
Copy link
Collaborator

Thanks for your pr~

@Saboteur7 Saboteur7 merged commit 6d972c7 into zhayujie:master Jun 20, 2024
@6vision
Copy link
Collaborator Author

6vision commented Jun 20, 2024

很多提供三方api服务的都兼容openai格式(模型除了chatgpt外,还有claude,Gemini等),现有代码会根据model参数来选择对应的bot,特增加bot_type参数,指定使用的bot类型,可以解决使用第三方api key时候不能使用除chatgpt以外模型的问题 #2067 #2063 #2055
部分配置如下:
{
"open_ai_api_key": "sk-2c23a6cf8d2a2b677275d38c", # 三方服务的key
"bot_type": "chatGPT", # 兼容openai请求格式时候,保持不变,
"model": "claude-opus", # 依三方服务商提供的模型名字为准
"open_ai_api_base": "https://api.dxxxxxxh.com/v1", # 三方服务api 地址
}

@6vision
Copy link
Collaborator Author

6vision commented Jun 20, 2024

此外,对于程序中没有写明,但现有逻辑可以支持的model也可以利用"bot_type"参数来指定,比如智普的模型,程序中只写了glm-4,但智谱的其他模型也可以使用

配置如下:
{
"bot_type": "glm-4",
"model": "glm-4-flash",
"zhipu_ai_api_key": "efd1f61b8a92e.PgCqQPUm14OEchWP",
"zhipu_ai_api_base": "https://open.bigmodel.cn/api/paas/v4",
}

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

Successfully merging this pull request may close these issues.

2 participants