AI-Graph Documentationο
Welcome to AI-Graph, a powerful and flexible framework for building AI processing pipelines using the Chain of Responsibility pattern.
π Featuresο
π Pipeline Architecture: Build complex processing pipelines using chained steps
π ForEach Processing: Iterate over collections or run fixed iterations with sub-pipelines
ποΈ Modular Design: Easily extensible with custom pipeline steps
π Progress Tracking: Built-in progress bars with tqdm integration
π§ͺ 100% Test Coverage: Comprehensive test suite with pytest
π― Type Safe: Full type hints support with mypy
π¦ Modern Python: Built with modern Python packaging standards
π Quick Startο
Installationο
pip install ai-graph
Basic Usageο
from ai_graph.pipeline import Pipeline
from ai_graph.step import BaseStep
# Create a custom step
class MyStep(BaseStep):
def process(self, data: dict[str, any]) -> dict[str, any]:
"""
Process data in this step.
Parameters:
-----------
data (dict): Input data for this step
key: "input" is an integer that will be processed
Returns
-------
dict: Processed data
"""
# Example processing logic
return {"result": data["input"] * 2}
# Build and run pipeline
pipeline = Pipeline()
pipeline.add_step(MyStep())
result = pipeline.run(input_data={"input": 5})
print(result) # Output: {"result": 10, "input": 5}
ποΈ Architecture Overviewο
AI-Graph is built around three core concepts:
Steps: Individual processing units that transform data
Pipelines: Chains of steps that process data sequentially
π Documentation Contentsο
Getting Started
π€ Contributingο
We welcome contributions! Please see our Contributing to AI-Graph guide for details.
π Licenseο
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
π Supportο
π Documentation: Youβre reading it!
π Issues: GitHub Issues
π¬ Discussions: GitHub Discussions
π§ Email: msinamsina@gmail.com