simonw / simonw/llm

Support multiple `stop` options for OpenAI models

Open
#89 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

https://github.com/simonw/llm/blob/898418a518ddcde24a01d31b3da4d5c35890c022/llm/default_plugins/openai_models.py#L107-L110

Ideally this would duplicate the official docs:

Up to 4 sequences where the API will stop generating further tokens.

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 at llm/default_plugins/openai_models.py lines 107-110 and compare the existing stop option with the linked OpenAI Chat API documentation. Done means OpenAI model requests accept up to four stop sequences as documented; check the repository's relevant tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.