clarify node

This commit is contained in:
zachary62 2024-12-29 02:58:25 +00:00
parent 2550decdc5
commit f649650d1e
2 changed files with 5 additions and 5 deletions

View File

@ -10,8 +10,8 @@ nav_order: 1
A **Node** is the smallest building block of Mini LLM Flow. Each Node has three lifecycle methods: A **Node** is the smallest building block of Mini LLM Flow. Each Node has three lifecycle methods:
1. **`prep(shared)`** 1. **`prep(shared)`**
- Optionally preprocess data before calling your LLM or doing heavy computation. - Reads and preprocesses data from the `shared` store for LLMs.
- Often used for tasks like reading files, chunking text, or validation. - Examples: query DB, read files, or serialize data into a string.
- Returns `prep_res`, which will be passed to both `exec()` and `post()`. - Returns `prep_res`, which will be passed to both `exec()` and `post()`.
2. **`exec(prep_res)`** 2. **`exec(prep_res)`**
@ -21,8 +21,8 @@ A **Node** is the smallest building block of Mini LLM Flow. Each Node has three
- Returns `exec_res`, which is passed to `post()`. - Returns `exec_res`, which is passed to `post()`.
3. **`post(shared, prep_res, exec_res)`** 3. **`post(shared, prep_res, exec_res)`**
- Optionally writes results back to the `shared` store or decides the next action. - Writes results back to the `shared` store or decides the next action.
- Often used to 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).

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name="minillmflow", name="minillmflow",
version="0.0.2", version="0.0.3",
packages=find_packages(), packages=find_packages(),
author="Zachary Huang", author="Zachary Huang",
author_email="zh2408@columbia.edu", author_email="zh2408@columbia.edu",