Stream assistant content to chat output
This commit is contained in:
@@ -507,11 +507,12 @@ function writeRuntimeEvent(
|
||||
});
|
||||
}
|
||||
if (event.type === "content_delta" && event.delta) {
|
||||
writer.write({
|
||||
type: "reasoning-delta",
|
||||
id: "reasoning-1",
|
||||
delta: event.delta,
|
||||
});
|
||||
if (!streamState?.textStarted) {
|
||||
writer.write({ type: "text-start", id: "text-1" });
|
||||
if (streamState) streamState.textStarted = true;
|
||||
}
|
||||
writer.write({ type: "text-delta", id: "text-1", delta: event.delta });
|
||||
if (streamState) streamState.textStreamed = true;
|
||||
}
|
||||
if (event.type === "tool_call_delta") {
|
||||
const key =
|
||||
|
||||
Reference in New Issue
Block a user