mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 23:00:30 +08:00
Fix: Every variable in the chat settings is required. (#17727)
This commit is contained in:
@@ -1114,6 +1114,7 @@ This auto-tagging feature enhances retrieval by adding another layer of domain-s
|
||||
variableTip: `Used together with RAGFlow's chat assistant management APIs, variables can help develop more flexible system prompt strategies. The defined variables will be used by 'System prompt' as part of the prompts for the LLM. {knowledge} is a reserved special variable representing chunks retrieved from specified dataset(s), and all variables should be enclosed in curly braces {} in the 'System prompt'. See https://ragflow.io/docs/dev/set_chat_variables for details.`,
|
||||
add: 'Add',
|
||||
key: 'Key',
|
||||
variableKeyMessage: 'Please input the variable key',
|
||||
optional: 'Optional',
|
||||
operation: 'Operation',
|
||||
model: 'Model',
|
||||
|
||||
@@ -1008,6 +1008,7 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取实体和关系
|
||||
“系统提示词”中的所有变量都必须用大括号{}括起来。详见 https://ragflow.io/docs/dev/set_chat_variables。`,
|
||||
add: '新增',
|
||||
key: '关键字',
|
||||
variableKeyMessage: '请输入变量 key',
|
||||
optional: '可选的',
|
||||
operation: '操作',
|
||||
model: '模型',
|
||||
|
||||
@@ -33,7 +33,7 @@ export function DynamicVariableForm({
|
||||
|
||||
const add = useCallback(() => {
|
||||
append({
|
||||
key: undefined,
|
||||
key: '',
|
||||
optional: false,
|
||||
});
|
||||
}, [append]);
|
||||
|
||||
@@ -26,7 +26,7 @@ export function useChatSettingSchema() {
|
||||
parameters: z
|
||||
.array(
|
||||
z.object({
|
||||
key: z.string(),
|
||||
key: z.string().min(1, { message: t('variableKeyMessage') }),
|
||||
optional: z.boolean(),
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user