【求助帖】基于Gradio的公司制度RAG #650

Closed
opened 2025-03-26 18:43:30 +08:00 by 12657936948cs · 1 comment

在代码复现的时候,可以顺利运行,但是在对话框问答时便会报这个错误,response是可以顺利输出是一个生成函数,但是就是会报错,紧接着print('chat_history:',chat_history)就没有输出了,两个print之间报错,我就很懵,感觉还是模型调用回复的问题,不知道是不是API_KEY的问题,因为使用知识库进行问答时,会报错误API_KEY的问题,但是之前在langchain中按照API_KEY和base_url的方式调用是没有问题的,请问是什么原因呀?

在代码复现的时候,可以顺利运行,但是在对话框问答时便会报这个错误,response是可以顺利输出是一个生成函数,但是就是会报错,紧接着print('chat_history:',chat_history)就没有输出了,两个print之间报错,我就很懵,感觉还是模型调用回复的问题,不知道是不是API_KEY的问题,因为使用知识库进行问答时,会报错误API_KEY的问题,但是之前在langchain中按照API_KEY和base_url的方式调用是没有问题的,请问是什么原因呀?
Author

解决了,用print(chat.invoke("请默写鹅鹅鹅").content)测试出来是model_name参数没有传进去

解决了,用print(chat.invoke("请默写鹅鹅鹅").content)测试出来是model_name参数没有传进去
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#650
No description provided.