New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saved Prompt Management #125
Comments
Hi, your script is really cool! We just released our initial support for saved conversations in v1.0.0. I think we can think about templating prompts somehow eventually so will leave this issue open for discussion. |
I'm not sure if I fully understand the feature you just described, but I believe I grasped some of it. Allow me to explain how I've been utilizing this approach and how it benefits me: I've also set up a cat ~/prompts/example.txt | mods This allows me to create a new conversation based on my prompt, which I can run whenever needed, saving me the time and effort of typing the same thing over and over again. I believe that mods could implement a feature like this, where this option is expected by default, allowing me to interactively choose between the prompts that I have saved in the prompts folder. |
That is a valid simple approach. Now consider what happens when when you Now lets suppose that you create your prompt with substitutable parameters. Before the prompt is sent to What my
I like |
just merged the ability to create roles and use them... it's not prompt templates, but I think it might solve a good part of the problem let me know what you think! |
I really like the work you have done on
mods
A new feature set that I found to be very helpful is saved parameterized prompt management. I wrote a Ruby script to see just how nice this kind of prompt management would be as a wrapper aroundmods
I think it works out pretty nicely. It would be great ifmods
implemented this same kind of stuff that my Ruby wrapper does.You can see my Ruby wrapper at https://github.com/MadBomber/scripts/blob/master/aip.rb
I define a keyword (a parameter) within a prompt as any UPPER case text within square brackets. This is a [KEYWORD OR PHRASE] in a prompt.
Prompts are saved in my $HOME directory within the ~/.prompts directory. Prompts are text files. Any line in the text file that begins with a "#" character is considered a comment and is not included in the raw prompt that is sent to
mods
.Each prompt when evaluated has its keywords replaced with input from the user. This input is saved in a JSON file with the same name as the prompt. If the user runs the prompt again, that JSON file is used as default values for each of the keywords. When the user just hits return on a keyword query, the default shown in (default) parentheses is taken as the value.
An advantage of saving these parameterized prompts in a common directory is that you can make that a git repository and version control your prompts.
The text was updated successfully, but these errors were encountered: