Find answers from the community

Updated 3 months ago

I am facing an issue with llamaindex

I am facing an issue with llamaindex version 0.8.66 when trying to create an embedding with OpenAIEmbedding

I am using the Azure Openai 1.2.2 (client binaries)

-> llamaindex fails with POST https://myname.openai.azure.com/embeddings "HTTP/1.1 404 Resource Not Found"

-> plain binary (from openai import AzureOpenAI) works for POST https://myname.openai.azure.com//openai/deployments/text-embedding-ada-002/embeddings?api-version=2023-05-15 "HTTP/1.1 200 OK"

How can this be fixed?

As you can see the native client does not have this problem
W
g
13 comments
After the recent launch, There were few changes in Azure OpenAI class.

You need to use AzureOpenAIEmbedding for embedding.

More can be found here:https://docs.llamaindex.ai/en/stable/examples/customization/llms/AzureOpenAI.html#azure-openai
I get the same error for AzureOpenAIEmbedding as well
-> AzureOpenAIEmbedding INFO:httpx:HTTP Request: POST https://myname.openai.azure.com//openai/deployments/my-custom-embedding/embeddings?api-version=2023-05-01 "HTTP/1.1 404 Resource Not Found"
but it is using a different URL than the Azure plain native one
as you can see one is using the right and the llamaindex one the wrong deployment
for the native Azure one it works like this
it is also addding my-custom-embedding which the native one does not add and the native one is referencing tetada
some observations
return AzureOpenAIEmbedding(
model="text-embedding-ada-002",
deployment_name="text-embedding-ada-002", <<< is mandatory otherwise an error is raised and python object is rendered - the normal Azure api has this optional
api_key=os.environ["AZURE_OPENAI_KEY"],
azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
#api_version=os.environ["AZURE_OPENAI_API_VERSION"],
api_version="2023-10-01-preview" <<<< this must match like 1 instead of 01
)
Working now with these?
Add a reply
Sign up and join the conversation on Discord