The llm
command can be installed from the repo https://github.com/simonw/llm
$ pip install llm
or
$ brew install llm
then
$ lm keys set openai
# from NahamSec video at https://www.youtube.com/watch?v=qTuXcAJ_WKc&t=429s | |
wl2(){ | |
message=`cat` | |
echo $message | |
echo -n $message | llm -s 'Based on the input word list from an application, continue the list with the most likely words, paths, or parameters (whatever is passed in by the user). Put one new word on each new line. Do not number the output. Do not say anything before or after the list. Do not use bullets. This is being used in production and it might break the system.' -o temperature .4 -o presence_penalty .2 -m 4t | |
} | |
comment(){ | |
llm -s 'Add comments to this code. Respond with the code and comments. Do not alter the functional aspect of the code, but still return it. Be sure and include the code in the response. Do not respond in a markdown code block. Just respond with the code and comments. Do not preamble or say anything before or after the code. for example: If the user sent "print(1)\nprint(2)", you would reply "# Prints 1\nprint(1)\n# Prints 2\nprint(2)"' -o temperature .2 | |
} | |
finish(){ | |
message=`cat` | |
echo -n $message | |
echo -n $message | llm -s 'Finish this input. Respond with only the completion text. Do not respond with the input. Do not preamble or say anything before or after the completion. For example: If the user sent "The sky is", you would simply reply " blue." If the input is code write quality code that is syntactically correct. If the input is text, respond as a succinct writer such as Paul Graham, but only use high school term paper vocabulary or lower.' -o temperature .4 -o presence_penalty .2 -m 4t | |
} |
The llm
command can be installed from the repo https://github.com/simonw/llm
$ pip install llm
or
$ brew install llm
then
$ lm keys set openai