mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
chore: max interatons default to 100
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import { memo } from 'react'
|
||||
import { InputNumber } from '@/app/components/base/input-number'
|
||||
import Slider from '@/app/components/base/slider'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
|
||||
import { cn } from '@/utils/classnames'
|
||||
@ -12,28 +11,19 @@ type MaxIterationsProps = {
|
||||
}
|
||||
const MaxIterations = ({ value = 10, onChange, className }: MaxIterationsProps) => {
|
||||
return (
|
||||
<div className={cn('mt-3 flex h-10 items-center', className)}>
|
||||
<div className="system-sm-semibold mr-0.5 truncate uppercase text-text-secondary">Max Iterations</div>
|
||||
<Tooltip
|
||||
popupContent="Max Iterations is the maximum number of iterations to run the tool."
|
||||
triggerClassName="shrink-0 w-4 h-4"
|
||||
/>
|
||||
<div className="mr-3 flex grow items-center justify-end">
|
||||
<Slider
|
||||
className="w-[124px]"
|
||||
value={value}
|
||||
onChange={onChange ?? (() => {})}
|
||||
min={1}
|
||||
max={99}
|
||||
step={1}
|
||||
<div className={cn('mt-3 flex h-10 items-center justify-between', className)}>
|
||||
<div className="flex items-center">
|
||||
<div className="system-sm-semibold mr-0.5 truncate uppercase text-text-secondary">Max Iterations</div>
|
||||
<Tooltip
|
||||
popupContent="Max Iterations is the maximum number of iterations to run the tool."
|
||||
triggerClassName="shrink-0 w-4 h-4"
|
||||
/>
|
||||
</div>
|
||||
<InputNumber
|
||||
className="w-10 shrink-0"
|
||||
className="w-14 shrink-0"
|
||||
value={value}
|
||||
onChange={onChange ?? (() => {})}
|
||||
min={1}
|
||||
max={99}
|
||||
step={1}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -54,6 +54,7 @@ const nodeDefault: NodeDefault<LLMNodeType> = {
|
||||
vision: {
|
||||
enabled: false,
|
||||
},
|
||||
max_iterations: 100,
|
||||
},
|
||||
defaultRunInputData: {
|
||||
'#context#': [RETRIEVAL_OUTPUT_STRUCT],
|
||||
|
||||
Reference in New Issue
Block a user