fix zukijourney api (?) (#305)

This commit is contained in:
end-4
2024-03-05 22:46:07 +07:00
parent 4ba07f6bbe
commit 689b16b90a
+2 -2
View File
@@ -248,8 +248,6 @@ class GPTService extends Service {
this._messages.push(new GPTMessage('user', msg)); this._messages.push(new GPTMessage('user', msg));
this.emit('newMsg', this._messages.length - 1); this.emit('newMsg', this._messages.length - 1);
const aiResponse = new GPTMessage('assistant', 'thinking...', true, false) const aiResponse = new GPTMessage('assistant', 'thinking...', true, false)
this._messages.push(aiResponse);
this.emit('newMsg', this._messages.length - 1);
const body = { const body = {
model: CHAT_MODELS[this._modelIndex], model: CHAT_MODELS[this._modelIndex],
@@ -274,6 +272,8 @@ class GPTService extends Service {
base_stream: stream base_stream: stream
}), aiResponse); }), aiResponse);
}); });
this._messages.push(aiResponse);
this.emit('newMsg', this._messages.length - 1);
if (this._cycleModels) { if (this._cycleModels) {
this._requestCount++; this._requestCount++;