Skip to content

Commit 4d066d1

Browse files
typehint change
1 parent 25d9551 commit 4d066d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/litai/llm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
if TYPE_CHECKING:
3333
from langchain_core.tools import StructuredTool
34+
from pydantic import BaseModel
3435

3536
CLOUDY_MODELS = {
3637
"openai/gpt-4o",
@@ -358,7 +359,7 @@ def chat( # noqa: D417
358359
@staticmethod
359360
def call_tool(
360361
response: Union[List[dict], dict, str], tools: Optional[Sequence[Union[LitTool, "StructuredTool"]]] = None
361-
) -> Optional[str]:
362+
) -> Optional[Union[str, "BaseModel", list["BaseModel"]]]:
362363
"""Calls a tool with the given response."""
363364
if tools is None:
364365
raise ValueError("No tools provided")

0 commit comments

Comments
 (0)