feat: use comark for final output
This commit is contained in:
parent
c1e03f2464
commit
8a23cf4d42
4 changed files with 169 additions and 11 deletions
4
index.ts
4
index.ts
|
|
@ -79,7 +79,7 @@ async function main() {
|
|||
const prompt = positionals[2] ?? "Introduce yourself.";
|
||||
convo.messages.push({ role: "user", content: prompt });
|
||||
|
||||
const { fullStream, textStream, text, totalUsage } = streamText({
|
||||
const { fullStream, text, totalUsage } = streamText({
|
||||
model: provider(convo.model),
|
||||
messages: convo.messages,
|
||||
});
|
||||
|
|
@ -91,7 +91,7 @@ async function main() {
|
|||
convo.messages.push({ role: "assistant", content: await text });
|
||||
await convoFile.write(JSON.stringify(convo));
|
||||
|
||||
await renderer.renderFinal(textStream);
|
||||
await renderer.renderFinal(text);
|
||||
|
||||
await renderer.renderStats(totalUsage, start, stop);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue