azure-search-vector-samples icon indicating copy to clipboard operation
azure-search-vector-samples copied to clipboard

Small bug: model_name instead of deployment_name in AzureOpenAIEmbeddingSkill object creation

Open matteomarjanovic opened this issue 1 year ago • 7 comments

When creating the AzureOpenAIEmbeddingSkill instance in azure-search-integrated-vectorization-sample.ipynb, the model variable containing "text-embedding-ada-002" model name is used as input for deployment_id field, instead of the actual name of the model deployment.

https://github.com/Azure/azure-search-vector-samples/blob/692e2e38d5c29af8790b8280298a1e1f433730d9/demo-python/code/azure-search-integrated-vectorization-sample.ipynb#L301

I think it should be changed to deployment_id=os.getenv("AZURE_OPENAI_EMBEDDING_DEPLOYED_MODEL").

matteomarjanovic avatar Jan 10 '24 12:01 matteomarjanovic

Also, in Search Index creation, when assigning an AzureOpenAIVectorizer, there must be the same fix (deployment_id=os.getenv("AZURE_OPENAI_EMBEDDING_DEPLOYED_MODEL")). Otherwise, the vector search would return the error 'vectorization endpoint returned status code '404' (NotFound)'.

matteomarjanovic avatar Jan 10 '24 14:01 matteomarjanovic

we have the same problem but with the https://github.com/Azure-Samples/SQL-AI-samples/blob/main/AzureSQLACSSamples/src/AzureSQL_CogSearch_IntegratedVectorization.ipynb and i have tried your solution but it doesnt work for us could you elaborate a bit more

sanderallert avatar Jan 11 '24 12:01 sanderallert

@matteomarjanovic

sanderallert avatar Jan 11 '24 13:01 sanderallert

As I can see there is not the same error as in the Jupyter Notebook I mentioned previously

matteomarjanovic avatar Jan 11 '24 18:01 matteomarjanovic

Thanks for the feedback, we'll investigate this

mattgotteiner avatar Jan 26 '24 18:01 mattgotteiner

Hi @matteomarjanovic ,

We have refactored this notebook to resolve the issue you pointed out. Please let us know if it works for you now.

mattgotteiner avatar Feb 09 '24 17:02 mattgotteiner

this is the solution you may implement for this type of error: "Could not complete vectorization action. The service failed to authenticate to the vectorization endpoint."

when using azure ai studio with azure search. make sure yoyu have correct authentication type for the vectorizer. see what i made sure for the settings.

image image

phdykd avatar Jul 08 '24 23:07 phdykd