Find answers from the community

Updated 6 months ago

I am facing an issue with llamaindex

At a glance

The community member is facing an issue with the llamaindex version 0.8.66 when trying to create an embedding with OpenAIEmbedding using the Azure OpenAI 1.2.2 client binaries. The llamaindex fails with a 404 error, while the plain binary (from openai import AzureOpenAI) works correctly.

The community members discuss the issue and provide some observations and potential solutions. They note that there were changes in the Azure OpenAI class, and the community member should use AzureOpenAIEmbedding instead. However, the community member still encounters the same 404 error with AzureOpenAIEmbedding.

The community members suggest that the issue might be related to the URL used by AzureOpenAIEmbedding, which is different from the URL used by the native Azure client. They provide examples of the URLs used by both and suggest that the AzureOpenAIEmbedding URL might be missing a forward slash before "openai".

Finally, the community members

Useful resources
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