Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

pip install ragbits-core

Quick Start

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

Metadata

Release files for ragbits-core 1.7.0.dev202604280307

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ragbits-core 1.7.0.dev202604280307
File Size Uploaded
ragbits_core-1.7.0.dev202604280307.tar.gz 187.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ragbits-core 1.7.0.dev202604280307
File Interpreter ABI Platform
ragbits_core-1.7.0.dev202604280307-py3-none-any.whl Python 3 none any Details

Total release size: 313.0 kB

Release files / ragbits_core-1.7.0.dev202604280307.tar.gz

Download URL ragbits_core-1.7.0.dev202604280307.tar.gz
Size 187.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6ab9ec5ee86c812c1277f169f5966cb05220f0e3d5ffb04d3bce0bf274557b1d
BLAKE2b-256 checksum
How to use checksums
dcef85fd4a42706847770fd25129c7750e993b7d8b2fdc91019610b6c2205c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / ragbits_core-1.7.0.dev202604280307-py3-none-any.whl

Download URL ragbits_core-1.7.0.dev202604280307-py3-none-any.whl
Size 125.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abb78dc5e51413e90c2d3a02fa3d0ea9b551c603a68c9ab5a0609ebc7376323f
BLAKE2b-256 checksum
How to use checksums
5d4d7ab36d288b4bd5f55908005b5b57ccefda7e3c3e7e4a73f64084e01f82f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.1

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page