mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-13 05:58:51 +01:00
⏭️ fix: Skip Title Generation for Temporary Chats (#11282)
* Not generating titles for temporary chats * Minor linter fix to prettify debug line * Adding a test for skipping title generation for temporary chats
This commit is contained in:
parent
7d38047bc2
commit
083251508e
4 changed files with 37 additions and 0 deletions
|
|
@ -17,6 +17,11 @@ const addTitle = async (req, { text, response, client }) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Skip title generation for temporary conversations
|
||||
if (req?.body?.isTemporary) {
|
||||
return;
|
||||
}
|
||||
|
||||
const titleCache = getLogStores(CacheKeys.GEN_TITLE);
|
||||
const key = `${req.user.id}-${response.conversationId}`;
|
||||
/** @type {NodeJS.Timeout} */
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ const addTitle = async (req, { text, responseText, conversationId }) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Skip title generation for temporary conversations
|
||||
if (req?.body?.isTemporary) {
|
||||
return;
|
||||
}
|
||||
|
||||
const titleCache = getLogStores(CacheKeys.GEN_TITLE);
|
||||
const key = `${req.user.id}-${conversationId}`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue