You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-49Lines changed: 30 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Promptlab is a utility for managing common activities when processing large amou
7
7
- Filter out blocks of text. For example, you might only want to process one chapter in a book.
8
8
- Apply templated prompts to your blocks and send them to an LLM. You can use metadata in your prompts to make them more dynamic. For example, you might have a metadata file with keys like `title`, `author`, and `topic`. You can include these keys in your prompt templates.
9
9
10
-
Propmptlab helps you massage text into blocks that can be fed into an LLM using a [Jinja](https://jinja.palletsprojects.com/) template. This template contains the text of your prompt, along with variables that get passed in from the block. For example, you might have a template like this with three variables -- a topic, a title, an authos, and a block of text:
10
+
Propmptlab helps you massage text into smaller blocks that can be fed into an LLM using a [Jinja](https://jinja.palletsprojects.com/) template. This template contains the text of your prompt, along with variables that get passed in from the block. For example, you might have a template like this with three variables -- a topic, a title, an authos, and a block of text:
11
11
12
12
```
13
13
You are a technical instructional designer who is reviewing
@@ -20,21 +20,21 @@ markdown format for you to use summarize:
20
20
21
21
You supply the metadata in a YAML file, like this:
22
22
23
-
```
23
+
```yml
24
24
title: Fooing the Bar
25
25
topic: Python Programming
26
26
author: A. N. Other
27
27
```
28
28
29
29
When you run the `prompt` command in Promptlab, a block of text and the metadata is passed into the template:
30
30
31
-
```
31
+
```jinja
32
32
You are a technical instructional designer who is reviewing
33
33
a book about Python Programming called Fooing the Bar by A. N. Other.
34
34
Your job is to summarize the key points in each section. Here is
35
35
some text in markdown format for you to use summarize:
36
36
37
-
<A BLOCK OF TEXT FROM PROMPTLAB>
37
+
<BLOCK OF TEXT>
38
38
```
39
39
40
40
This fully rendered text is sent to an LLM for completion. The process is repeated for the other blocks of content until all the sections you select are processed. You can then convert these resposes into new blocks or metadata, or just dump them out an save them in a file.
@@ -75,11 +75,10 @@ Promptlab has the following commands:
75
75
- `set-group`-- set the current group
76
76
- `prompt`-- generate prompts from a set of blocks based on metadata and a template
77
77
- `prompts`-- list all prompts
78
-
-`transfer-prompts`
79
-
-`merge-prompts-into-block`
80
-
-`version`
81
-
-`set-api-key`
82
-
-`dump`
78
+
- `transfer-prompts`-- convert prompts into blocks or metadata
79
+
- `version`- show the version of the software
80
+
- `set-api-key`- set the api key used for the LLM
81
+
- `dump`- write blocks or prompts to standard output
83
82
84
83
## `init`
85
84
@@ -352,45 +351,51 @@ Transfer prompts to metadata:
First, be sure you're set up to run pyinstaller by reading [Build an executable with pyinstaller](http://www.gregreda.com/2023/05/18/notes-on-using-pyinstaller-poetry-and-pyenv/). This is another good [tutorial on pyinstaller](https://www.devdungeon.com/content/pyinstaller-tutorial).
398
+
First, be sure you're set up to run pyinstaller by reading [Build an executable with pyinstaller](http://www.gregreda.com/2023/05/18/notes-on-using-pyinstaller-poetry-and-pyenv/). This is another good [tutorial on pyinstaller](https://www.devdungeon.com/content/pyinstaller-tutorial). It took a bit of finagling to make this work, so YMMV.
394
399
395
400
From the root directory, run the following command:
0 commit comments