[docs]: recursion limit info (#1501)

* draft

* vadym comments

* spelling

* final nits

* final nits
This commit is contained in:
Isaac Francisco
2024-08-27 21:06:09 -07:00
committed by GitHub
parent a8758661bc
commit 84cb3ea151
5 changed files with 186 additions and 2 deletions
+11 -1
View File
@@ -401,7 +401,17 @@ def node_a(state, config):
...
```
See [this guide](../how-tos/configuration.ipynb) for a full breakdown on configuration
See [this guide](../how-tos/configuration.ipynb) for a full breakdown on configuration.
### Recursion Limit
The recursion limit sets the maximum number of [super-steps](#graphs) the graph can execute during a single execution. Once the limit is reached, LangGraph will raise `GraphRecursionError`. By default this value is set to 25 steps. The recursion limit can be set on any graph at runtime, and is passed to `.invoke`/`.stream` via the config dictionary. Importantly, `recursion_limit` is a standalone `config` key and should not be passed inside the `configurable` key as all other user-defined configuration. See the example below:
```python
graph.invoke(inputs, config={"recursion_limit": 5, "configurable":{"llm": "anthropic"}})
```
Read [this how-to] to learn more about how the recursion limit works.
## Breakpoints
+1 -1
View File
@@ -15,7 +15,7 @@ These how-to guides show how to achieve that controllability.
- [How to create subgraphs](subgraph.ipynb)
- [How to create branches for parallel execution](branching.ipynb)
- [How to create map-reduce branches for parallel execution](map-reduce.ipynb)
- [How to control graph recursion limit](recursion-limit.ipynb)
## Persistence