Move streamed boolean into ChatInput
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3535821. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !781 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The current architecture for streamed responses is a little bit confusing. Because we thought of LLM as AI at the beginning, the streamed response is part of the AiProviderclientBase abstract for all providers, rather then being part of the ChatInput where it belongs.</p> <p>There exists a streamedOutput on the base class that should stay there until 2.0.0, but we can already start moving it to ChatInput, to make logging and event handling easier.</p> <p>The providers will have too look at both places until 2.0.0.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add a setStreamed and getStreamed to the ChatInput.<br> Add a variable that keeps it in memory.<br> Since we have the ProviderProxy reflection class, we can there move the global streamed if someone set it, into the ChatInput.<br> Change all submodules to set and get the streamed variable from the ChatInput.</p>
issue