semvec/pypi-packages huggingface dataset:
colnade-polars 0.4.1
Polars backend adapter for Colnade
Requires Python: >=3.10

# colnade-polars

Polars backend adapter for [Colnade](https://pypi.org/project/colnade/) — a statically type-safe DataFrame abstraction layer for Python.

## Installation

```bash
pip install colnade colnade-polars
```

## Usage

```python
from colnade import Column, Schema, UInt64, Utf8
from colnade_polars import read_parquet

class Users(Schema):
    id: Column[UInt64]
    name: Column[Utf8]

df = read_parquet("users.parquet", Users)
# df is DataFrame[Users] — fully type-checked
```

See the [full documentation](https://colnade.com/) for details.
ragbits-guardrails 1.4.0.dev202602190302
Guardrails module for Ragbits components
Requires Python: >=3.10
Keywords: Evaluation, GenAI, Generative AI, LLMs, Large Language Models, RAG, Retrieval Augmented Generation

# Ragbits Guardrails

Ragbits Guardrails is a Python package that contains utilities for ensuring the safety and relevance of responses generated by Ragbits components.

## Installation

You can install the latest version of Ragbits Guardrails using pip:

```bash
pip install ragbits-guardrails
```

## Quickstart
Example of using the OpenAI Moderation Guardrail to verify a message:

```python
import asyncio
from ragbits.guardrails.base import GuardrailManager, GuardrailVerificationResult
from ragbits.guardrails.openai_moderation import OpenAIModerationGuardrail


async def verify_message(message: str) -> list[GuardrailVerificationResult]:
    manager = GuardrailManager([OpenAIModerationGuardrail()])
    return await manager.verify(message)


if __name__ == '__main__':
    print(asyncio.run(verify_message("Test message")))
```

## Documentation
* [How-To Guides - Guardrails](https://ragbits.deepsense.ai/how-to/use_guardrails/)
<!--
TODO:
* Add link to API Reference once classes from the Guardrails package are added to the API Reference.
-->
ragbits-evaluate 1.4.0.dev202602190302
Evaluation module for Ragbits components
Requires Python: >=3.10
Keywords: Evaluation, GenAI, Generative AI, LLMs, Large Language Models, RAG, Retrieval Augmented Generation

# Ragbits Evaluate

Ragbits Evaluate is a package that contains tools for evaluating the performance of AI pipelines defined with Ragbits components. It also helps with automatically finding the best hyperparameter configurations for them.

## Installation

To install the Ragbits Evaluate package, run:

```sh
pip install ragbits-evaluate
```

<!--
TODO: Add a minimalistic example inspired by the Quickstart chapter on Ragbits Evaluate once it is ready.
-->

## Documentation
<!--
TODO:
* Add link to the Quickstart chapter on Ragbits Evaluate once it is ready.
* Add link to API Reference once classes from the Evaluate package are added to the API Reference.
-->
* [How-To Guides - Evaluate](https://ragbits.deepsense.ai/how-to/evaluate/optimize/)
ragbits-document-search 1.4.0.dev202602190302
Document Search module for Ragbits
Requires Python: >=3.10
Keywords: Document Search, GenAI, Generative AI, LLMs, Large Language Models, RAG, Retrieval Augmented Generation

# Ragbits Document Search

Ragbits Document Search is a Python package that provides tools for building RAG applications. It helps ingest, index, and search documents to retrieve relevant information for your prompts.

## Installation

You can install the latest version of Ragbits Document Search using pip:

```bash
pip install ragbits-document-search
```

## Quickstart
```python
import asyncio

from ragbits.core.embeddings import LiteLLMEmbedder
from ragbits.core.vector_stores.in_memory import InMemoryVectorStore
from ragbits.document_search import DocumentSearch

async def main() -> None:
    """
    Run the example.
    """
    embedder = LiteLLMEmbedder(
        model_name="text-embedding-3-small",
    )
    vector_store = InMemoryVectorStore(embedder=embedder)
    document_search = DocumentSearch(
        vector_store=vector_store,
    )

    # Ingest all .txt files from the "biographies" directory
    await document_search.ingest("local://biographies/*.txt")

    # Search the documents for the query
    results = await document_search.search("When was Marie Curie-Sklodowska born?")
    print(results)


if __name__ == "__main__":
    asyncio.run(main())
```

## Documentation
* [Quickstart 2: Adding RAG Capabilities](https://ragbits.deepsense.ai/quickstart/quickstart2_rag/)
* [How-To Guides - Document Search](https://ragbits.deepsense.ai/how-to/document_search/async_processing/)
* [API Reference - Document Search](https://ragbits.deepsense.ai/api_reference/document_search/)
ragbits-core 1.4.0.dev202602190302
Building blocks for rapid development of GenAI applications
Requires Python: >=3.10
Keywords: GenAI, Generative AI, LLMs, Large Language Models, Prompt Management, RAG, Retrieval Augmented Generation

# Ragbits Core

Ragbits Core is a collection of utilities and tools that are used across all Ragbits packages. It includes fundamentals, such as utilities for logging, configuration, prompt creation, classes for comunicating with LLMs, embedders, vector stores, and more.

## Installation

```sh
pip install ragbits-core
```

## Quick Start

```python
import asyncio

from pydantic import BaseModel
from ragbits.core.prompt import Prompt
from ragbits.core.llms.litellm import LiteLLM


class Dog(BaseModel):
    breed: str
    age: int
    temperament: str

class DogNamePrompt(Prompt[Dog, str]):
    system_prompt = """
    You are a dog name generator. You come up with funny names for dogs given the dog details.
    """

    user_prompt = """
    The dog is a {breed} breed, {age} years old, and has a {temperament} temperament.
    """

async def main() -> None:
    llm = LiteLLM("gpt-4o")
    dog = Dog(breed="Golden Retriever", age=3, temperament="friendly")
    prompt = DogNamePrompt(dog)
    response = await llm.generate(prompt)
    print(response)


if __name__ == "__main__":
    asyncio.run(main())
```

## Documentation
* [Quickstart 1: Working with Prompts and LLMs](https://ragbits.deepsense.ai/quickstart/quickstart1_prompts/)
* [How-To Guides - Core](https://ragbits.deepsense.ai/how-to/prompts/use_prompting/)
* [API Reference - Core](https://ragbits.deepsense.ai/api_reference/core/prompt/)
ragbits-cli 1.4.0.dev202602190302
A CLI application for ragbits - building blocks for rapid development of GenAI applications
Requires Python: >=3.10
Keywords: GenAI, Generative AI, LLMs, Large Language Models, Prompt Management, RAG, Retrieval Augmented Generation

# Ragbits CLI

Ragbits CLI provides the `ragbits` command-line interface (CLI) tool that allows you to interact with Ragbits from the terminal. Other packages can extend the CLI by adding their own commands, so the exact set of available commands may vary depending on the installed packages.

## Installation

To use the complete Ragbits stack, install the `ragbits` package:

```sh
pip install ragbits
```

## Example Usage
The following example assumes that `ragbits-core` is installed and that the current ddirectory contains a `song_prompt.py` file with a prompt class named `SongPrompt`, as defined in the [Quickstart Guide](https://ragbits.deepsense.ai/quickstart/quickstart1_prompts/#making-the-prompt-dynamic).

The example demonstrates how to execute the prompt using the `ragbits` CLI tool.
The left side of the table shows the system and user prompts (rendered with placeholders replaced by the provided values), and the right side shows the generated response from the Large Language Model.

```sh
$ ragbits prompts exec song_prompt:SongPrompt --payload '{"subject": "unicorns", "age_group": 12, "genre": "pop"}'

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Question                              ┃ Answer                                ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [{'role': 'system', 'content': 'You   │ (Verse 1)                             │
│ are a professional songwriter.        │ In a land of rainbows and glitter,    │
│ You only use language that is         │ Where flowers bloom and skies are     │
│ appropriate for children.'},          │ brighter,                             │
│ {'role': 'user', 'content': 'Write a  │ There's a magical creature so rare,   │
│ song about a unicorns for 12 years    │ With a horn that sparkles in the air. │
│ old pop fans.'}]                      │                                       │
│                                       │ (Chorus)                              │
│                                       │ Unicorns, unicorns, oh so divine,     │
│                                       │ With their mane that shines and eyes  │
│                                       │ that shine,                           │
│                                       │ Gallop through the meadows, so free,  │
│                                       │ In a world of wonder, just you and    │
│                                       │ me.                                   │
└───────────────────────────────────────┴───────────────────────────────────────┘
```

## Documentation
* [Documentation of the `ragbits` CLI](https://ragbits.deepsense.ai/cli/main/)
ragbits-chat 1.4.0.dev202602190302
Building blocks for rapid development of GenAI applications
Requires Python: >=3.10
Keywords: GenAI, Generative AI, LLMs, Large Language Models, Prompt Management, RAG, Retrieval Augmented Generation

# Ragbits Chat

ragbits-chat is a Python package that provides tools for building conversational AI applications.

The package includes:
- Framework for building chat experiences
- History management for conversation tracking
- UI components for building chat interfaces

For detailed information, please refer to the [API documentation](https://ragbits.deepsense.ai/how-to/chatbots/api/).
ragbits-agents 1.4.0.dev202602190302
Building blocks for rapid development of GenAI applications
Requires Python: >=3.10
Keywords: Agents, GenAI, Generative AI, LLMs, Large Language Models, RAG, Retrieval Augmented Generation

# Ragbits Agents

Ragbits Agents contains primitives for building agentic systems.

The package is in the experimental phase, the API may change in the future.

## Installation

To install the Ragbits Agents package, run:

```sh
pip install ragbits-agents
```

<!--
TODO: Add a minimalistic example inspired by the Quickstart chapter on Ragbits Evaluate once it is ready.
-->

<!--
TODO:
* Add link to the Quickstart chapter on Ragbits Evaluate once it is ready.
* Add link to API Reference once classes from the Evaluate package are added to the API Reference.
-->