Skip to content

Consider run/turn-aware session history retrieval instead of item-only limit #3738

Description

@houtaroy

this issue is similar to #1385

A single user turn may produce multiple persisted items:

  1. user input
  2. function calling
  3. function calling output
  4. assistant output

conversation strategy session, with item-based limit, the retrieved history can begin in the middle of that sequence, for example including a function calling output without its corresponding function calling, or an assistant output without the user request that triggered it.

can we do:

  1. Persist a run_id / turn_id with each session item
  2. Add run_limit / turn_limit for get_items, returning complete runs messages

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions