add options to enable/disable presence/frequency penalty

This commit is contained in:
2025-01-21 05:31:37 +08:00
parent 1146d514d3
commit 3151fb8477
4 changed files with 39 additions and 4 deletions

View File

@@ -406,6 +406,30 @@ const Number = (props: {
}}
/>
)}
{props.field === "presence_penalty" && (
<Checkbox
checked={chatStore.presence_penalty_enabled}
onCheckedChange={() => {
const newChatStore = { ...chatStore };
newChatStore.presence_penalty_enabled =
!newChatStore.presence_penalty_enabled;
setChatStore({ ...newChatStore });
}}
/>
)}
{props.field === "frequency_penalty" && (
<Checkbox
checked={chatStore.frequency_penalty_enabled}
onCheckedChange={() => {
const newChatStore = { ...chatStore };
newChatStore.frequency_penalty_enabled =
!newChatStore.frequency_penalty_enabled;
setChatStore({ ...newChatStore });
}}
/>
)}
</Label>
<Input