4 ms·
I just released a new version of my LLM CLI tool with support for the new GPT-4 Turbo model: https://llm.datasette.io/en/stable/changelog.html#v0-12 https://llm
by simonw 3y ago
I just released a new version of my LLM CLI tool with support for the new GPT-4 Turbo model: https://llm.datasette.io/en/stable/changelog.html#v0-12 https://llm.datasette.io/en/stable/changelog.html#v0-12
You can install it like this:
pipx install llm
Then set an API key:
llm keys set openai
<paste key here>
Then run a prompt through GPT-4 Turbo like this:
llm -m gpt-4-turbo "Ten great names for a pet walrus"
# Or a shortcut:
llm -m 4t "Ten great names for a pet walrus"
Here's a one-liner that summarizes all of the comments in this Hacker News conversation (taking advantage of the new long context length):
curl -s "https://hn.algolia.com/api/v1/items/38166420" | \
jq -r 'recurse(.children[]) | .author + ": " + .text' | \
llm -m gpt-4-turbo 'Summarize the themes of the opinions expressed here,
including direct quotes in quote markers (with author attribution) for each theme.
Fix HTML entities. Output markdown. Go long.'
Example output here: https://gist.github.com/simonw/d50c8634320d339bd88f0ef17dea0a03 https://gist.github.com/simonw/d50c8634320d339bd88f0ef17dea0...
- deleted 3y ago[deleted]
- eurekin 3y agoGreat tool and example! Makes me wonder, what one can do more with it
- airtonix 3y ago[dead]
- Michelangelo11 3y agoJesus. Yeah, considering the input size, this is a pretty good sign that the 128k context window is working decently well.