请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

langchain调阿里千问报错

openai是0.27.8,langchain是0.0.288
用openai的api调阿里千问的模型,没有问题,
但是用langchain的api调千问的模型,就报错,

报错信息:
Retrying langchain.llms.openai.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host=‘dashscope.aliyuncs.com’, port=443): Max retries exceeded with url: /compatible-mode/v1/completions (Caused by ProxyError(‘Unable to connect to proxy’, OSError(‘Tunnel connection failed: 404 Not Found’))).

正在回答 回答被采纳积分+3

1回答

tomiezhang 2024-11-04 21:58:20

没看到你的代码,只看报错信息的话,应该是调用的API不存在,可以参考最新的演示代码:

https://git.imooc.com/coding-822/kecheng/src/main/32.ipynb


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号