Add setting for summaryTemperature
This commit is contained in:
		
							parent
							
								
									4fd3303e9b
								
							
						
					
					
						commit
						a574b6ff1c
					
				| 
						 | 
					@ -432,7 +432,7 @@ export class ChatRequest {
 | 
				
			||||||
                  if (opts.streaming) scrollToMessage(summaryResponse.uuid, 150, true, true)
 | 
					                  if (opts.streaming) scrollToMessage(summaryResponse.uuid, 150, true, true)
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              } as ChatCompletionOpts, {
 | 
					              } as ChatCompletionOpts, {
 | 
				
			||||||
                temperature: 0.1, // make summary more deterministic
 | 
					                temperature: chatSettings.summaryTemperature, // make summary more deterministic
 | 
				
			||||||
                top_p: 1,
 | 
					                top_p: 1,
 | 
				
			||||||
                presence_penalty: 0,
 | 
					                presence_penalty: 0,
 | 
				
			||||||
                frequency_penalty: 0,
 | 
					                frequency_penalty: 0,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,6 +78,7 @@ const defaults:ChatSettings = {
 | 
				
			||||||
  summaryThreshold: 3000,
 | 
					  summaryThreshold: 3000,
 | 
				
			||||||
  summarySize: 1000,
 | 
					  summarySize: 1000,
 | 
				
			||||||
  summaryExtend: 0,
 | 
					  summaryExtend: 0,
 | 
				
			||||||
 | 
					  summaryTemperature: 0.1,
 | 
				
			||||||
  pinTop: 0,
 | 
					  pinTop: 0,
 | 
				
			||||||
  pinBottom: 6,
 | 
					  pinBottom: 6,
 | 
				
			||||||
  summaryPrompt: '',
 | 
					  summaryPrompt: '',
 | 
				
			||||||
| 
						 | 
					@ -247,6 +248,16 @@ const summarySettings: ChatSetting[] = [
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        hide: (chatId) => getChatSettings(chatId).continuousChat !== 'summary'
 | 
					        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',
 | 
					        key: 'pinTop',
 | 
				
			||||||
        name: 'Keep First Prompts',
 | 
					        name: 'Keep First Prompts',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,6 +86,7 @@
 | 
				
			||||||
    summaryThreshold: number;
 | 
					    summaryThreshold: number;
 | 
				
			||||||
    summarySize: number;
 | 
					    summarySize: number;
 | 
				
			||||||
    summaryExtend: number;
 | 
					    summaryExtend: number;
 | 
				
			||||||
 | 
					    summaryTemperature: number;
 | 
				
			||||||
    pinTop: number;
 | 
					    pinTop: number;
 | 
				
			||||||
    pinBottom: number;
 | 
					    pinBottom: number;
 | 
				
			||||||
    summaryPrompt: string;
 | 
					    summaryPrompt: string;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue