My code is like: from langchain.embeddings.openai import OpenAIEmbeddings # open ai key openai.api_type = "azure" openai.api_version = "2023-03-15-preview" openai.api_base = 'https://xxxxxopenai.openai.azure.com/' openai.api_key = "xxxxxxxxxxxxxxxxxxxxxxxx" embeddings = OpenAIEmbeddings(...
Example Code from langchain_openai import AzureOpenAIEmbeddings os.environ["AZURE_OPENAI_API_KEY"] = get_auth_token() os.environ["OPENAI_API_KEY"] = get_auth_token() os.environ["AZURE_OPENAI_ENDPOINT"] = 'https://workspace.openai.azure.com/' os.environ["OPENAI_ENDPOINT"] = 'https:/...
Now that the data has been filtered and loaded into LangChain, you'll create embeddings so you can query on the plot for each movie. The following code configures Azure OpenAI, generates embeddings, and loads the embeddings vectors into Azure Cache for Redis. Add the following code a new co...
Now that the data has been filtered and loaded into LangChain, you'll create embeddings so you can query on the plot for each movie. The following code configures Azure OpenAI, generates embeddings, and loads the embeddings vectors into Azure Cache for Redis. Add the following code a new co...
https://github.com/hwchase17/langchain/blob/b3ae6bcd3f42ec85ee65eb29c922ab22a17a0210/langchain/embeddings/openai.py#L100 I was profoundly misled by it when using it, the parameters used in the use case depicted in the example have been renamed to openai_api_base, which seems to be an...
1 change: 1 addition & 0 deletions 1 .env.example Original file line numberDiff line numberDiff line change @@ -6,6 +6,7 @@ AZURE_OPENAI_DEPLOYMENT_NAME=placeholder AZURE_OPENAI_API_KEY=placeholder AZURE_OPENAI_API_BASE=placeholder AZURE_OPENAI_API_VERSION=placeholder AZURE_OPENAI_EMBEDDINGS...
Now that the data has been filtered and loaded into LangChain, you'll create embeddings so you can query on the plot for each movie. The following code configures Azure OpenAI, generates embeddings, and loads the embeddings vectors into Azure Cache for Redis. ...
I'm on langchain=0.0.119 butOpenAIEmbeddings()throws an AuthenticationError: Incorrect API key provided... it seems that it tries to authenticate through the OpenAI API instead of the AzureOpenAI service, even when I configured the OPENAI_API_TYPE and OPENAI_API_BASE previously. Does anyone ...
Based on the information you've provided, it seems like you're encountering an ImportError when trying to import the 'AzureOpenAIEmbeddings' class from the 'langchain.embeddings' module in LangChain. This could be due to a couple of reasons: The 'openai' Python package is not installed. The...
Closed as not planned System Info Python 3.11.4 LangChain 0.0.321 Platform info (WSL2): DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS" Who can help? No response Information The official example notebooks/scripts ...