mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
chore: refactor titleConvo
This commit is contained in:
parent
a8aad30fc8
commit
a0c94715ce
5 changed files with 47 additions and 71 deletions
|
|
@ -1,15 +1,9 @@
|
|||
const express = require('express');
|
||||
const crypto = require('crypto');
|
||||
const router = express.Router();
|
||||
const { getCitations, citeText, askBing } = require('../../app/');
|
||||
const { titleConvo, getCitations, citeText, askBing } = require('../../app/');
|
||||
const { saveMessage, getConvoTitle, saveConvo } = require('../../models');
|
||||
const {
|
||||
handleError,
|
||||
sendMessage,
|
||||
createOnProgress,
|
||||
genTitle,
|
||||
handleText
|
||||
} = require('./handlers');
|
||||
const { handleError, sendMessage, createOnProgress, handleText } = require('./handlers');
|
||||
const citationRegex = /\[\^\d+?\^]/g;
|
||||
|
||||
router.post('/', async (req, res) => {
|
||||
|
|
@ -152,7 +146,7 @@ const ask = async ({
|
|||
res.end();
|
||||
|
||||
if (userParentMessageId == '00000000-0000-0000-0000-000000000000') {
|
||||
const title = await genTitle({ model, text, response });
|
||||
const title = await titleConvo({ model, text, response });
|
||||
|
||||
await saveConvo({
|
||||
conversationId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue