rename as mini llm flow is poor

This commit is contained in:
zachary62
2025-01-09 03:01:25 +00:00
parent 0cd73ec29b
commit ad18a25dfc
17 changed files with 35 additions and 35 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ nav_order: 1
# Summarization + QA agent for Paul Graham Essay
```python
from minillmflow import *
from pocketflow import *
import openai, os, yaml
# Minimal LLM wrapper
@@ -25,7 +25,7 @@ shared = {"data": {}, "summary": {}}
# Load data into shared['data']
class LoadData(Node):
def prep(self, shared):
path = "./miniLLMFlow/data/PaulGrahamEssaysLarge"
path = "./PocketFlow/data/PaulGrahamEssaysLarge"
for fn in os.listdir(path):
with open(os.path.join(path, fn), 'r') as f:
shared['data'][fn] = f.read()
+3 -3
View File
@@ -4,9 +4,9 @@ title: "Home"
nav_order: 1
---
# Mini LLM Flow
# Pocke tFlow
A [100-line](https://github.com/zachary62/miniLLMFlow/blob/main/minillmflow/__init__.py) minimalist LLM framework for *Agents, Task Decomposition, RAG, etc*.
A [100-line](https://github.com/miniLLMFlow/PocketFlow/blob/main/packetflow/__init__.py) minimalist LLM framework for *Agents, Task Decomposition, RAG, etc*.
We model the LLM workflow as a **Nested Directed Graph**:
@@ -19,7 +19,7 @@ We model the LLM workflow as a **Nested Directed Graph**:
<div align="center">
<img src="https://github.com/zachary62/miniLLMFlow/blob/main/assets/minillmflow.jpg?raw=true" width="400"/>
<img src="https://github.com/miniLLMFlow/PocketFlow/raw/main/assets/minillmflow.jpg?raw=true" width="400"/>
</div>
+2 -2
View File
@@ -7,7 +7,7 @@ nav_order: 1
# Node
A **Node** is the smallest building block of Mini LLM Flow. Each Node has 3 steps:
A **Node** is the smallest building block. Each Node has 3 steps:
1. `prep(shared)`
- A reliable step for preprocessing data from the `shared` store.
@@ -31,7 +31,7 @@ A **Node** is the smallest building block of Mini LLM Flow. Each Node has 3 step
## Fault Tolerance & Retries
Nodes in Mini LLM Flow can **retry** execution if `exec()` raises an exception. You control this via two parameters when you create the Node:
Nodes can **retry** execution if `exec()` raises an exception. You control this via two parameters when you create the Node:
- `max_retries` (int): How many times to try running `exec()`. The default is `1`, which means **no** retry.
- `wait` (int): The time to wait (in **seconds**) before each retry attempt. By default, `wait=0` (i.e., no waiting). Increasing this is helpful when you encounter rate-limits or quota errors from your LLM provider and need to back off.