fix: conditional section promp_template
This commit is contained in:
parent
13ac421cdd
commit
0d8e6204b8
@ -48,6 +48,8 @@ const Sidebar: React.FC = () => {
|
||||
const componentDataRuntimeSetting = getConfigurationsData(modelEngineParams)
|
||||
const componentDataEngineSetting = getConfigurationsData(modelRuntimeParams)
|
||||
|
||||
console.log(componentDataEngineSetting)
|
||||
|
||||
const onReviewInFinderClick = async (type: string) => {
|
||||
if (!activeThread) return
|
||||
const activeThreadState = threadStates[activeThread.id]
|
||||
@ -236,18 +238,19 @@ const Sidebar: React.FC = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{componentDataEngineSetting.length !== 0 && (
|
||||
<>
|
||||
{componentDataEngineSetting.filter(
|
||||
(x) => x.name === 'prompt_template'
|
||||
).length !== 0 && (
|
||||
<div className="mt-4">
|
||||
<CardSidebar title="Model Parameters" asChild>
|
||||
<div className="px-2 py-4">
|
||||
{settingComponentBuilder(
|
||||
componentDataEngineSetting,
|
||||
true
|
||||
)}
|
||||
{settingComponentBuilder(componentDataEngineSetting, true)}
|
||||
</div>
|
||||
</CardSidebar>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{componentDataEngineSetting.length !== 0 && (
|
||||
<div className="my-4">
|
||||
<CardSidebar
|
||||
title="Engine Parameters"
|
||||
@ -260,7 +263,6 @@ const Sidebar: React.FC = () => {
|
||||
</div>
|
||||
</CardSidebar>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</CardSidebar>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user