mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-02 06:10:18 +01:00
feat: Add Option to Disable Titling, Config Titling Model, and Title Prompt Improvements (#977)
* feat: add option to disable titling as well as decide what model to use for OpenAI titling refactor: truncate conversation text so it caps around 200 tokens for titling requests, optimize some of the title prompts * feat: disable bing titling with TITLE_CONVO as well
This commit is contained in:
parent
d13a7b1a74
commit
1d3e336e1c
8 changed files with 43 additions and 6 deletions
|
|
@ -1,7 +1,13 @@
|
|||
const { isEnabled } = require('../server/utils');
|
||||
const throttle = require('lodash/throttle');
|
||||
|
||||
const titleConvo = async ({ text, response }) => {
|
||||
let title = 'New Chat';
|
||||
const { TITLE_CONVO = 'true' } = process.env ?? {};
|
||||
if (!isEnabled(TITLE_CONVO)) {
|
||||
return title;
|
||||
}
|
||||
|
||||
const { BingAIClient } = await import('@waylaidwanderer/chatgpt-api');
|
||||
const titleGenerator = new BingAIClient({
|
||||
userToken: process.env.BINGAI_TOKEN,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue