fix: cli streaming issue

pull/422/head
Travis Fischer 2023-03-01 21:50:22 -06:00
rodzic 26a16fb5c4
commit 6e256e9721
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -87,8 +87,9 @@ async function main() {
timeoutMs: options.timeout || undefined,
onProgress: options.stream
? (progress) => {
const { text } = progress.detail.choices[0]
process.stdout.write(text)
if (progress.delta) {
process.stdout.write(progress.delta)
}
}
: undefined
})