Stream the tool calling rounds of the Anthropic messages API

This commit is contained in:
Thorsten Sommer committed 2026-09-20 10:03:20 +02:00
1 parent f951bedcc8
commit 1be0a6bfc3
9 files changed
+485 -35

No files matched your search

@@ -0,0 +1,12 @@
using System.Text.Json;
namespace AIStudio.Provider.Anthropic;
/// <summary>
/// One line of a streamed Anthropic messages call.
/// </summary>
/// <param name="Type">The kind of event this line reports.</param>
/// <param name="Index">Which content block the event belongs to; blocks are correlated by it.</param>
/// <param name="ContentBlock">The block as it opens, for a content block start.</param>
/// <param name="Delta">The piece this event adds, for a content block delta or a message delta.</param>
public readonly record struct AnthropicStreamLine(string? Type, int Index, JsonElement ContentBlock, AnthropicStreamDelta Delta);