mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
refactor(askOpenAI.js): rename gptResponse to response, fixes titling error
This commit is contained in:
parent
56e02f4968
commit
3ab9b7f736
1 changed files with 2 additions and 2 deletions
|
|
@ -133,7 +133,7 @@ const ask = async ({
|
||||||
userMessage.conversationId = conversationId;
|
userMessage.conversationId = conversationId;
|
||||||
userMessage.messageId = responseMessage.parentMessageId;
|
userMessage.messageId = responseMessage.parentMessageId;
|
||||||
|
|
||||||
// If gptResponse has parentMessageId, the fake userMessage.messageId should be updated to the real one.
|
// If response has parentMessageId, the fake userMessage.messageId should be updated to the real one.
|
||||||
if (!overrideParentMessageId) {
|
if (!overrideParentMessageId) {
|
||||||
const oldUserMessageId = userMessageId;
|
const oldUserMessageId = userMessageId;
|
||||||
await saveMessage({ ...userMessage, messageId: oldUserMessageId, newMessageId: userMessage.messageId });
|
await saveMessage({ ...userMessage, messageId: oldUserMessageId, newMessageId: userMessage.messageId });
|
||||||
|
|
@ -150,7 +150,7 @@ const ask = async ({
|
||||||
res.end();
|
res.end();
|
||||||
|
|
||||||
if (userParentMessageId == '00000000-0000-0000-0000-000000000000') {
|
if (userParentMessageId == '00000000-0000-0000-0000-000000000000') {
|
||||||
const title = await titleConvo({ endpoint: endpointOption?.endpoint, text, response: gptResponse });
|
const title = await titleConvo({ endpoint: endpointOption?.endpoint, text, response });
|
||||||
await updateConvo(req?.session?.user?.username, {
|
await updateConvo(req?.session?.user?.username, {
|
||||||
conversationId: conversationId,
|
conversationId: conversationId,
|
||||||
title
|
title
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue