Merge pull request #169 from Webifi/main

Fix issue #168
This commit is contained in:
Niek van der Maas 2023-06-12 14:52:46 +02:00 committed by GitHub
commit 63432f4c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -36,13 +36,13 @@
let defaultModel:Model
onMount(() => {
original = message.content
defaultModel = chatSettings.model
})
const edit = () => {
if (message.summarized || message.streaming) return
if (message.summarized || message.streaming || editing) return
editing = true
original = message.content
setTimeout(() => {
const el = document.getElementById('edit-' + message.uuid)
el && el.focus()
@ -73,6 +73,7 @@
const keydown = (event:KeyboardEvent) => {
if (event.key === 'Escape') {
if (!editing) return
event.stopPropagation()
event.preventDefault()
message.content = original

View File

@ -60,7 +60,7 @@ const gptDefaults = {
n: 1,
stream: true,
stop: null,
max_tokens: 512,
max_tokens: 500,
presence_penalty: 0,
frequency_penalty: 0,
logit_bias: null,
@ -222,7 +222,7 @@ const summarySettings: ChatSetting[] = [
name: 'Max Summary Size',
title: 'Maximum number of tokens allowed for summary response.',
min: 128,
max: 2048,
max: 512,
step: 1,
type: 'number',
hide: (chatId) => getChatSettings(chatId).continuousChat !== 'summary'