Tool Validator Node (#468)

This commit is contained in:
William FH
2024-05-15 20:02:38 -07:00
committed by GitHub
parent a308eb5f3b
commit 4209508556
7 changed files with 332 additions and 12 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ We will go through a full execution of a StateGraph later, but first, lets explo
## Nodes
In StateGraph, nodes are typically python functions (sync or `async`) where the **first** positional argument is the [state](#state), and (optionally), the **second** positional argument is a "config", containing optional [configurable parameters](#configuration) (such as a `thread_id`).
In StateGraph, nodes are typically python functions (sync or `async`) where the **first** positional argument is the [state](#state-management), and (optionally), the **second** positional argument is a "config", containing optional [configurable parameters](#configuration) (such as a `thread_id`).
Similar to `NetworkX`, you add these nodes to a graph using the [add_node](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.MessageGraph) method:
+1 -1
View File
@@ -1,6 +1,6 @@
# Graph Definitions
Graphs are the core abstraction of LangGraph. Each [StateGraph](#langgraph.graph.StateGraph) implementation is used to create graph workflows. Once compiled, you can run the [CompiledGraph](#compiledgraph) to run the application.
Graphs are the core abstraction of LangGraph. Each [StateGraph](#stategraph) implementation is used to create graph workflows. Once compiled, you can run the [CompiledGraph](#compiledgraph) to run the application.
## StateGraph
+18 -8
View File
@@ -1,5 +1,13 @@
# Prebuilt
## create_react_agent
```python
from langgraph.prebuilt import create_react_agent
```
::: langgraph.prebuilt.create_react_agent
## ToolNode
```python
@@ -31,13 +39,6 @@ from langgraph.prebuilt import ToolInvocation
heading_level: 4
## create_react_agent
```python
from langgraph.prebuilt import create_react_agent
```
::: langgraph.prebuilt.create_react_agent
## `tools_condition`
@@ -45,4 +46,13 @@ from langgraph.prebuilt import create_react_agent
from langgraph.prebuilt import tools_condition
```
::: langgraph.prebuilt.tools_condition
::: langgraph.prebuilt.tools_condition
## ValidationNode
```python
from langgraph.prebuilt import ValidationNode
```
::: langgraph.prebuilt.ValidationNode