Skip to content

Commit

Permalink
translate env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme committed Sep 23, 2024
1 parent 1ce056d commit 868ec7a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

from langchain_openai import AzureChatOpenAI

OPENAI_API_VERSION = os.environ.get("AZURE_OPENAI_API_VERSION", "")
OPENAI_API_BASE = os.environ.get("AZURE_OPENAI_API_BASE", "")


class TestAzureOpenAIStandard(ChatModelIntegrationTests):
@property
Expand All @@ -20,6 +23,8 @@ def chat_model_params(self) -> dict:
return {
"deployment_name": os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"],
"model": "gpt-4o",
"openai_api_version": OPENAI_API_VERSION,
"azure_endpoint": OPENAI_API_BASE,
}

@property
Expand All @@ -41,7 +46,9 @@ def chat_model_class(self) -> Type[BaseChatModel]:
@property
def chat_model_params(self) -> dict:
return {
"deployment_name": os.environ["AZURE_OPENAI_LEGACY_CHAT_DEPLOYMENT_NAME"]
"deployment_name": os.environ["AZURE_OPENAI_LEGACY_CHAT_DEPLOYMENT_NAME"],
"openai_api_version": OPENAI_API_VERSION,
"azure_endpoint": OPENAI_API_BASE,
}

@pytest.mark.xfail(reason="Not yet supported.")
Expand Down

0 comments on commit 868ec7a

Please sign in to comment.