Skip to content
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

Simonw's llm cli: Template usage. #62

Open
irthomasthomas opened this issue Sep 13, 2023 · 0 comments
Open

Simonw's llm cli: Template usage. #62

irthomasthomas opened this issue Sep 13, 2023 · 0 comments
Labels
llm Large Language Models prompt Collection of llm prompts and notes

Comments

@irthomasthomas
Copy link
Owner

Here are the code blocks extracted from the readme file:

llm 'Summarize this: $input' --save summarize
llm --system 'Summarize this' --save summarize
llm --system 'Summarize this' --model gpt-4 --save summarize
llm --system 'Summarize this text in the voice of $voice' \
  --model gpt-4 -p voice GlaDOS --save summarize
curl -s https://example.com/ | llm -t summarize
curl -s https://llm.datasette.io/en/latest/ | \
  llm -t summarize -m gpt-3.5-turbo-16k
llm templates
llm templates edit summarize
prompt: 'Summarize this: $input'
prompt: >
    Summarize the following text.

    Insert frequent satirical steampunk-themed illustrative anecdotes.
    Really go wild with that.

    Text to summarize: $input
curl -s 'https://til.simonwillison.net/macos/imovie-slides-and-audio' | \
  strip-tags -m | llm -t steampunk -m 4
system: Summarize this
system: You speak like an excitable Victorian adventurer  
prompt: 'Summarize this: $input'
prompt: |
    Suggest a recipe using ingredients: $ingredients

    It should be based on cuisine from this country: $country
llm -t recipe -p ingredients 'sausages, milk' -p country Germany
system: Summarize this text in the voice of $voice
curl -s 'https://til.simonwillison.net/macos/imovie-slides-and-audio' | \
  strip-tags -m | llm -t summarize -p voice GlaDOS 
system: Summarize this text in the voice of $voice
defaults:
  voice: GlaDOS
model: gpt-4
system: roast the user at every possible opportunity, be succinct
llm -t roast 'How are you today?'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llm Large Language Models prompt Collection of llm prompts and notes
Projects
None yet
Development

No branches or pull requests

1 participant