I want to use OpenAIEmbeddings with Azure Open AI (not Open AI). There is no definitive documentation on this.
says to use AzureOpenAIEmbeddings but it gives an error of
ImportError: cannot import name 'AzureOpenAIEmbeddings' from 'langchain.embeddings.openai'
How to configure LangChain to use Azure OpenAI in Python – NillsF blog mentions about using OPENAI_… settings instead of AZURE_OPENAI_… with that I am able to get OpenAIEmbeddings() working with my Azure Open AI subscription however when I go ahead and try:
docs = vectordb.similarity_search(question,k=3)
I get an error of:
AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: <my key>. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
[ ]:
which makes me believe that it is probably going to OpenAI instead of Azure OpenAI. Or do I need anything more in my Azure Open AI subscription to make it work? If so, what?
Any ideas?