mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
Fix (PaLM2): Persist PaLM presets after initial message (#366)
* refactor(askGoogle.js): extract saveConvo function call to a separate function feat(askGoogle.js): add endpoint property to the conversation object refactor(handleSubmit.js): rename chatGptLabel to modelLabel in useMessageHandler function * refactor(askGoogle.js): remove unused endpointOption spread operator
This commit is contained in:
parent
4eda4542b7
commit
07fa0f39fd
2 changed files with 9 additions and 2 deletions
|
@ -119,6 +119,13 @@ const ask = async ({ text, endpointOption, parentMessageId = null, conversationI
|
|||
abortController
|
||||
});
|
||||
|
||||
await saveConvo(req.user.id, {
|
||||
...endpointOption,
|
||||
...endpointOption.modelOptions,
|
||||
conversationId,
|
||||
endpoint: 'google'
|
||||
});
|
||||
|
||||
await saveMessage(response);
|
||||
sendMessage(res, {
|
||||
title: await getConvoTitle(req.user.id, conversationId),
|
||||
|
@ -132,7 +139,7 @@ const ask = async ({ text, endpointOption, parentMessageId = null, conversationI
|
|||
if (parentMessageId == '00000000-0000-0000-0000-000000000000') {
|
||||
const title = await titleConvo({ text, response });
|
||||
await saveConvo(req.user.id, {
|
||||
conversationId: conversationId,
|
||||
conversationId,
|
||||
title
|
||||
});
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ const useMessageHandler = () => {
|
|||
currentConversation?.model ??
|
||||
endpointsConfig[endpoint]?.availableModels?.[0] ??
|
||||
'chat-bison',
|
||||
chatGptLabel: currentConversation?.chatGptLabel ?? null,
|
||||
modelLabel: currentConversation?.modelLabel ?? null,
|
||||
promptPrefix: currentConversation?.promptPrefix ?? null,
|
||||
examples: currentConversation?.examples ?? [
|
||||
{ input: { content: '' }, output: { content: '' } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue