refactor: allow variadic prompt and add typecheck to scripts
This commit is contained in:
parent
430e99a972
commit
3e530f2a03
2 changed files with 4 additions and 3 deletions
2
index.ts
2
index.ts
|
|
@ -72,7 +72,7 @@ async function main() {
|
|||
}
|
||||
}
|
||||
|
||||
const prompt = positionals[2] ?? "Introduce yourself.";
|
||||
const prompt = positionals.slice(2).join(" ") || "Introduce yourself.";
|
||||
convo.messages.push({ role: "user", content: prompt });
|
||||
|
||||
const { fullStream, text, totalUsage } = streamText({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue