当前位置:首页 > 编程笔记 > 正文
已解决

langchain +gpt 报错 SSLError

来自网友在路上 158858提问 提问时间:2023-09-27 07:39:41阅读次数: 58

最佳答案 问答题库588位专家为你答疑解惑

解决版本2种

一加入下面代码:
https://www.zhihu.com/question/588395420

import os
os.environ["http_proxy"] = "http://127.0.0.1:7890"
os.environ["https_proxy"] = "http://127.0.0.1:7890"

二降低urllib3版本

urllib3== 1.25.11

错误如下

Retrying langchain.embeddings.openai.embed_with_retry.<locals>._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/embeddings (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))).
查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"langchain +gpt 报错 SSLError":http://eshow365.cn/6-14499-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!