From 58d94818b4a16c0926d7c5b1e1ca7d1ef48ca552 Mon Sep 17 00:00:00 2001 From: Yanyutin753 <3254822118@qq.com> Date: Fri, 8 Mar 2024 00:16:28 +0800 Subject: [PATCH] feat base64 or url --- app/components/model-config.tsx | 65 +++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx index e46a018..da3a90e 100644 --- a/app/components/model-config.tsx +++ b/app/components/model-config.tsx @@ -19,9 +19,9 @@ export function ModelConfigList(props: { onChange={(e) => { props.updateConfig( (config) => - (config.model = ModalConfigValidator.model( - e.currentTarget.value, - )), + (config.model = ModalConfigValidator.model( + e.currentTarget.value, + )), ); }} > @@ -46,9 +46,9 @@ export function ModelConfigList(props: { onChange={(e) => { props.updateConfig( (config) => - (config.temperature = ModalConfigValidator.temperature( - e.currentTarget.valueAsNumber, - )), + (config.temperature = ModalConfigValidator.temperature( + e.currentTarget.valueAsNumber, + )), ); }} > @@ -65,9 +65,9 @@ export function ModelConfigList(props: { onChange={(e) => { props.updateConfig( (config) => - (config.top_p = ModalConfigValidator.top_p( - e.currentTarget.valueAsNumber, - )), + (config.top_p = ModalConfigValidator.top_p( + e.currentTarget.valueAsNumber, + )), ); }} > @@ -84,9 +84,9 @@ export function ModelConfigList(props: { onChange={(e) => props.updateConfig( (config) => - (config.max_tokens = ModalConfigValidator.max_tokens( - e.currentTarget.valueAsNumber, - )), + (config.max_tokens = ModalConfigValidator.max_tokens( + e.currentTarget.valueAsNumber, + )), ) } > @@ -106,10 +106,10 @@ export function ModelConfigList(props: { onChange={(e) => { props.updateConfig( (config) => - (config.presence_penalty = - ModalConfigValidator.presence_penalty( - e.currentTarget.valueAsNumber, - )), + (config.presence_penalty = + ModalConfigValidator.presence_penalty( + e.currentTarget.valueAsNumber, + )), ); }} > @@ -127,10 +127,10 @@ export function ModelConfigList(props: { onChange={(e) => { props.updateConfig( (config) => - (config.frequency_penalty = - ModalConfigValidator.frequency_penalty( - e.currentTarget.valueAsNumber, - )), + (config.frequency_penalty = + ModalConfigValidator.frequency_penalty( + e.currentTarget.valueAsNumber, + )), ); }} > @@ -146,8 +146,8 @@ export function ModelConfigList(props: { onChange={(e) => props.updateConfig( (config) => - (config.enableInjectSystemPrompts = - e.currentTarget.checked), + (config.enableInjectSystemPrompts = + e.currentTarget.checked), ) } > @@ -199,8 +199,8 @@ export function ModelConfigList(props: { onChange={(e) => props.updateConfig( (config) => - (config.compressMessageLengthThreshold = - e.currentTarget.valueAsNumber), + (config.compressMessageLengthThreshold = + e.currentTarget.valueAsNumber), ) } > @@ -216,6 +216,23 @@ export function ModelConfigList(props: { } > + + + + props.updateConfig( + (config) => + (config.updateTypes = + e.currentTarget.checked), + ) + } + > + ); }