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
Currently prompts can only be static. Adding syntax that would evaluate an elisp statement / shell commands would allow dynamic prompting.
Potential Use Cases
Data extraction from local machine
Gives the ability to load data from a shell command, local file, ect, into the prompt without copy paste.
# prompt
Format the contents of a directory as a table of contents in markdown: (shell-command-to-string "ls")
or
# prompt
Format the contents of a directory as a table of contents in markdown: $(ls)
Prompt organization
(technically the same thing as the previous) Would allow organization of long complex prompts
# Directory structure
# TODO-1.org
# TODO-2.org
# TODO-3.org
# Prompt
You are a careful programmer. Complete all TODO instructions. First $(cat TODO-1.org), then $(cat TODO-2.org), then $(cat TODO-3.org)
>>> sgpt "format the contents of a directory as a markdown table of contents: $(ls)"
- [README.md](README.md)
- [some-file.md](some-file.md)
- [documents](documents)
The text was updated successfully, but these errors were encountered:
osheari1
changed the title
Evaluate elisp in prompts
Evaluate elisp/shell in prompts
Jun 18, 2024
Super excited about this
Another probable use case:
elisp function that reads database schema and the injects it into the prompt, "given the following DB schema \n... write SQL migration that does X"
Currently prompts can only be static. Adding syntax that would evaluate an elisp statement / shell commands would allow dynamic prompting.
Potential Use Cases
Data extraction from local machine
Gives the ability to load data from a shell command, local file, ect, into the prompt without copy paste.
or
Prompt organization
(technically the same thing as the previous) Would allow organization of long complex prompts
Example from Alternative
shell_gpt
>>> sgpt "format the contents of a directory as a markdown table of contents: $(ls)" - [README.md](README.md) - [some-file.md](some-file.md) - [documents](documents)
The text was updated successfully, but these errors were encountered: