Find answers from the community

Updated 7 months ago

Pydantic

At a glance

A community member is facing an issue with the 'OpenAIEmbedding' object not having the '__pydantic_private__' attribute when running some code. The comments suggest that the community member should update all the llamaindex packages and create a fresh environment. Another community member asks if there is a way to change the whisper model in SimpleDirectoryReader when loading an MP3 file, and the response is that they can either extend the reader for MP3 and change the model or create a custom reader using the whisper model. One community member mentions that they have just fixed the issue this morning, and another suggests running the command 'pip install -U llama-index-embeddings-openai'.

Useful resources
hi, I'm facing the issue 'OpenAIEmbedding' object has no attribute '__pydantic_private__'
When trying to run this code:
Plain Text
prompt_helper = PromptHelper(max_input_size, num_output, max_chunk_overlap)
llm = OpenAI(temperature=0, model="gpt-4o", timeout=120, max_retries=15)
Settings.llm = llm
Settings.prompt_helper = prompt_helper
documents = SimpleDirectoryReader(id).load_data()
index = VectorStoreIndex.from_documents(documents=documents, Settings=Settings)
W
C
L
5 comments
You'll need to update all the llamaindex packages.
It'd be better if you could create a fresh env.
Thanks, it helps
Another question: is there a way to change the whisper model in SimpleDirectoryReader, when I'm loading an mp3 file?
Yes, You can either extend the reader for MP3 and change the model or you can create a custom reader using the whisper model following this: https://docs.llamaindex.ai/en/stable/module_guides/loading/simpledirectoryreader/?h=simpledirec#extending-to-other-file-types
Yea just fixed this this morning πŸ™
pip install -U llama-index-embeddings-openai
Add a reply
Sign up and join the conversation on Discord