MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / formatRawStream

Function formatRawStream

demo/chat/App.tsx:35–43  ·  view source on GitHub ↗
(reasoning: string, content: string)

Source from the content-addressed store, hash-verified

33import { replayStream } from "./stream-replay";
34
35function formatRawStream(reasoning: string, content: string): string {
36 if (reasoning && content) {
37 return `[thinking]\n${reasoning}\n\n[content]\n${content}`;
38 }
39 if (reasoning) {
40 return `[thinking]\n${reasoning}`;
41 }
42 return content;
43}
44
45async function streamChat(
46 messages: { role: string; content: string }[],

Callers 1

ChatAppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected