Stream the answers again whenever tools are in play (#986)
Build and Release / Determine run mode (push) Has been cancelled
Build and Release / Verify (push) Has been cancelled
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Sync Flatpak repo (push) Has been cancelled
Build and Release / Collect Flatpak artifacts (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-09-20 10:44:33 +02:00
1 parent 459165f1be
commit c95cc5bacc
37 files changed
+2301 -329

No files matched your search

@@ -14,8 +14,14 @@ namespace AIStudio.Tools.ToolCallingSystem.Harness;
public interface IToolCallingProviderAdapter
{
/// <summary>
/// Executes one non-streamed round and returns what the model answered.
/// Executes one round and streams what the model answers.
/// </summary>
/// <remarks>
/// Every piece of text the model writes travels as a TEXT_DELTA event, including the text it
/// writes before it calls a tool. The round's outcome carries that text as well, but only so
/// that the loop can tell an answered round from a silent one -- whatever reaches the user
/// reaches them through the deltas, and through them only.
/// </remarks>
/// <param name="finalResponseInstruction">
/// When set, the instruction telling the model that no more tools are available. The adapter
/// appends it to the system prompt for this round only.
@@ -23,10 +29,12 @@ public interface IToolCallingProviderAdapter
/// <param name="includeTools">Whether the tools may be offered in this round.</param>
/// <param name="token">The cancellation token.</param>
/// <returns>
/// The round's outcome, or null when the request failed. Null ends the loop without an error
/// message because the adapter has already told the user what went wrong.
/// The events of this round: any number of TEXT_DELTA events, closed by one ROUND_COMPLETED
/// event carrying the outcome. A stream which ends without that closing event is a failed
/// round; it ends the loop without an error message because the adapter has already told the
/// user what went wrong.
/// </returns>
public Task<ToolCallingRound?> ExecuteRoundAsync(string? finalResponseInstruction, bool includeTools, CancellationToken token = default);
public IAsyncEnumerable<ToolCallingStreamEvent> ExecuteRoundAsync(string? finalResponseInstruction, bool includeTools, CancellationToken token = default);
/// <summary>
/// Records the model's turn from the round just executed, so that the next round sees it.