This commit is contained in:
Chester Curme
2025-07-28 11:01:42 -04:00
parent b8fed06409
commit 61e329637b
3 changed files with 33 additions and 20 deletions

View File

@@ -740,7 +740,7 @@ class BaseChatModelV1(BaseLanguageModel[AIMessageV1], ABC):
*,
tool_choice: Optional[Union[str]] = None,
**kwargs: Any,
) -> Runnable[LanguageModelInput, BaseMessage]:
) -> Runnable[LanguageModelInput, AIMessageV1]:
"""Bind tools to the model.
Args:

View File

@@ -9,7 +9,7 @@ from typing import Annotated, Any, Optional
from pydantic import SkipValidation, ValidationError
from langchain_core.exceptions import OutputParserException
from langchain_core.messages import AIMessage, InvalidToolCall
from langchain_core.messages import AIMessage, InvalidToolCall, ToolCall
from langchain_core.messages.tool import invalid_tool_call
from langchain_core.messages.tool import tool_call as create_tool_call
from langchain_core.output_parsers.transform import BaseCumulativeTransformOutputParser
@@ -26,7 +26,7 @@ def parse_tool_call(
partial: bool = False,
strict: bool = False,
return_id: bool = True,
) -> Optional[dict[str, Any]]:
) -> Optional[ToolCall]:
"""Parse a single tool call.
Args: