Metadata-Version: 2.4
Name: ragbits-core
Version: 0.10.0
Summary: Building blocks for rapid development of GenAI applications
Project-URL: Homepage, https://github.com/deepsense-ai/ragbits
Project-URL: Bug Reports, https://github.com/deepsense-ai/ragbits/issues
Project-URL: Documentation, https://ragbits.deepsense.ai/
Project-URL: Source, https://github.com/deepsense-ai/ragbits
Author-email: "deepsense.ai" <ragbits@deepsense.ai>
License-Expression: MIT
Keywords: GenAI,Generative AI,LLMs,Large Language Models,Prompt Management,RAG,Retrieval Augmented Generation
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: jinja2>=3.1.4
Requires-Dist: litellm~=1.55.0
Requires-Dist: pydantic>=2.9.1
Requires-Dist: tomli~=2.0.2
Requires-Dist: typer~=0.12.5
Provides-Extra: chroma
Requires-Dist: chromadb~=0.4.24; extra == 'chroma'
Provides-Extra: fastembed
Requires-Dist: fastembed>=0.4.2; extra == 'fastembed'
Provides-Extra: fastembed-gpu
Requires-Dist: fastembed-gpu>=0.4.2; extra == 'fastembed-gpu'
Provides-Extra: lab
Requires-Dist: gradio~=4.44.0; extra == 'lab'
Provides-Extra: local
Requires-Dist: numpy~=1.26.0; extra == 'local'
Requires-Dist: torch~=2.2.1; extra == 'local'
Requires-Dist: transformers~=4.44.2; extra == 'local'
Provides-Extra: otel
Requires-Dist: opentelemetry-api~=1.27.0; extra == 'otel'
Provides-Extra: pgvector
Requires-Dist: asyncpg>=0.30.0; extra == 'pgvector'
Provides-Extra: promptfoo
Requires-Dist: pyyaml~=6.0.2; extra == 'promptfoo'
Provides-Extra: qdrant
Requires-Dist: qdrant-client~=1.12.1; extra == 'qdrant'
Description-Content-Type: text/markdown

# 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
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 = JokePrompt(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 Guildes - Core](https://ragbits.deepsense.ai/how-to/core/use_prompting/)
* [API Reference - Core](https://ragbits.deepsense.ai/api_reference/core/prompt/)
