Commit 1c82e387 authored by Joel's avatar Joel

feat: not choose model hide in node

parent 49ce9d22
...@@ -14,13 +14,16 @@ const Node: FC<NodeProps<LLMNodeType>> = ({ ...@@ -14,13 +14,16 @@ const Node: FC<NodeProps<LLMNodeType>> = ({
const { const {
textGenerationModelList, textGenerationModelList,
} = useTextGenerationCurrentProviderAndModelAndModelList() } = useTextGenerationCurrentProviderAndModelAndModelList()
const hasSetModel = provider && modelId
return ( return (
<div className='px-3'> <div className='px-3'>
<ModelSelector {hasSetModel && (
defaultModel={(provider || modelId) ? { provider, model: modelId } : undefined} <ModelSelector
modelList={textGenerationModelList} defaultModel={{ provider, model: modelId }}
readonly modelList={textGenerationModelList}
/> readonly
/>
)}
</div> </div>
) )
} }
......
...@@ -22,13 +22,17 @@ const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => { ...@@ -22,13 +22,17 @@ const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => {
const { const {
textGenerationModelList, textGenerationModelList,
} = useTextGenerationCurrentProviderAndModelAndModelList() } = useTextGenerationCurrentProviderAndModelAndModelList()
const hasSetModel = provider && modelId
return ( return (
<div className='px-3'> <div className='px-3'>
<ModelSelector {hasSetModel && (
defaultModel={(provider || modelId) ? { provider, model: modelId } : undefined} <ModelSelector
modelList={textGenerationModelList} defaultModel={{ provider, model: modelId }}
readonly modelList={textGenerationModelList}
/> readonly
/>
)}
<div className='mt-2 space-y-0.5'> <div className='mt-2 space-y-0.5'>
{topics.map((topic, index) => ( {topics.map((topic, index) => (
<div <div
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment