From 4ed5469eed11b6639dbebdd026a710393cac8480 Mon Sep 17 00:00:00 2001 From: Ludwik Trammer Date: Tue, 3 Dec 2024 10:35:19 +0100 Subject: [PATCH] JokePrompt -> SongPrompt --- docs/quickstart/quickstart1_prompts.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/quickstart/quickstart1_prompts.md b/docs/quickstart/quickstart1_prompts.md index 6ddc2504..e96b363d 100644 --- a/docs/quickstart/quickstart1_prompts.md +++ b/docs/quickstart/quickstart1_prompts.md @@ -8,7 +8,7 @@ The most standard way to define a prompt in Ragbits is to create a class that in ```python from ragbits.core.prompt import Prompt -class JokePrompt(Prompt): +class SongPrompt(Prompt): user_prompt = """ Write a song about a Python library called Ragbits. """ @@ -22,13 +22,13 @@ Next, we'll learn how to make this prompt more dynamic (e.g., by adding placehol Even at this stage, you can test the prompt using the built-in `ragbits` CLI tool. To do this, you need to run the following command in your terminal: ```bash -uv run ragbits prompts exec path.within.your.project:JokePrompt +uv run ragbits prompts exec path.within.your.project:SongPrompt ``` -Where `path.within.your.project` is the path to the Python module where the prompt is defined. In the simplest case, when you are in the same directory as the file, it will be the name of the file without the `.py` extension. For example, if the prompt is defined in a file named `joke_prompt.py`, you would run: +Where `path.within.your.project` is the path to the Python module where the prompt is defined. In the simplest case, when you are in the same directory as the file, it will be the name of the file without the `.py` extension. For example, if the prompt is defined in a file named `song_prompt.py`, you would run: ```bash -uv run ragbits prompts exec joke_prompt:JokePrompt +uv run ragbits prompts exec song_prompt:SongPrompt ``` This command will send the prompt to the default Large Language Model and display the generated response in the terminal. @@ -96,10 +96,10 @@ This example illustrates how to set a system prompt and use conditional statemen Besides using the dynamic prompt in Python, you can still test it using the `ragbits` CLI tool. The only difference is that now you need to provide the values for the placeholders in the prompt in JSON format. Here's an example: ```bash -uv run ragbits prompts exec joke_prompt:SongPrompt --payload '{"subject": "unicorns", "age_group": 12, "genre": "pop"}' +uv run ragbits prompts exec song_prompt:SongPrompt --payload '{"subject": "unicorns", "age_group": 12, "genre": "pop"}' ``` -Remember to change `joke_prompt` to the name of the module where the prompt is defined and adjust the values of the placeholders to your liking. +Remember to change `song_prompt` to the name of the module where the prompt is defined and adjust the values of the placeholders to your liking. !!! tip Ragbits also comes with a built-in GUI tool called Prompts Lab that allows you to manage and interact with prompts in a more user-friendly way. To learn more about using Prompts Lab, see the how-to article [How to Manage Prompts using GUI with Prompts Lab](../how-to/prompts_lab.md).