mirror of
https://github.com/langgenius/dify.git
synced 2026-03-17 04:47:50 +08:00
fix: auto default
This commit is contained in:
@ -153,7 +153,7 @@ const ReasoningConfigForm: React.FC<Props> = ({
|
||||
placeholder,
|
||||
options,
|
||||
} = schema
|
||||
const canUseAuto = type !== FormTypeEnum.modelSelector
|
||||
const canUseAuto = ![FormTypeEnum.modelSelector, FormTypeEnum.appSelector].includes(type)
|
||||
const auto = canUseAuto ? value[variable]?.auto : 0
|
||||
const tooltipContent = (tooltip && (
|
||||
<Tooltip
|
||||
|
||||
@ -12,7 +12,6 @@ import * as React from 'react'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import { FormTypeEnum } from '@/app/components/base/form/types'
|
||||
import { useBasicTypeaheadTriggerMatch } from '@/app/components/base/prompt-editor/hooks'
|
||||
import { $splitNodeContainingQuery } from '@/app/components/base/prompt-editor/utils'
|
||||
import { toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
|
||||
@ -81,7 +80,7 @@ const ToolPickerBlock: FC<ToolPickerBlockProps> = ({ scope = 'all' }) => {
|
||||
const fields = schemas.map(schema => ({
|
||||
id: schema.variable,
|
||||
value: schema.default ?? null,
|
||||
auto: ![FormTypeEnum.modelSelector, FormTypeEnum.appSelector].includes(schema.type as FormTypeEnum), // llm can not determine auto for these types
|
||||
auto: schema.form === 'llm',
|
||||
}))
|
||||
nextTools[configId] = {
|
||||
type: tool.provider_type, // === CollectionType.mcp ? 'mcp' : 'builtin'
|
||||
|
||||
Reference in New Issue
Block a user