Find answers from the community

Updated 3 months ago

I am getting the error below when I

I am getting the error below when I attempt to conduct semantic chunking with an embedding model where the dimensions parameter is stated.

code

embed_model=OpenAIEmbedding(model="text-embedding-3-large", dimensions=1024)
llm=OpenAI(model="gpt-3.5-turbo", temperature=0, max_tokens=256)
Settings.llm=llm
Settings.embed_model=embed_model

#Semantic chunking strategy
splitter = SemanticSplitterNodeParser(
buffer_size=1,
breakpoint_percentile_threshold=95,
embed_model=Settings.embed_model)

nodes = splitter.get_nodes_from_documents([transcript_doc])
index.insert_nodes(nodes)

------


Error:

packages/llama_index/embeddings/openai/base.py", line 180, in get_embeddings
data = client.embeddings.create(input=list_of_text, model=engine, **kwargs).data
TypeError: create() got an unexpected keyword argument 'dimensions'
W
L
r
3 comments
What is your OpenAI version? I can see dimensions as a argument here πŸ€”
Attachment
image.png
Yea, your openai client version might be out of date
Thanks for pointing this out guys, that was the issue.

After updating openai client it worked πŸ™‚
Add a reply
Sign up and join the conversation on Discord