We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63e81ef commit 749ed7dCopy full SHA for 749ed7d
libs/core/langchain_core/messages/utils.py
@@ -14,12 +14,13 @@
14
import json
15
import logging
16
import math
17
-from collections.abc import Callable, Iterable, Sequence
+from collections.abc import Iterable, Sequence
18
from functools import partial
19
from typing import (
20
TYPE_CHECKING,
21
Annotated,
22
Any,
23
+ Callable,
24
Literal,
25
cast,
26
overload,
@@ -1794,7 +1795,7 @@ def to_message_state(obj: Any) -> dict[str, list[BaseMessage]]:
1794
1795
raise TypeError(msg)
1796
1797
-def as_message_state() -> callable:
1798
+def as_message_state() -> Callable[[Any], dict[str, list[BaseMessage]]]:
1799
"""Return an LCEL-friendly wrapper that normalizes outputs into message state.
1800
1801
Returns:
0 commit comments