Joshua Sundance Bailey
commited on
Commit
·
56dd4e0
1
Parent(s):
b1b6c1f
`openai_api_base` -> `azure_endpoint`
Browse files
langchain-streamlit-demo/llm_resources.py
CHANGED
@@ -133,6 +133,7 @@ def get_texts_and_retriever(
|
|
133 |
texts = text_splitter.split_documents(documents)
|
134 |
embeddings_kwargs = {"openai_api_key": openai_api_key}
|
135 |
if use_azure and azure_kwargs:
|
|
|
136 |
embeddings_kwargs.update(azure_kwargs)
|
137 |
embeddings = AzureOpenAIEmbeddings(**embeddings_kwargs)
|
138 |
else:
|
|
|
133 |
texts = text_splitter.split_documents(documents)
|
134 |
embeddings_kwargs = {"openai_api_key": openai_api_key}
|
135 |
if use_azure and azure_kwargs:
|
136 |
+
azure_kwargs["azure_endpoint"] = azure_kwargs.pop("openai_api_base")
|
137 |
embeddings_kwargs.update(azure_kwargs)
|
138 |
embeddings = AzureOpenAIEmbeddings(**embeddings_kwargs)
|
139 |
else:
|