错误log:
from llm import get_index_by_index_name File "/Users/axzq/code/python/ChatFiles/chatfiles/llm.py", line 18, in <module> service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/indices/service_context.py", line 71, in from_defaults embed_model = embed_model or OpenAIEmbedding() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/embeddings/openai.py", line 209, in __init__ super().__init__(**kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/embeddings/base.py", line 55, in __init__ self._tokenizer: Callable = globals_helper.tokenizer File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/utils.py", line 38, in tokenizer enc = tiktoken.get_encoding("gpt2") File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tiktoken/registry.py", line 63, in get_encoding enc = Encoding(**constructor()) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tiktoken_ext/openai_public.py", line 11, in gpt2 mergeable_ranks = data_gym_to_mergeable_bpe_ranks( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tiktoken/load.py", line 90, in data_gym_to_mergeable_bpe_ranks encoder_json = json.loads(read_file_cached(encoder_json_file)) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tiktoken/load.py", line 46, in read_file_cached contents = read_file(blobpath) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tiktoken/load.py", line 24, in read_file return requests.get(blobpath).content File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/adapters.py", line 563, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/encoder.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')))