enabled callout

This commit is contained in:
zachary62 2025-01-02 01:25:34 +00:00
parent 9e4c7237cc
commit 35f8b50f53
3 changed files with 9 additions and 4 deletions

View File

@ -15,8 +15,9 @@ Nodes and Flows **communicate** in two ways:
If you know memory management, **Shared Store** is like a **heap** shared across function calls, while **Params** is like a **stack** assigned by parent function calls. If you know memory management, **Shared Store** is like a **heap** shared across function calls, while **Params** is like a **stack** assigned by parent function calls.
> **Why not use other communication models like Message Passing?** *Message passing* works well for simple DAGs, but with *nested graphs* (Flows containing Flows, repeated or cyclic calls), routing messages becomes hard to maintain. A shared store keeps the design simple and easy.
{: .note } {: .note }
**Why not use other communication models like Message Passing?** *Message passing* works well for simple DAGs, but with *nested graphs* (Flows containing Flows, repeated or cyclic calls), routing messages becomes hard to maintain. A shared store keeps the design simple and easy.
--- ---
@ -78,8 +79,9 @@ No special data-passing—just the same `shared` object.
- **Set** via `set_params()`. - **Set** via `set_params()`.
- **Cleared** and updated each time a parent Flow calls it. - **Cleared** and updated each time a parent Flow calls it.
> Only set the uppermost Flow params because others will be overwritten by the parent Flow. If you need to set child node params, see [Batch](./batch.md).
{: .warning } {: .warning }
Only set the uppermost Flow params because others will be overwritten by the parent Flow. If you need to set child node params, see [Batch](./batch.md).
Typically, **Params** are identifiers (e.g., file name, page number). Use them to fetch the task you assigned or write to a specific part of the shared store. Typically, **Params** are identifiers (e.g., file name, page number). Use them to fetch the task you assigned or write to a specific part of the shared store.

View File

@ -86,10 +86,11 @@ flowchart TD
- `node.run(shared)`: Just runs that node alone (calls `prep()`, `exec()`, `post()`), returns an Action. - `node.run(shared)`: Just runs that node alone (calls `prep()`, `exec()`, `post()`), returns an Action.
- `flow.run(shared)`: Executes from the start node, follows Actions to the next node, and so on until the flow cant continue (no next node or no next Action). - `flow.run(shared)`: Executes from the start node, follows Actions to the next node, and so on until the flow cant continue (no next node or no next Action).
{: .warning }
> node.run(shared) **does not** proceed automatically to the successor and may use incorrect parameters. > node.run(shared) **does not** proceed automatically to the successor and may use incorrect parameters.
> This is mainly for debugging or testing a single node. > This is mainly for debugging or testing a single node.
> Always use `flow.run(...)` in production to ensure the full pipeline runs correctly. > Always use `flow.run(...)` in production to ensure the full pipeline runs correctly.
{: .warning }
## 3. Nested Flows ## 3. Nested Flows

View File

@ -25,8 +25,10 @@ A **Node** is the smallest building block of Mini LLM Flow. Each Node has 3 step
- Examples: *finalize outputs, trigger next steps, or log results*. - Examples: *finalize outputs, trigger next steps, or log results*.
- Returns a **string** to specify the next action (`"default"` if nothing or `None` is returned). - Returns a **string** to specify the next action (`"default"` if nothing or `None` is returned).
> All 3 steps are optional. For example, you might only need to run the Prep without calling the LLM.
{: .note } {: .note }
All 3 steps are optional. For example, you might only need to run the Prep without calling the LLM.
## Fault Tolerance & Retries ## Fault Tolerance & Retries