update parallel batch
This commit is contained in:
parent
c61d7fb3d7
commit
33fc60f1c5
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
<div align="center">
|
||||
<img src="https://github.com/The-Pocket/.github/raw/main/assets/title.png" width="600"/>
|
||||
<img src="https://github.com/The-Pocket/.github/raw/main/assets/title.png" alt="Pocket Flow – 100-line minimalist LLM framework" width="600"/>
|
||||
</div>
|
||||
|
||||
English | [中文](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_CHINESE.md) | [Español](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_SPANISH.md) | [日本語](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_JAPANESE.md) | [Deutsch](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_GERMAN.md) | [Русский](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_RUSSIAN.md) | [Português](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_PORTUGUESE.md) | [Français](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_FRENCH.md) | [한국어](https://github.com/The-Pocket/PocketFlow/blob/main/cookbook/pocketflow-batch/translations/README_KOREAN.md)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"""Flow definitions for parallel image processing."""
|
||||
|
||||
from pocketflow import AsyncFlow, AsyncParallelBatchFlow, AsyncBatchFlow
|
||||
from nodes import LoadImage, ApplyFilter, SaveImage, NoOp
|
||||
from pocketflow import AsyncParallelBatchFlow, AsyncBatchFlow
|
||||
from nodes import LoadImage, ApplyFilter, SaveImage
|
||||
|
||||
def create_base_flow():
|
||||
"""Create flow for processing a single image with one filter."""
|
||||
|
|
@ -9,12 +9,10 @@ def create_base_flow():
|
|||
load = LoadImage()
|
||||
apply_filter = ApplyFilter()
|
||||
save = SaveImage()
|
||||
noop = NoOp()
|
||||
|
||||
# Connect nodes
|
||||
load - "apply_filter" >> apply_filter
|
||||
apply_filter - "save" >> save
|
||||
save - "default" >> noop
|
||||
|
||||
# Create flow
|
||||
return load
|
||||
|
|
|
|||
|
|
@ -1,10 +1,22 @@
|
|||
# Basic site settings
|
||||
title: Pocket Flow
|
||||
tagline: A 100-line LLM framework
|
||||
description: Minimalist LLM Framework in 100 Lines, Enabling LLMs to Program Themselves
|
||||
description: Pocket Flow – Minimalist LLM Framework in 100 Lines, Enabling LLMs to Program Themselves
|
||||
|
||||
# Theme settings
|
||||
remote_theme: just-the-docs/just-the-docs
|
||||
search_enabled: true
|
||||
|
||||
# SEO & sitemap
|
||||
plugins:
|
||||
- jekyll-seo-tag
|
||||
- jekyll-sitemap
|
||||
|
||||
jekyll-seo-tag:
|
||||
social:
|
||||
name: "Pocket Flow"
|
||||
twitter: "ZacharyHuang12"
|
||||
github: "the-pocket/PocketFlow"
|
||||
|
||||
# Navigation
|
||||
nav_sort: case_sensitive
|
||||
|
|
@ -25,8 +37,7 @@ author:
|
|||
|
||||
# Mermaid settings
|
||||
mermaid:
|
||||
version: "9.1.3" # Pick the version you want
|
||||
# Default configuration
|
||||
version: "9.1.3"
|
||||
config: |
|
||||
directionLR
|
||||
|
||||
|
|
@ -42,8 +53,8 @@ callouts:
|
|||
title: Best Practice
|
||||
color: green
|
||||
|
||||
# The custom navigation
|
||||
# Custom navigation
|
||||
nav:
|
||||
- Home: index.md # Link to your main docs index
|
||||
- Home: index.md
|
||||
- GitHub: "https://github.com/the-pocket/PocketFlow"
|
||||
- Discord: "https://discord.gg/hUHHE9Sa6T"
|
||||
|
|
@ -13,7 +13,7 @@ A [100-line](https://github.com/the-pocket/PocketFlow/blob/main/pocketflow/__ini
|
|||
- **Agentic-Coding**: Intuitive enough for AI agents to help humans build complex LLM applications.
|
||||
|
||||
<div align="center">
|
||||
<img src="https://github.com/the-pocket/.github/raw/main/assets/meme.jpg?raw=true" width="400"/>
|
||||
<img src="https://github.com/the-pocket/.github/raw/main/assets/meme.jpg?raw=true" alt="Pocket Flow – 100-line minimalist LLM framework" width="400"/>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ We model the LLM workflow as a **Graph + Shared Store**:
|
|||
- [(Advanced) Parallel](./core_abstraction/parallel.md) nodes/flows handle I/O-bound tasks.
|
||||
|
||||
<div align="center">
|
||||
<img src="https://github.com/the-pocket/.github/raw/main/assets/abstraction.png" width="700"/>
|
||||
<img src="https://github.com/the-pocket/.github/raw/main/assets/abstraction.png" alt="Pocket Flow – Core Abstraction" width="700"/>
|
||||
</div>
|
||||
|
||||
## Design Pattern
|
||||
|
|
@ -44,7 +44,7 @@ From there, it’s easy to implement popular design patterns:
|
|||
- [(Advanced) Multi-Agents](./design_pattern/multi_agent.md) coordinate multiple agents.
|
||||
|
||||
<div align="center">
|
||||
<img src="https://github.com/the-pocket/.github/raw/main/assets/design.png" width="700"/>
|
||||
<img src="https://github.com/the-pocket/.github/raw/main/assets/design.png" alt="Pocket Flow – Design Pattern" width="700"/>
|
||||
</div>
|
||||
|
||||
## Utility Function
|
||||
|
|
|
|||
Loading…
Reference in New Issue