langchain/libs/partners/openai/langchain_openai/embeddings
Chip Davis 04bc5f1a95
partners[azure]: fix having openai_api_base set for other packages (#22068)
This fix is for #21726. When having other packages installed that
require the `openai_api_base` environment variable, users are not able
to instantiate the AzureChatModels or AzureEmbeddings.

This PR adds a new value `ignore_openai_api_base` which is a bool. When
set to True, it sets `openai_api_base` to `None`

Two new tests were added for the `test_azure` and a new file
`test_azure_embeddings`

A different approach may be better for this. If you can think of better
logic, let me know and I can adjust it.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-07-01 18:35:20 +00:00
..
__init__.py infra: add more formatter rules to openai (#23189) 2024-06-19 11:39:58 -07:00
azure.py partners[azure]: fix having openai_api_base set for other packages (#22068) 2024-07-01 18:35:20 +00:00
base.py infra: add more formatter rules to openai (#23189) 2024-06-19 11:39:58 -07:00