lmstudio-ai / lmstudio-ai/lmstudio-python

Public history APIs should directly accept iterables of messages

Open
#21 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
875
Forks
166
PR merge metrics
No merged PRs in 30d

Description

APIs accepting history inputs, including `Chat.from_history`, currently require multi-message histories to be formatted as full chat histories (`Chat` instances, or dictionaries with a `messages` key).

These APIs should also accept iterables of messages directly, treating those iterables as if they were the `messages` list in a full chat history.

Both input dictionaries and input messages should be annotated as accepting the shorthand form of simple text user messages, assistant responses, and system prompts (where the content field is simply the text of the message rather than a dict with `type` and `text` keys).

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 Chat.from_history and inspect the other public history-input APIs and their type annotations. Compare how full histories, iterables of messages, and shorthand user, assistant, and system message forms are handled; done means each public API accepts the specified forms consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.