Skip to content

Commit 9a0a110

Browse files
seonglaexenova
andauthored
fix: streaming example from @xenova's suggestion
Co-authored-by: Joshua Lochner <admin@xenova.com>
1 parent e0773ec commit 9a0a110

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/source/pipelines.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ const messages = [
171171
// Create text streamer
172172
const streamer = new TextStreamer(generator.tokenizer, {
173173
skip_prompt: true,
174-
callback_function: (text) => process.stdout.write(text), // Stream to command line
174+
// Optionally, do something with the text (e.g., write to a textbox)
175+
// callback_function: (text) => { /* Do something with text */ },
175176
})
176177

177178
// Generate a response

0 commit comments

Comments
 (0)