mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-23 08:56:42 +08:00
Feat: Add a "None" option for reasoning intensity in the chat message box. (#17006)
### Summary Feat: Add a "None" option for reasoning intensity in the chat message box.
This commit is contained in:
@@ -78,10 +78,27 @@ export function NextMessageInput({
|
||||
|
||||
const thinkingOptions = useMemo(
|
||||
() => [
|
||||
{ label: t('chat.thinkingLevelUltra'), value: '3' },
|
||||
{ label: t('chat.thinkingLevelHigh'), value: '2' },
|
||||
{ label: t('chat.thinkingLevelMedium'), value: '1' },
|
||||
{ label: t('chat.thinkingLevelLow'), value: '0' },
|
||||
{
|
||||
label: t('chat.thinkingLevelUltra'),
|
||||
value: '4',
|
||||
description: t('chat.thinkingLevelUltraDescription'),
|
||||
},
|
||||
{
|
||||
label: t('chat.thinkingLevelHigh'),
|
||||
value: '3',
|
||||
description: t('chat.thinkingLevelHighDescription'),
|
||||
},
|
||||
{
|
||||
label: t('chat.thinkingLevelMedium'),
|
||||
value: '2',
|
||||
description: t('chat.thinkingLevelMediumDescription'),
|
||||
},
|
||||
{
|
||||
label: t('chat.thinkingLevelLow'),
|
||||
value: '1',
|
||||
description: t('chat.thinkingLevelLowDescription'),
|
||||
},
|
||||
{ label: t('chat.thinkingLevelNone'), value: '0' },
|
||||
],
|
||||
[t],
|
||||
);
|
||||
|
||||
@@ -31,12 +31,17 @@ import { t } from 'i18next';
|
||||
import { RAGFlowSelectOptionType } from '../ui/select';
|
||||
import { Separator } from '../ui/separator';
|
||||
|
||||
export type SelectWithSearchOptionType = RAGFlowSelectOptionType & {
|
||||
description?: ReactNode;
|
||||
};
|
||||
|
||||
export type SelectWithSearchFlagOptionType = {
|
||||
label: ReactNode;
|
||||
value?: string;
|
||||
disabled?: boolean;
|
||||
options?: RAGFlowSelectOptionType[];
|
||||
options?: SelectWithSearchOptionType[];
|
||||
keywords?: string[];
|
||||
description?: ReactNode;
|
||||
};
|
||||
|
||||
export type SelectWithSearchFlagProps = {
|
||||
@@ -272,12 +277,25 @@ export const SelectWithSearch = forwardRef<
|
||||
? `${optionTestIdPrefix}${option.value}`
|
||||
: 'combobox-option'
|
||||
}
|
||||
className={value === option.value ? 'bg-bg-card' : ''}
|
||||
className={cn(
|
||||
'relative flex flex-col min-h-10',
|
||||
option.description
|
||||
? 'items-start gap-1'
|
||||
: 'justify-center items-start',
|
||||
value === option.value ? 'bg-bg-card' : '',
|
||||
)}
|
||||
>
|
||||
<span className="leading-none">{option.label}</span>
|
||||
|
||||
{option.description && (
|
||||
<span className="text-text-secondary text-xs leading-none">
|
||||
{option.description}
|
||||
</span>
|
||||
)}
|
||||
{value === option.value && (
|
||||
<CheckIcon size={16} className="ml-auto" />
|
||||
<CheckIcon
|
||||
size={16}
|
||||
className="absolute top-1/2 -translate-y-1/2 right-2"
|
||||
/>
|
||||
)}
|
||||
</CommandItem>
|
||||
))}
|
||||
@@ -299,14 +317,27 @@ export const SelectWithSearch = forwardRef<
|
||||
? `${optionTestIdPrefix}${group.value}`
|
||||
: 'combobox-option'
|
||||
}
|
||||
className={cn('mb-1 min-h-10 ', {
|
||||
'bg-bg-card ': value === group.value,
|
||||
})}
|
||||
className={cn(
|
||||
'relative flex flex-col min-h-10 mb-1',
|
||||
group.description
|
||||
? 'items-start gap-1'
|
||||
: 'justify-center items-start',
|
||||
{
|
||||
'bg-bg-card ': value === group.value,
|
||||
},
|
||||
)}
|
||||
>
|
||||
<span className="leading-none">{group.label}</span>
|
||||
|
||||
{group.description && (
|
||||
<span className="text-text-secondary text-xs leading-none">
|
||||
{group.description}
|
||||
</span>
|
||||
)}
|
||||
{value === group.value && (
|
||||
<CheckIcon size={16} className="ml-auto" />
|
||||
<CheckIcon
|
||||
size={16}
|
||||
className="absolute top-1/2 -translate-y-1/2 right-2"
|
||||
/>
|
||||
)}
|
||||
</CommandItem>
|
||||
);
|
||||
|
||||
@@ -1119,10 +1119,15 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s
|
||||
thinkingDefault: 'System default',
|
||||
thinkingEnabled: 'Enabled',
|
||||
thinkingDisabled: 'Disabled',
|
||||
thinkingLevelNone: 'None',
|
||||
thinkingLevelLow: 'Low',
|
||||
thinkingLevelLowDescription: 'Instant responses',
|
||||
thinkingLevelMedium: 'Medium',
|
||||
thinkingLevelMediumDescription: 'Balanced speed & depth',
|
||||
thinkingLevelHigh: 'High',
|
||||
thinkingLevelHighDescription: 'Deep reasoning',
|
||||
thinkingLevelUltra: 'Ultra',
|
||||
thinkingLevelUltraDescription: 'Maximum cognitive effort',
|
||||
thinkingTip:
|
||||
'Only controls thinking mode for official Qwen, Kimi, and GLM model providers. System default disables Qwen thinking to avoid long-running tasks.',
|
||||
quote: 'Show quote',
|
||||
|
||||
@@ -1019,10 +1019,15 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取实体和关系
|
||||
thinkingDefault: '系统默认',
|
||||
thinkingEnabled: '开启',
|
||||
thinkingDisabled: '关闭',
|
||||
thinkingLevelNone: '无',
|
||||
thinkingLevelLow: '轻度',
|
||||
thinkingLevelLowDescription: '即时响应',
|
||||
thinkingLevelMedium: '中',
|
||||
thinkingLevelMediumDescription: '平衡速度与深度',
|
||||
thinkingLevelHigh: '高',
|
||||
thinkingLevelHighDescription: '深度推理',
|
||||
thinkingLevelUltra: '极高',
|
||||
thinkingLevelUltraDescription: '最大认知投入',
|
||||
thinkingTip:
|
||||
'仅控制官方模型提供商中的 Qwen、Kimi 和 GLM 模型思考模式。系统默认会关闭 Qwen 思考,以避免任务长时间运行。',
|
||||
quote: '显示引文',
|
||||
|
||||
Reference in New Issue
Block a user