Skip to main content

A CLI application for ragbits - building blocks for rapid development of GenAI applications

Project description

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:

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.

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.

$ 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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ragbits_cli-1.4.0.dev202602261352.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ragbits_cli-1.4.0.dev202602261352-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file ragbits_cli-1.4.0.dev202602261352.tar.gz.

File metadata

File hashes

Hashes for ragbits_cli-1.4.0.dev202602261352.tar.gz
Algorithm Hash digest
SHA256 d6b1e85ad901ecfb1763ec9b968593e7ea48bab4a5c9fb84fe45695a7c359d8e
MD5 f996afa4a157724571cf87db76dd0092
BLAKE2b-256 89801eac5dd71256348bfeeb6a90e06fbe4cdcf5c7372cfdfea3cffbfb7ba8f1

See more details on using hashes here.

File details

Details for the file ragbits_cli-1.4.0.dev202602261352-py3-none-any.whl.

File metadata

File hashes

Hashes for ragbits_cli-1.4.0.dev202602261352-py3-none-any.whl
Algorithm Hash digest
SHA256 77c22ced9b9b219e5e0396736990d7041c576e3f17e2ac4381e4f20d72101f92
MD5 ce3242e641d9966e703996d99116f47b
BLAKE2b-256 5ef25d023316751a7ae1bff6b23d1b4548829048c3f5850f8f0744595381770b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page