Add setting for summaryTemperature

This commit is contained in:
Webifi 2023-06-18 09:28:09 -05:00
parent 4fd3303e9b
commit a574b6ff1c
3 changed files with 13 additions and 1 deletions

View File

@ -432,7 +432,7 @@ export class ChatRequest {
if (opts.streaming) scrollToMessage(summaryResponse.uuid, 150, true, true)
}
} as ChatCompletionOpts, {
temperature: 0.1, // make summary more deterministic
temperature: chatSettings.summaryTemperature, // make summary more deterministic
top_p: 1,
presence_penalty: 0,
frequency_penalty: 0,

View File

@ -78,6 +78,7 @@ const defaults:ChatSettings = {
summaryThreshold: 3000,
summarySize: 1000,
summaryExtend: 0,
summaryTemperature: 0.1,
pinTop: 0,
pinBottom: 6,
summaryPrompt: '',
@ -247,6 +248,16 @@ const summarySettings: ChatSetting[] = [
],
hide: (chatId) => getChatSettings(chatId).continuousChat !== 'summary'
},
{
key: 'summaryTemperature',
name: 'Summary Temperature',
title: 'What sampling temperature to use, between 0 and 2, when generating summary. Lower values, like 0, will be more deterministic.',
min: 0,
max: 2,
step: 0.1,
type: 'number',
hide: (chatId) => getChatSettings(chatId).continuousChat !== 'summary'
},
{
key: 'pinTop',
name: 'Keep First Prompts',

View File

@ -86,6 +86,7 @@
summaryThreshold: number;
summarySize: number;
summaryExtend: number;
summaryTemperature: number;
pinTop: number;
pinBottom: number;
summaryPrompt: string;