feat: expose logical conversation rounds over flat turn history
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Start in chatlas/_chat.py with get_turns(), get_last_turn(), and the partial-turn helpers, then inspect the turn types and partial_reason in chatlas/_turn.py. Review Ellmer commit 59bbe9d4 for comparison, settle the public names and semantics for tool loops and system or partial turns, and add coverage for the listed exchange and history cases without changing flat storage or provider serialization.
Written by the indexing model from the issue text.
Description
Why this matters
Chatlas stores a flat sequence of SystemTurn, UserTurn, and AssistantTurn objects. A single user request that invokes tools can span several user/assistant turns, making transcript review, UIs, and tracing consumers reconstruct the logical exchange themselves.
Ellmer added a read-only Round abstraction in tidyverse/ellmer#1056 (59bbe9d4): each round starts with input turn(s) and includes the assistant/tool-result turns that follow. Storage remains flat.
Scope
- Design and add a public, read-only Python API that groups current history into logical conversation rounds without changing how turns are stored or submitted to providers.
- Include a clear definition for tool loops, system turns, and partial assistant turns.
- Provide an ergonomic way to retrieve all rounds and the final round.
- Ensure returned round objects preserve the original turns rather than duplicating provider state.
- Add tests for ordinary exchanges, multiple tool-result cycles, system-prompt inclusion, manually supplied history where supported, and interrupted/partial responses.
Starting points
chatlas/_chat.py:get_turns(),get_last_turn(), and partial-turn helpers.chatlas/_turn.py:SystemTurn,UserTurn,AssistantTurn, andpartial_reason.Chat.get_turns(tool_result_role="assistant")already offers display-oriented collapsing, but it is not a round API.- Ellmer reference:
git -C ../ellmer show 59bbe9d4.
Non-goals
- Do not replace the flat internal history or alter provider serialization.
- Do not add mutation APIs such as
set_rounds()without a separate design decision.
Design note
This is a public API addition. Settle names, object shape, and system-turn semantics before implementation; the ellmer behavior is a useful reference, not a requirement to mirror verbatim.
- Dominant language
- Python
- Stars
- 179
- Forks
- 32
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/chatlas
-
A streaming text delta that repeats everything streamed so far is missing from the recorded turnPossibly taken @cpsievert claimed this 81 days ago. Openai-triage:done Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ai-triage:needs-review documentation
Difficulty 2/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
ai-triage:done Priority: Low
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
All issues in posit-dev/chatlas
Similar issues
-
jira: an unquoted JQL number of more than 4300 digits is a plain-text 500, where real answers 200Openfidelity
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
A JSON chat answer blocks the backend event loop for the whole RAG runPossibly taken @NopeCharon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
The-OpenROAD-Project/ORAssistant#656 ·
Maintainers usually reply within 1 day
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day