Add finished reason to stream iterator

Created on 15 August 2025, 20 days ago

Problem/Motivation

When you are iterating the stream iterator, you might have reasons to know if its finished or if its on its last iteration. We might also be interested in knowing, why something finished.

To be able to do this, we need to be able to set a finished reason as it comes back from the stream. Currently that is not possible.

Proposed resolution

  • Add a setFinishedReason to the StreamedChatMessageIteratorInterface, that takes a string.
  • Add a getFinishedReason to the StreamedChatMessageIteratorInterface that returns null or a string.
  • Add both to the base class.
πŸ“Œ Task
Status

Active

Version

1.2

Component

AI Core module

Created by

πŸ‡©πŸ‡ͺGermany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024