File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export class Stream<Item> extends CoreStream<Item> {
47
47
for await ( const event of eventStream ) {
48
48
if ( event . chunk && event . chunk . bytes ) {
49
49
const s = toUtf8 ( event . chunk . bytes ) ;
50
- yield { event : 'completion ' , data : s , raw : [ ] } ;
50
+ yield { event : 'chunk ' , data : s , raw : [ ] } ;
51
51
} else if ( event . internalServerException ) {
52
52
yield { event : 'error' , data : 'InternalServerException' , raw : [ ] } ;
53
53
} else if ( event . modelStreamErrorException ) {
@@ -69,7 +69,7 @@ export class Stream<Item> extends CoreStream<Item> {
69
69
let done = false ;
70
70
try {
71
71
for await ( const sse of iterMessages ( ) ) {
72
- if ( sse . event === 'completion ' ) {
72
+ if ( sse . event === 'chunk ' ) {
73
73
try {
74
74
yield JSON . parse ( sse . data ) ;
75
75
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments