core[patch]: For now remove user warning (#20321)

Remove warning since it creates a lot of noise.
pull/20329/head
Eugene Yurtsev 6 months ago committed by GitHub
parent f709ab4cdf
commit f02f708f52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,4 +1,3 @@
import warnings
from typing import Any, Dict, List, Literal
from langchain_core.messages.base import (
@ -57,12 +56,6 @@ class AIMessage(BaseMessage):
or values.get("tool_call_chunks")
)
if raw_tool_calls and not tool_calls:
warnings.warn(
"New langchain packages are available that more efficiently handle "
"tool calling. Please upgrade your packages to versions that set "
"message tool calls. e.g., `pip install --upgrade langchain-anthropic"
"`, pip install--upgrade langchain-openai`, etc."
)
try:
if issubclass(cls, AIMessageChunk): # type: ignore
values["tool_call_chunks"] = default_tool_chunk_parser(

Loading…
Cancel
Save