Skip to content

Commit

Permalink
refcator clip and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Apr 20, 2024
1 parent 5abb31e commit 193f793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions GPT/gpt.talon
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model <user.modelPrompt> [this]$:
user.paste(result)

# Runs a model prompt on the selected text and sets the result to the clipboard
model clip <user.modelPrompt> [this]$:
model <user.modelPrompt> [this] (then | and) (clip | copy) [it]$:
text = edit.selected_text()
result = user.gpt_apply_prompt(modelPrompt, text)
clip.set_text(result)
Expand All @@ -37,7 +37,7 @@ model apply [from] clip$:
user.paste(result)

# Shows the list of available prompts
model help$: user.gpt_help()
model help$: user.gpt_help()

# Reformat the last dictation with additional context or formatting instructions
model [nope] that was <user.text>$:
Expand Down
5 changes: 3 additions & 2 deletions GPT/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ Query language models with voice commands. Helpful to automatically generate tex

| Command | Description | Example |
| ------------------------------------------------------------- | -------------------------------------------------------------------- | --------------------------------------------- |
| `model ask <text>` | Ask a question to the model | "model ask what is the meaning of life" |
| `model <prompt>` | Generate text from a prompt and paste it | "model summarize" |
| `model clip <prompt>` | Generate text from a prompt and set it on the clipboard | "model clip summarize" |
| `model help` | Show the help menu with all the prompts | "model help" |
| `model please <text>` | Say an arbitrary prompt and then apply it | "model please translate this to Japanese" |
| `model ask <text>` | Ask a question to the model | "model ask what is the meaning of life" |
| `model <prompt> <cursorless_target> <cursorless_destination>` | Select with cursorless, apply a prompt, and paste to the destination | "model explain line this after block red air" |
| `model <prompt> then select it` | Apply a prompt and then select the result | "model format grammar then select it" |
| `model <prompt> then clip it` | Apply a prompt and return the result in the clipboard | "model format grammar then clip it" |

## Help

Expand Down

0 comments on commit 193f793

Please sign in to comment.