Find answers from the community

Home
Members
Prasuna
P
Prasuna
Offline, last seen 2 weeks ago
Joined January 22, 2025
This is one example where the code runs successfully at first, but when I run it again after some time in the same virtual environment, the following error occurs:

ERROR:
20
21 # Create embedding model
---> 22 embed_model = OpenAIEmbedding(
23 model="text-embedding-ada-002",
24 # api_key=openai.api_key,
25 # Explicitly specify dimensions
26 )
29 encoded_password = quote_plus(password)

File ~/pgvector/venv/lib/python3.8/site-packages/llama_index/embeddings/openai/base.py:315, in OpenAIEmbedding.init(self, mode, model, embed_batch_size, dimensions, additional_kwargs, api_key, api_base, api_version, max_retries, timeout, reuse_client, callback_manager, default_headers, http_client, async_http_client, num_workers, **kwargs)
307 additional_kwargs["dimensions"] = dimensions
309 api_key, api_base, api_version = self._resolve_credentials(
310 api_key=api_key,
311 api_base=api_base,
312 api_version=api_version,
313 )
--> 315 self._query_engine = get_engine(mode, model, _QUERY_MODE_MODEL_DICT)
316 self._text_engine = get_engine(mode, model, _TEXT_MODE_MODEL_DICT)
...
889 else:
890 # this is the current error
891 raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')

AttributeError: pydantic_private.


can you please help me with, these are the versions that I have been using :

Name: llama-index
Version: 0.10.17
Name: pydantic
Version: 2.10.5
Name: openai
Version: 1.51.2
Name: llama-index-core
Version: 0.11.23
Name: llama-index-vector-stores-supabase
Version: 0.2.0
Name: SQLAlchemy
Version: 2.0.36
python version :3.8.12