GaiZhenbiao / ChuanhuChatGPT

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.
https://huggingface.co/spaces/JohnSmith9982/ChuanhuChatGPT
GNU General Public License v3.0
15.07k stars 2.28k forks source link

[Bug]: BaseLLMModel.init() got an unexpected keyword argument 'api_key' #1121

Closed vc12345679 closed 2 months ago

vc12345679 commented 2 months ago

这个bug是否已存在现有issue了?

错误表现

Groq 模型不能正常工作,选择Groq相关模型后显示Error,后台报 BaseLLMModel.init() got an unexpected keyword argument 'api_key'

复现操作

选择Groq相关模型后显示Error

错误日志

No response

运行环境

帮助解决

补充说明

确认为 groq.py/Groq_Client 的 init 函数中 call 父类 (BaseLLMModel) init 函数时参数传递格式有误 https://github.com/GaiZhenbiao/ChuanhuChatGPT/blob/7aee8f287dcfc72cd2908255d6b23556c620b7d1/modules/models/Groq.py#L21

已提交 PR #1122, 修复后使用正常

参考其它模型(GoogleGemini)init 定义 https://github.com/GaiZhenbiao/ChuanhuChatGPT/blob/7aee8f287dcfc72cd2908255d6b23556c620b7d1/modules/models/GoogleGemini.py#L20