Skip to content

Commit 1cf78bf

Browse files
authored
tests(langchain-sdk): Added unit tests for langchain SDK client and utils. (#118)
Test coverage: | Name | Stmts | Miss | Cover | | -------- | ------- | ---- | ----- | | src/toolbox_langchain_sdk/__init__.py | 2 | 0 | 100% | | src/toolbox_langchain_sdk/client.py | 43 | 2 | 95% | | src/toolbox_langchain_sdk/utils.py | 48 | 0 | 100%| | TOTAL | 93 | 2 | 98% |
1 parent 8e0b4e1 commit 1cf78bf

File tree

3 files changed

+360
-870
lines changed

3 files changed

+360
-870
lines changed

src/toolbox_langchain_sdk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import asyncio
2-
from typing import Optional, Type
2+
from typing import Any, Optional, Type
33

44
from aiohttp import ClientSession
55
from langchain_core.tools import StructuredTool
@@ -96,7 +96,7 @@ def _generate_tool(
9696
model_name=tool_name, schema=tool_schema.parameters
9797
)
9898

99-
async def _tool_func(**kwargs) -> dict:
99+
async def _tool_func(**kwargs: Any) -> dict:
100100
return await _invoke_tool(self._url, self._session, tool_name, kwargs)
101101

102102
return StructuredTool.from_function(

0 commit comments

Comments
 (0)