simonw / simonw/llm

Think about supporting multiple templates at once

Open
#170 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I did think about the potential for loading more than one template at one point. The idea would be to support this:

cat code.py | llm -t glados -t explain-code

This would load the glados template and the explain-code template and combine them in some way.

I wasn't sure how best to combine them though. Maybe just concatenating the prompts from both together (in the order they were specified) would make sense.

Originally posted by @simonw in https://github.com/simonw/llm/issues/131#issuecomment-1685179131

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 llm -t glados -t explain-code command described in the issue and inspect how template options are currently parsed and applied. Decide and document the combination semantics, then define tests for ordering, repeated options, and the resulting prompt before implementing the feature.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.