mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-26 16:43:35 +00:00
core[patch]: For now remove user warning (#20321)
Remove warning since it creates a lot of noise.
This commit is contained in:
parent
f709ab4cdf
commit
f02f708f52
@ -1,4 +1,3 @@
|
|||||||
import warnings
|
|
||||||
from typing import Any, Dict, List, Literal
|
from typing import Any, Dict, List, Literal
|
||||||
|
|
||||||
from langchain_core.messages.base import (
|
from langchain_core.messages.base import (
|
||||||
@ -57,12 +56,6 @@ class AIMessage(BaseMessage):
|
|||||||
or values.get("tool_call_chunks")
|
or values.get("tool_call_chunks")
|
||||||
)
|
)
|
||||||
if raw_tool_calls and not tool_calls:
|
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:
|
try:
|
||||||
if issubclass(cls, AIMessageChunk): # type: ignore
|
if issubclass(cls, AIMessageChunk): # type: ignore
|
||||||
values["tool_call_chunks"] = default_tool_chunk_parser(
|
values["tool_call_chunks"] = default_tool_chunk_parser(
|
||||||
|
Loading…
Reference in New Issue
Block a user