Skip to content

Commit ebb1505

Browse files
fix: Fixed init ChatWatsonx with deployment_id and watsonx_client (#62)
* fix: Fixed init ModelInference with deployment_id and watsonx_client * poetry update
1 parent 3aeec3c commit ebb1505

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

libs/ibm/langchain_ibm/chat_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ def validate_environment(self) -> Self:
623623
if isinstance(self.watsonx_client, APIClient):
624624
watsonx_model = ModelInference(
625625
model_id=self.model_id,
626+
deployment_id=self.deployment_id,
626627
params=self.params,
627628
api_client=self.watsonx_client,
628629
project_id=self.project_id,

libs/ibm/langchain_ibm/llms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def validate_environment(self) -> Self:
171171
elif isinstance(self.watsonx_client, APIClient):
172172
watsonx_model = ModelInference(
173173
model_id=self.model_id,
174+
deployment_id=self.deployment_id,
174175
params=self.params,
175176
api_client=self.watsonx_client,
176177
project_id=self.project_id,

libs/ibm/poetry.lock

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/ibm/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "langchain-ibm"
3-
version = "0.3.6"
3+
version = "0.3.7"
44
description = "An integration package connecting IBM watsonx.ai and LangChain"
55
authors = ["IBM"]
66
readme = "README.md"

libs/ibm/tests/unit_tests/test_chat_models_standard.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
client.credentials = credentials
1515
client.service_instance = ServiceInstance.__new__(ServiceInstance)
1616
client.service_instance._credentials = credentials
17+
client.default_space_id = None
18+
client.default_project_id = None
1719

1820

1921
class TestWatsonxStandard(ChatModelUnitTests):

0 commit comments

Comments
 (0)