simonw / simonw/llm

Templates still require input argument, params alone not enough like docs suggest

Open
#684 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

I've been following the docs here https://llm.datasette.io/en/stable/templates.html and for me the following hangs:

llm -t recipe -p ingredients 'sausages, milk' -p country Germany

but adding an extra "input" at the end works fine:

llm -t recipe -p ingredients 'sausages, milk' -p country Germany "dinner"

I believe this is due to the fact that a prompt is still waited on from stdin. I am not sure if that is the intended behaviour but the docs suggest that the prompt defined in the template should be sufficient but it's not so perhaps just a small clarification is needed in the docs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the templates documentation linked in the issue and reproduce both command examples to confirm whether stdin is still expected when only template parameters are supplied. Clarify the intended behavior, then update the relevant documentation so the required command form and the role of the template prompt are unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.