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.4.0.dev202512090236
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ragbits_core-1.4.0.dev202512090236.tar.gz | 186.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ragbits_core-1.4.0.dev202512090236-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 312.3 kB
Release files / ragbits_core-1.4.0.dev202512090236.tar.gz
| Download URL | ragbits_core-1.4.0.dev202512090236.tar.gz |
|---|---|
| Size | 186.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c46a55372dbe25fc74b02c93bf9e9a27bd1ae239fb292fdf8c06c39f4744e237
|
|
BLAKE2b-256 checksum How to use checksums |
7339607478e2c9b84d3f479a14f77c6e4107df04849b94dc714b52f207555ced
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / ragbits_core-1.4.0.dev202512090236-py3-none-any.whl
| Download URL | ragbits_core-1.4.0.dev202512090236-py3-none-any.whl |
|---|---|
| Size | 125.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e1beb7dd931cb713643e571f4eafeb571c660ee75b57a0c26346959d26b2fd7
|
|
BLAKE2b-256 checksum How to use checksums |
cf88ca54178174cccbf3d4203e36ab3e8c40aaf30812258c15d58041ecc25264
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|