Skip to content

Commit

Permalink
JokePrompt -> SongPrompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwiktrammer committed Dec 3, 2024
1 parent 07d12fa commit 4ed5469
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/quickstart/quickstart1_prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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.
Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit 4ed5469

Please sign in to comment.