mirror of https://github.com/langgenius/dify.git
feat: not choose model hide in node
This commit is contained in:
parent
49ce9d2200
commit
1c82e3870a
|
|
@ -14,13 +14,16 @@ const Node: FC<NodeProps<LLMNodeType>> = ({
|
|||
const {
|
||||
textGenerationModelList,
|
||||
} = useTextGenerationCurrentProviderAndModelAndModelList()
|
||||
const hasSetModel = provider && modelId
|
||||
return (
|
||||
<div className='px-3'>
|
||||
<ModelSelector
|
||||
defaultModel={(provider || modelId) ? { provider, model: modelId } : undefined}
|
||||
modelList={textGenerationModelList}
|
||||
readonly
|
||||
/>
|
||||
{hasSetModel && (
|
||||
<ModelSelector
|
||||
defaultModel={{ provider, model: modelId }}
|
||||
modelList={textGenerationModelList}
|
||||
readonly
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,13 +22,17 @@ const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => {
|
|||
const {
|
||||
textGenerationModelList,
|
||||
} = useTextGenerationCurrentProviderAndModelAndModelList()
|
||||
const hasSetModel = provider && modelId
|
||||
|
||||
return (
|
||||
<div className='px-3'>
|
||||
<ModelSelector
|
||||
defaultModel={(provider || modelId) ? { provider, model: modelId } : undefined}
|
||||
modelList={textGenerationModelList}
|
||||
readonly
|
||||
/>
|
||||
{hasSetModel && (
|
||||
<ModelSelector
|
||||
defaultModel={{ provider, model: modelId }}
|
||||
modelList={textGenerationModelList}
|
||||
readonly
|
||||
/>
|
||||
)}
|
||||
<div className='mt-2 space-y-0.5'>
|
||||
{topics.map((topic, index) => (
|
||||
<div
|
||||
|
|
|
|||
Loading…
Reference in New Issue