The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Fix Anthropic Functions ainvoke (#12215)
Erick Friis95ae40ff9064
diff --git a/libs/experimental/langchain_experimental/llms/anthropic_functions.py b/libs/experimental/langchain_experimental/llms/anthropic_functions.pyindex 68e0eac1f8..48e38690de 100644--- a/libs/experimental/langchain_experimental/llms/anthropic_functions.py+++ b/libs/experimental/langchain_experimental/llms/anthropic_functions.py@@ -5,14 +5,12 @@ from typing import Any, DefaultDict, Dict, List, Optionalfrom langchain.callbacks.manager import (CallbackManagerForLLMRun,- Callbacks,)from langchain.chat_models.anthropic import ChatAnthropicfrom langchain.chat_models.base import BaseChatModelfrom langchain.schema import (ChatGeneration,ChatResult,- LLMResult,)from langchain.schema.messages import (AIMessage,@@ -196,18 +194,6 @@ class AnthropicFunctions(BaseChatModel):else:return ChatResult(generations=[ChatGeneration(message=response)])- async def agenerate(- self,- messages: List[List[BaseMessage]],- stop: Optional[List[str]] = None,- callbacks: Callbacks = None,- *,- tags: Optional[List[str]] = None,- metadata: Optional[Dict[str, Any]] = None,- **kwargs: Any,- ) -> LLMResult:- raise NotImplementedError-@propertydef _llm_type(self) -> str:return "anthropic_functions"