mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
refactor: Remove verbose user message update for sydney
This commit is contained in:
parent
40e793477b
commit
dcc0ab98e1
1 changed files with 3 additions and 5 deletions
|
|
@ -114,10 +114,8 @@ const ask = async ({
|
|||
convo.conversationSignature || response.conversationSignature;
|
||||
userMessage.conversationId = response.conversationId || conversationId;
|
||||
userMessage.invocationId = response.invocationId;
|
||||
userMessage.messageId = response.parentMessageId || userMessageId;
|
||||
// Unlike gpt and bing, Sydney will never accept our given userMessage.messageId, it will generate its own one.
|
||||
if (!overrideParentMessageId)
|
||||
await saveBingMessage({ oldMessageId: userMessageId, ...userMessage });
|
||||
userMessage.messageId = response.parentMessageId || userMessageId;
|
||||
|
||||
// Save sydney response
|
||||
// response.id = response.messageId;
|
||||
|
|
@ -141,7 +139,7 @@ const ask = async ({
|
|||
// Save user message
|
||||
userMessage.conversationId = response.conversationId || conversationId;
|
||||
if (!overrideParentMessageId)
|
||||
await saveBingMessage(userMessage);
|
||||
await saveBingMessage({ oldMessageId: userMessageId, ...userMessage });
|
||||
|
||||
// Bing API will not use our conversationId at the first time,
|
||||
// so change the placeholder conversationId to the real one.
|
||||
|
|
@ -197,4 +195,4 @@ const ask = async ({
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue