Build modular, asynchronous AI pipelines
Top 24.0% on sourcepulse
This library provides a Python framework for building modular, asynchronous, and composable AI pipelines, specifically targeting generative AI applications. It enables efficient, parallel content processing for developers and researchers working with large language models like Gemini, offering a structured way to manage complex AI workflows.
How It Works
The core abstraction is the Processor
, a class that encapsulates a unit of work. Processors accept an asynchronous iterable of ProcessorPart
objects (representing text, images, etc.) and return a similar stream. This design allows for chaining (+
) and parallelization (//
) of processors, creating sophisticated data flows and agentic behaviors. It leverages Python's asyncio
for concurrency and provides utilities for stream management, making it suitable for both turn-based and real-time streaming interactions.
Quick Start & Requirements
pip install genai-processors
Highlighted Details
ProcessorPart
, including metadata for various content types.asyncio
for efficient asynchronous and concurrent task orchestration.Maintenance & Community
The project is maintained by Google. Contribution guidelines are available in CONTRIBUTING.md
.
Licensing & Compatibility
Limitations & Caveats
Requires Python 3.10 or higher. While designed for efficiency, performance will heavily depend on the underlying AI models and hardware used.
1 day ago
Inactive