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, timeoutMs: options.timeout || undefined,
onProgress: options.stream onProgress: options.stream
? (progress) => { ? (progress) => {
const { text } = progress.detail.choices[0] if (progress.delta) {
process.stdout.write(text) process.stdout.write(progress.delta)
}
} }
: undefined : undefined
}) })