Skip to content

Commit

Permalink
chore: copy edit for model setting (janhq#3553)
Browse files Browse the repository at this point in the history
* chore: copy edit for model setting

* chore: make a const for copy accordion
  • Loading branch information
urmauur authored Sep 5, 2024
1 parent fb01216 commit edf5c77
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions web/screens/Thread/ThreadRightPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ import {

import { activeTabThreadRightPanelAtom } from '@/helpers/atoms/ThreadRightPanel.atom'

const INFERENCE_SETTINGS = 'Inference Settings'
const MODEL_SETTINGS = 'Model Settings'
const ENGINE_SETTINGS = 'Engine Settings'

const ThreadRightPanel = () => {
const activeThread = useAtomValue(activeThreadAtom)
const activeModelParams = useAtomValue(getActiveThreadModelParamsAtom)
Expand Down Expand Up @@ -239,8 +243,8 @@ const ThreadRightPanel = () => {
<Accordion defaultValue={[]}>
{settings.runtimeSettings.length !== 0 && (
<AccordionItem
title="Inference Parameters"
value="Inference Parameters"
title={INFERENCE_SETTINGS}
value={INFERENCE_SETTINGS}
>
<ModelSetting
componentProps={settings.runtimeSettings}
Expand All @@ -250,16 +254,13 @@ const ThreadRightPanel = () => {
)}

{promptTemplateSettings.length !== 0 && (
<AccordionItem title="Model Parameters" value="Model Parameters">
<AccordionItem title={MODEL_SETTINGS} value={MODEL_SETTINGS}>
<PromptTemplateSetting componentData={promptTemplateSettings} />
</AccordionItem>
)}

{settings.engineSettings.length !== 0 && (
<AccordionItem
title="Engine Parameters"
value="Engine Parameters"
>
<AccordionItem title={ENGINE_SETTINGS} value={ENGINE_SETTINGS}>
<EngineSetting
componentData={settings.engineSettings}
onValueChanged={onValueChanged}
Expand Down

0 comments on commit edf5c77

Please sign in to comment.