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:
Danny Avila 2023-09-20 18:45:56 -04:00 committed by GitHub
parent d13a7b1a74
commit 1d3e336e1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 6 deletions

View file

@ -15,7 +15,7 @@ const createLanguageChain = ({ llm }) =>
});
const titleSchema = z.object({
title: z.string().describe('The title-cased title of the conversation in the given language.'),
title: z.string().describe('The conversation title in title-case, in the given language.'),
});
const createTitleChain = ({ llm, convo }) => {
const titlePrompt = createTitlePrompt({ convo });