anthropic[minor]: add tool calling (#18554)

This commit is contained in:
Erick Friis
2024-03-05 08:30:16 -08:00
committed by GitHub
parent 5fc67ca2c7
commit 4ac2cb4adc
8 changed files with 496 additions and 203 deletions

View File

@@ -11,6 +11,7 @@ from langchain.schema import (
ChatResult,
)
from langchain_community.chat_models.anthropic import ChatAnthropic
from langchain_core._api.deprecation import deprecated
from langchain_core.language_models import BaseChatModel
from langchain_core.messages import (
AIMessage,
@@ -123,6 +124,11 @@ def _destrip(tool_input: Any) -> Any:
raise ValueError
@deprecated(
since="0.0.54",
removal="0.2",
alternative_import="langchain_anthropic.experimental.ChatAnthropicTools",
)
class AnthropicFunctions(BaseChatModel):
"""Chat model for interacting with Anthropic functions."""