Skip to content

Commit 04242d4

Browse files
authored
Init commit (#70)
1 parent fcebad9 commit 04242d4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libs/ibm/langchain_ibm/toolkit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def validate_tool(self) -> Self:
7272
)
7373
converted_tool = convert_to_watsonx_tool(self)
7474
json_schema = converted_tool["function"]["parameters"]
75-
self.args_schema = json_schema_to_pydantic_model(
75+
self.args_schema = _json_schema_to_pydantic_model(
7676
name="ToolArgsSchema", schema=json_schema
7777
)
7878

@@ -255,7 +255,9 @@ def get_tool(self, tool_name: str) -> WatsonxTool:
255255
raise ValueError(f"A tool with the given name ({tool_name}) was not found.")
256256

257257

258-
def json_schema_to_pydantic_model(name: str, schema: Dict[str, Any]) -> Type[BaseModel]:
258+
def _json_schema_to_pydantic_model(
259+
name: str, schema: Dict[str, Any]
260+
) -> Type[BaseModel]:
259261
properties = schema.get("properties", {})
260262
fields = {}
261263

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.9"
3+
version = "0.3.10"
44
description = "An integration package connecting IBM watsonx.ai and LangChain"
55
authors = ["IBM"]
66
readme = "README.md"

0 commit comments

Comments
 (0)