mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
chore(langgraph): Log when no values event is emitted from RemoteGraph (#6140)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from collections.abc import AsyncIterator, Iterator, Sequence
|
||||
from dataclasses import asdict
|
||||
from typing import (
|
||||
@@ -61,6 +62,8 @@ from langgraph.types import (
|
||||
StreamMode,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__all__ = ("RemoteGraph", "RemoteException")
|
||||
|
||||
_CONF_DROPLIST = frozenset(
|
||||
@@ -950,6 +953,7 @@ class RemoteGraph(PregelProtocol):
|
||||
try:
|
||||
return chunk
|
||||
except UnboundLocalError:
|
||||
logger.warning("No events received from remote graph")
|
||||
return None
|
||||
|
||||
async def ainvoke(
|
||||
@@ -990,6 +994,7 @@ class RemoteGraph(PregelProtocol):
|
||||
try:
|
||||
return chunk
|
||||
except UnboundLocalError:
|
||||
logger.warning("No events received from remote graph")
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@@ -8383,6 +8383,7 @@ def test_get_graph_nonterminal_last_step_source(snapshot: SnapshotAssertion) ->
|
||||
|
||||
assert json.dumps(graph_json, indent=2, sort_keys=True) == snapshot
|
||||
|
||||
|
||||
def test_null_resume_disallowed_with_multiple_interrupts(
|
||||
sync_checkpointer: BaseCheckpointSaver,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user