Skip to content

Commit

Permalink
Fixed way of importing AzureChatModel
Browse files Browse the repository at this point in the history
  • Loading branch information
alle-pawols committed Nov 5, 2024
1 parent 7203ac4 commit 6db431b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
4 changes: 2 additions & 2 deletions allms/models/azure_openai.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from asyncio import AbstractEventLoop
from typing import Optional

from langchain.chat_models import AzureChatOpenAI
from langchain_openai import AzureChatOpenAI

from allms.defaults.azure_defaults import AzureGptTurboDefaults
from allms.defaults.general_defaults import GeneralDefaults
Expand Down Expand Up @@ -38,7 +38,7 @@ def _create_llm(self) -> AzureChatOpenAI:
deployment_name=self._config.deployment,
api_version=self._config.api_version,
model_name=self._config.model_name,
base_url=self._config.base_url,
azure_endpoint=self._config.base_url,
api_key=self._config.api_key,
azure_ad_token=self._config.azure_ad_token,
temperature=self._temperature,
Expand Down
26 changes: 21 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ respx = "^0.21.1"
langchain-community = "^0.3.5"
langchain-google-vertexai = "^2.0.7"
sentencepiece = "^0.2.0"
langchain-openai = "^0.2.5"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
Expand Down

0 comments on commit 6db431b

Please sign in to comment.