mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
feat: adjust animation speed
This commit is contained in:
parent
5fc09011a6
commit
7566f73757
@ -90,17 +90,17 @@ async function* chatReplayStream(
|
||||
} as ChatEvent;
|
||||
if (chatEvent.type === "message_chunk") {
|
||||
if (!chatEvent.data.finish_reason) {
|
||||
await sleepInReplay(100 + Math.random() * 250);
|
||||
await sleepInReplay(100 + Math.random() * 175);
|
||||
}
|
||||
} else if (chatEvent.type === "tool_call_result") {
|
||||
await sleepInReplay(1500);
|
||||
await sleepInReplay(500);
|
||||
}
|
||||
yield chatEvent;
|
||||
if (chatEvent.type === "tool_call_result") {
|
||||
await sleepInReplay(800);
|
||||
} else if (chatEvent.type === "message_chunk") {
|
||||
if (chatEvent.data.role === "user") {
|
||||
await sleepInReplay(1000);
|
||||
await sleepInReplay(500);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user