Metadata-Version: 2.1
Name: autonomize-autorag
Version: 0.1.21
Summary: AutoRAG is a flexible and scalable solution for building Retrieval-Augmented Generation (RAG) systems.
Home-page: https://github.com/autonomize-ai/AutoRAG
License: Proprietary
Author: Varun
Author-email: varun.prakash@autonomize.ai
Requires-Python: >=3.12,<4.0
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Classifier: Typing :: Typed
Provides-Extra: azure-ai-search
Provides-Extra: huggingface
Provides-Extra: modelhub
Provides-Extra: openai
Provides-Extra: qdrant
Requires-Dist: aiohttp (>=3.10.8,<4.0.0)
Requires-Dist: anyio (>=4.4.0,<5.0.0)
Requires-Dist: azure-search-documents (==11.4.0) ; extra == "azure-ai-search"
Requires-Dist: httpx (>=0.27.2,<0.28.0) ; extra == "modelhub"
Requires-Dist: openai (>=1.43.0,<2.0.0) ; extra == "openai"
Requires-Dist: pydantic (>=2.9.2,<3.0.0)
Requires-Dist: qdrant-client (>=1.11.1,<2.0.0) ; extra == "qdrant"
Requires-Dist: sentence-transformers (>=3.0.1,<4.0.0) ; extra == "huggingface"
Requires-Dist: tqdm (>=4.66.5,<5.0.0)
Requires-Dist: types-tqdm (>=4.66.0.20240417,<5.0.0.0)
Project-URL: Documentation, https://github.com/autonomize-ai/AutoRAG
Project-URL: Repository, https://github.com/autonomize-ai/AutoRAG
Description-Content-Type: text/markdown

# AutoRAG

*Powering seamless retrieval and generation workflows for our internal AI systems*

![Python Version](https://img.shields.io/badge/Python-3.12+-blue?style=for-the-badge&logo=python)
![PyPI Version](https://img.shields.io/pypi/v/autonomize-autorag?style=for-the-badge&logo=pypi)
![Code Formatter](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)
![Code Linter](https://img.shields.io/badge/linting-pylint-green.svg?style=for-the-badge)
![Code Checker](https://img.shields.io/badge/mypy-checked-blue?style=for-the-badge)
![Code Coverage](https://img.shields.io/badge/coverage-100%25-a4a523?style=for-the-badge&logo=codecov)

## Overview

AutoRAG is a flexible and scalable solution for building Retrieval-Augmented Generation (RAG) systems.

This SDK provides out-of-the-box functionality for creating and managing retrieval-augmented generation workflows, offering a modular, highly-configurable interface. It supports multiple vector stores and leverages http clients like httpx for handling requests, ensuring seamless integration.

## Features

- **Modular architecture**: The SDK allows you to swap, extend, or customize components like retrieval models, vector stores, and response generation strategies.
- **High scalability**: Built to handle large-scale data retrieval and generation, enabling robust, production-ready applications.
- **Celery for dependency injection**: Efficient background tasks with support for distributed task execution.
- **Multi-flow support**: Easily integrate various vector databases (ex: Qdrant, Azure AI Search) with various language models providers (ex: OpenAI, vLLM, Ollama) using standardized public methods for seamless development.

## Installation

1. Create a virtual environment, we recommend [Miniconda](https://docs.anaconda.com/miniconda/) for environment management:
    ```bash
    conda create -n autorag python=3.12
    conda activate autorag
    ```
2. Install the package:
    ```bash
    pip install autonomize-autorag
    ```

To install with optional dependencies like Qdrant, Huggingface, OpenAI, Modelhub, etc., refer to the [Installation Guide](INSTALL.md).


## Usage

The full set of examples can be found in [examples](examples) directory.

### Sync Usage

```python
import os
from autorag.language_models.openai import OpenAILanguageModel

llm = OpenAILanguageModel(
    api_key=os.environ.get("OPENAI_API_KEY"),
)

generation = llm.generate(
    message=[{"role": "user", "content": "What is attention in ML?"}],
    model="gpt-4o"
)
```

### Async Usage

Simply use sync methods with `a` prefix and use `await` for each call. Example: `client.generate(...)` becomes `await client.agenerate(...)` and everything else remains the same.

```python
import os
from autorag.language_models.openai import OpenAILanguageModel

llm = OpenAILanguageModel(
    api_key=os.environ.get("OPENAI_API_KEY"),
)

generation = await llm.agenerate(
    message=[{"role": "user", "content": "What is attention in ML?"}],
    model="gpt-4o"
)
```

## Contribution

To contribute in our AutoRAG SDK, please refer to our [Contribution Guidelines](CONTRIBUTING.md).

## License
Copyright (C) Autonomize AI - All Rights Reserved

The contents of this repository cannot be copied and/or distributed without the explicit permission from Autonomize.ai

