Skip to content

Commit

Permalink
Fix onFinal callback argument when a string is returned from tool cal…
Browse files Browse the repository at this point in the history
…l. (#961)
  • Loading branch information
JanMatas authored Feb 20, 2024
1 parent 29073cb commit 11048cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/streams/openai-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ function createFunctionCallTransformer(
? textEncoder.encode(formatStreamPart('text', functionResponse))
: textEncoder.encode(functionResponse),
);
aggregatedFinalCompletionResponse = functionResponse;
return;
}

Expand Down

0 comments on commit 11048cd

Please sign in to comment.