kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
Merge pull request #504 from 189/fix/defer-save
commit
9bb7da32e4
|
@ -160,7 +160,8 @@ export class ChatGPTAPI {
|
|||
parentMessageId,
|
||||
text
|
||||
}
|
||||
await this._upsertMessage(message)
|
||||
|
||||
const latestQuestion = message
|
||||
|
||||
const { messages, maxTokens, numTokens } = await this._buildMessages(
|
||||
text,
|
||||
|
@ -313,7 +314,7 @@ export class ChatGPTAPI {
|
|||
}
|
||||
}
|
||||
|
||||
return this._upsertMessage(message).then(() => message)
|
||||
return Promise.all([ this._upsertMessage(latestQuestion), this._upsertMessage(message) ]).then(() => message)
|
||||
})
|
||||
|
||||
if (timeoutMs) {
|
||||
|
|
Ładowanie…
Reference in New Issue