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