mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 06:49:54 +08:00
12 lines
364 B
TypeScript
12 lines
364 B
TypeScript
import type { StreamEvent } from "@/lib/unified-ws";
|
|
|
|
export function shouldAppendEventContent(event: StreamEvent): boolean {
|
|
if (event.type !== "content") return false;
|
|
const metadata = (event.metadata ?? {}) as {
|
|
call_id?: string;
|
|
call_kind?: string;
|
|
};
|
|
if (!metadata.call_id) return true;
|
|
return metadata.call_kind === "llm_final_response";
|
|
}
|