This commit is contained in:
Nuno Campos
2025-04-08 10:52:28 -07:00
parent 0b3bf37a55
commit cee6a450dc
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ from langgraph.utils.queue import AsyncQueue, SyncQueue # type: ignore[attr-def
try:
from langchain_core.tracers._streaming import _StreamingCallbackHandler
except ImportError:
_StreamingCallbackHandler = None
_StreamingCallbackHandler = None # type: ignore
WriteValue = Union[Callable[[Input], Output], Any]
@@ -2536,7 +2536,7 @@ class Pregel(PregelProtocol):
do_stream = (
next(
(
cast(_StreamingCallbackHandler, h) # type: ignore
cast(_StreamingCallbackHandler, h)
for h in run_manager.handlers
if isinstance(h, _StreamingCallbackHandler)
),
+1 -1
View File
@@ -23,7 +23,7 @@ from langgraph.types import StreamChunk
try:
from langchain_core.tracers._streaming import _StreamingCallbackHandler
except ImportError:
_StreamingCallbackHandler = object
_StreamingCallbackHandler = object # type: ignore
T = TypeVar("T")
Meta = tuple[tuple[str, ...], dict[str, Any]]
+3 -3
View File
@@ -56,7 +56,7 @@ from langgraph.utils.config import (
try:
from langchain_core.tracers._streaming import _StreamingCallbackHandler
except ImportError:
_StreamingCallbackHandler = None
_StreamingCallbackHandler = None # type: ignore
def _set_config_context(
@@ -690,7 +690,7 @@ class RunnableSeq(Runnable):
if _StreamingCallbackHandler is not None and (
stream_handler := next(
(
cast(_StreamingCallbackHandler, h) # type: ignore
cast(_StreamingCallbackHandler, h)
for h in run_manager.handlers
if isinstance(h, _StreamingCallbackHandler)
),
@@ -758,7 +758,7 @@ class RunnableSeq(Runnable):
if _StreamingCallbackHandler is not None and (
stream_handler := next(
(
cast(_StreamingCallbackHandler, h) # type: ignore
cast(_StreamingCallbackHandler, h)
for h in run_manager.handlers
if isinstance(h, _StreamingCallbackHandler)
),