mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-08 02:24:24 +01:00
store all messages to mongoDB
This commit is contained in:
parent
f2003da779
commit
232a823b9b
6 changed files with 102 additions and 15 deletions
|
|
@ -6,9 +6,9 @@ const ask = async (question, progressCallback, convo) => {
|
|||
const { ChatGPTAPI } = await import('chatgpt');
|
||||
const api = new ChatGPTAPI({ apiKey: process.env.OPENAI_KEY, messageStore });
|
||||
let options = {
|
||||
onProgress: (partialRes) => {
|
||||
onProgress: async (partialRes) => {
|
||||
if (partialRes.text.length > 0) {
|
||||
progressCallback(partialRes);
|
||||
await progressCallback(partialRes);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue