在调用openAI里面的api接口的时候报错:HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1133)')))
目前解决的方式如下:
- 在本地计算机上下载此文件
- 将其重命名为
9b5ad71b2ce5302211f9c61530b329a4922fc6a4(后缀也要修改掉)
- 传输到远程计算机的名为 “tiktoken_cache” 的文件夹中
- 每次需要使用 tiktoken 时,都运行以下代码
tiktoken_cache_dir = "/share/home/huangjinxin/RagLoinc/langchain_ollama/tiktoken_cache"
os.environ["TIKTOKEN_CACHE_DIR"] = tiktoken_cache_dir
# validate
assert os.path.exists(os.path.join(tiktoken_cache_dir,"9b5ad71b2ce5302211f9c61530b329a4922fc6a4&#