mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
fix: add PaLM icon as SVG and improve meilisearch syncing to prevent large indicing jobs (#600)
* feat(getIcon.jsx): replace palm.png with google-palm.svg as the icon for the 'google' endpoint * fix(mongoMeili): improve syncing, prevent large indicing jobs from being queued fix(gptPlugins.js, openAI.js): use unfinished and cancelled values when saving messages to help optimize syncing
This commit is contained in:
parent
2607f157d3
commit
9eefa3e24c
7 changed files with 127 additions and 24 deletions
|
|
@ -71,7 +71,7 @@ class BaseClient {
|
|||
};
|
||||
}
|
||||
|
||||
createUserMessage({ messageId, parentMessageId, conversationId, text}) {
|
||||
createUserMessage({ messageId, parentMessageId, conversationId, text }) {
|
||||
const userMessage = {
|
||||
messageId,
|
||||
parentMessageId,
|
||||
|
|
@ -293,7 +293,7 @@ class BaseClient {
|
|||
};
|
||||
}
|
||||
|
||||
async handleContextStrategy({instructions, orderedMessages, formattedMessages}) {
|
||||
async handleContextStrategy({ instructions, orderedMessages, formattedMessages }) {
|
||||
let payload = this.addInstructions(formattedMessages, instructions);
|
||||
let orderedWithInstructions = this.addInstructions(orderedMessages, instructions);
|
||||
let {
|
||||
|
|
@ -350,7 +350,7 @@ class BaseClient {
|
|||
}
|
||||
|
||||
if (index === refineIndex) {
|
||||
map.refined = { ...refinedMessage, messageId: message.messageId};
|
||||
map.refined = { ...refinedMessage, messageId: message.messageId };
|
||||
}
|
||||
|
||||
map[message.messageId] = payload[index].tokenCount;
|
||||
|
|
@ -457,7 +457,7 @@ class BaseClient {
|
|||
}
|
||||
|
||||
async saveMessageToDatabase(message, endpointOptions, user = null) {
|
||||
await saveMessage({ ...message, unfinished: false });
|
||||
await saveMessage({ ...message, unfinished: false, cancelled: false });
|
||||
await saveConvo(user, {
|
||||
conversationId: message.conversationId,
|
||||
endpoint: this.options.endpoint,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue