chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.45k stars 5.48k forks source link

[BUG] 使用qianfan-api的时候出现KeyError: Caught exception: 'choices' #1771

Closed wangzuohao closed 11 months ago

wangzuohao commented 11 months ago

我们使用的最新的代码,在使用qianfan-api的时候,每次都是第一次chat都没有问题,但是再次问问题的时候就出现这个错误: 2023-10-17 06:40:01 | INFO | httpx | HTTP Request: POST https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant?access_token=24.2b7f5908fbedd12c26a04c806f783615.2592000.1700116788.282335-41157039 "HTTP/1.1 200 OK" 2023-10-17 06:40:01 | ERROR | root | KeyError: Caught exception: 'choices'

在其他模型都没有出现这个错误,包含chaglm2-6b, baichuan2-13b, zhipu, xinghuo

hcxss commented 11 months ago

我也是chaglm2-6b-32k

lzy83925 commented 11 months ago

好像在调用web-api的时候都会出现这个问题

hcxss commented 11 months ago

我换成chatglm2-6b就OK了

---原始邮件--- 发件人: "Luis @.> 发送时间: 2023年10月17日(周二) 下午5:36 收件人: @.>; 抄送: "Changxiu @.**@.>; 主题: Re: [chatchat-space/Langchain-Chatchat] [BUG] 使用qianfan-api的时候出现KeyError: Caught exception: 'choices' (Issue #1771)

好像在调用web-api的时候都会出现这个问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

hcxss commented 11 months ago

32k的多卡跑就崩了

---原始邮件--- 发件人: "Luis @.> 发送时间: 2023年10月17日(周二) 下午5:36 收件人: @.>; 抄送: "Changxiu @.**@.>; 主题: Re: [chatchat-space/Langchain-Chatchat] [BUG] 使用qianfan-api的时候出现KeyError: Caught exception: 'choices' (Issue #1771)

好像在调用web-api的时候都会出现这个问题

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

gagakou commented 11 months ago

我用chatglm2-6b-32k也会报这个错,但是baichuan2-13b就不会报

ArlanCooper commented 11 months ago

我使用zhipu-api不会报这个错,但是使用qianfan-api,会报这个错误:

{'timeout': 300.0, 'proxies': {'all://127.0.0.1': None, 'all://localhost': None, 'http://127.0.0.1': None, 'http://': None, 'https://': None, 'all://':
None, 'http://localhost': None}}
2023-10-19 17:26:18 | INFO | httpx | HTTP Request: POST https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/https://aip.baidubce.com/rpc/2
.0/ai_custom/v1/wenxinworkshop/chat/completions_pro?access_token=24.7744d884d90233c3732f71f5cf6eef07.2592000.1700299577.282335-41365822 "HTTP/1.1 200 OK
"
2023-10-19 17:26:18 | ERROR | root | KeyError: Caught exception: 'choices'
zRzRzRzRzRzRzR commented 11 months ago

0.2.6版本已经修复,目前dev应该没有这个问题

lpaging commented 11 months ago

0.26版本,Qwen-14B-Chat-Int4还是有这个问题,chatglm2-6b、Qwen-7B-Chat都没有问题 utils.py[line:26] - ERROR: KeyError: Caught exception: 'choices'

liamlincs commented 11 months ago

chatglm2-6b-int4也一样