From e0f8b980dd12d9ab21dc45bd8203ab6faddecf91 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:46:07 +0700 Subject: [PATCH] fix zukijourney api (?) (#305) --- .config/ags/services/gpt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/ags/services/gpt.js b/.config/ags/services/gpt.js index 5d48e67be..d0cc8ac15 100644 --- a/.config/ags/services/gpt.js +++ b/.config/ags/services/gpt.js @@ -248,8 +248,6 @@ class GPTService extends Service { this._messages.push(new GPTMessage('user', msg)); this.emit('newMsg', this._messages.length - 1); const aiResponse = new GPTMessage('assistant', 'thinking...', true, false) - this._messages.push(aiResponse); - this.emit('newMsg', this._messages.length - 1); const body = { model: CHAT_MODELS[this._modelIndex], @@ -274,6 +272,8 @@ class GPTService extends Service { base_stream: stream }), aiResponse); }); + this._messages.push(aiResponse); + this.emit('newMsg', this._messages.length - 1); if (this._cycleModels) { this._requestCount++;