🪙 fix: Streaming Response Token Issue (#3323)

* chore: use NEW_CONVO constant

* fix: token object assign issue
This commit is contained in:
Danny Avila 2024-07-10 23:41:21 -04:00 committed by GitHub
parent 326069d7a6
commit 5ef71a7a36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 5 additions and 7 deletions

View file

@ -19,8 +19,7 @@ const createOnProgress = ({ generation = '', onProgress: _onProgress }) => {
const basePayload = Object.assign({}, base, { text: tokens || '' });
const progressCallback = (partial, { res, text, ...rest }) => {
let chunk = partial === text ? '' : partial;
const progressCallback = (chunk, { res, ...rest }) => {
basePayload.text = basePayload.text + chunk;
const payload = Object.assign({}, basePayload, rest);