This commit is contained in:
Nuno Campos
2024-01-16 13:14:00 -08:00
parent 3e884d9737
commit 3d79c7552d
5 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ def _coerce_state(schema: Type[Any], input: dict[str, Any]) -> dict[str, Any]:
return schema(**input)
def _update_state(input: dict[str, Any], config: RunnableConfig):
def _update_state(input: dict[str, Any], config: RunnableConfig) -> dict[str, Any]:
if input is not None:
ChannelWrite.do_write(config, **input)
return input
+7 -2
View File
@@ -1,5 +1,10 @@
from langgraph.prebuilt.agent_executor import create_agent_executor
from langgraph.prebuilt import chat_agent_executor
from langgraph.prebuilt.agent_executor import create_agent_executor
from langgraph.prebuilt.tool_executor import ToolExecutor, ToolInvocation
__all__ = ["create_agent_executor", "chat_agent_executor", "ToolExecutor", ToolInvocation]
__all__ = [
"create_agent_executor",
"chat_agent_executor",
"ToolExecutor",
"ToolInvocation",
]
+3 -3
View File
@@ -87,7 +87,7 @@ class Channel:
*,
key: Optional[str] = None,
when: Optional[Callable[[Any], bool]] = None,
tags: Optional[Sequence[str]] = None,
tags: Optional[list[str]] = None,
) -> ChannelInvoke:
...
@@ -99,7 +99,7 @@ class Channel:
*,
key: None = None,
when: Optional[Callable[[Any], bool]] = None,
tags: Optional[Sequence[str]] = None,
tags: Optional[list[str]] = None,
) -> ChannelInvoke:
...
@@ -110,7 +110,7 @@ class Channel:
*,
key: Optional[str] = None,
when: Optional[Callable[[Any], bool]] = None,
tags: Optional[Sequence[str]] = None,
tags: Optional[list[str]] = None,
) -> ChannelInvoke:
"""Runs process.invoke() each time channels are updated,
with a dict of the channel values as input."""
+1 -1
View File
@@ -90,7 +90,7 @@ class ChannelInvoke(RunnableBindingBase):
channels: Mapping[None, str] | Mapping[str, str],
triggers: Sequence[str],
when: Optional[Callable[[Any], bool]] = None,
tags: Optional[Sequence[str]] = None,
tags: Optional[list[str]] = None,
*,
bound: Optional[Runnable[Any, Any]] = None,
kwargs: Optional[Mapping[str, Any]] = None,
+1 -1
View File
@@ -61,7 +61,7 @@ def validate_graph(
def validate_keys(
keys: Union[str, Sequence[str]],
channels: dict[str, BaseChannel],
channels: Mapping[str, BaseChannel],
) -> None:
if isinstance(keys, str):
if keys not in channels: