Hi @Logan M
index = VectorStoreIndex.from_documents(
documents, storage_context=storage_context, service_context=service_context
)
This script are returning the following error:
AuthenticationError Traceback (most recent call last)
File /usr/local/lib/python3.11/site-packages/tenacity/__init__.py:382, in Retrying.__call__(self, fn, *args, **kwargs)
381 try:
--> 382 result = fn(*args, **kwargs)
383 except BaseException: # noqa: B902
File /usr/local/lib/python3.11/site-packages/llama_index/embeddings/openai.py:166, in get_embeddings(list_of_text, engine, **kwargs)
164 list_of_text = [text.replace("\n", " ") for text in list_of_text]
--> 166 data = openai.Embedding.create(input=list_of_text, model=engine, **kwargs).data
167 return [d["embedding"] for d in data]
File /usr/local/lib/python3.11/site-packages/openai/api_resources/embedding.py:33, in Embedding.create(cls, *args, **kwargs)
32 try:
---> 33 response = super().create(*args, **kwargs)
35 # If a user specifies base64, we'll just return the encoded string.
36 # This is only for the default case.
File /usr/local/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py:149, in EngineAPIResource.create(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)
127 @classmethod
128 def create(
129 cls,
(...)
136 **params,
137 ):
...
--> 326 raise retry_exc from fut.exception()
328 if self.wait:
329 sleep = self.wait(retry_state)
RetryError: RetryError[]
Do you have any idea? My OpenAI key is setup by
os.environ["OPENAI_API_KEY"]