This commit is contained in:
GH Action - Upstream Sync
2023-07-04 01:24:28 +00:00
10 changed files with 122 additions and 69 deletions

View File

@@ -888,7 +888,8 @@ export function Chat() {
const showActions =
!isUser &&
i > 0 &&
!(message.preview || message.content.length === 0);
!(message.preview || message.content.length === 0) &&
i >= context.length; // do not show actions for context prompts
const showTyping = message.preview || message.streaming;
const shouldShowClearContextDivider = i === clearContextIndex - 1;

View File

@@ -48,6 +48,25 @@ export function ModelConfigList(props: {
}}
></InputRange>
</ListItem>
<ListItem
title={Locale.Settings.TopP.Title}
subTitle={Locale.Settings.TopP.SubTitle}
>
<InputRange
value={(props.modelConfig.top_p ?? 1).toFixed(1)}
min="0"
max="1"
step="0.1"
onChange={(e) => {
props.updateConfig(
(config) =>
(config.temperature = ModalConfigValidator.top_p(
e.currentTarget.valueAsNumber,
)),
);
}}
></InputRange>
</ListItem>
<ListItem
title={Locale.Settings.MaxTokens.Title}
subTitle={Locale.Settings.MaxTokens.SubTitle}