feat(web): file upload add document_image_recognition config
This commit is contained in:
@@ -1460,6 +1460,7 @@ export const en = {
|
||||
maxCount: 'Max Files',
|
||||
singleMaxSize: 'Max Size',
|
||||
unix: 'items',
|
||||
document_image_recognition: 'Enable image recognition in documents',
|
||||
text_to_speech: 'Text to Speech',
|
||||
text_to_speech_desc: 'Text can be converted to speech',
|
||||
opening_statement: 'Conversation Opening',
|
||||
@@ -1536,6 +1537,7 @@ export const en = {
|
||||
json_output: 'Support JSON formatted output',
|
||||
thinking_budget_tokens: 'thinking budget tokens',
|
||||
thinking_budget_tokens_max_error: "Cannot exceed the max tokens limit ({{max}})",
|
||||
logSearchPlaceholder: 'Search log content',
|
||||
},
|
||||
userMemory: {
|
||||
userMemory: 'User Memory',
|
||||
@@ -2529,6 +2531,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
|
||||
input_result: 'Input',
|
||||
output_result: 'Output',
|
||||
process_result: 'Data Processing',
|
||||
error: 'Error Message',
|
||||
loopNum: ' loops',
|
||||
iterationNum: ' iterations',
|
||||
|
||||
@@ -790,6 +790,7 @@ export const zh = {
|
||||
maxCount: '最大文件数',
|
||||
singleMaxSize: '单文件最大大小',
|
||||
unix: '个',
|
||||
document_image_recognition: '是否识别文档中的图片',
|
||||
text_to_speech: '文字转语音',
|
||||
text_to_speech_desc: '文本可以转换成语音',
|
||||
opening_statement: '对话开场白',
|
||||
@@ -866,6 +867,7 @@ export const zh = {
|
||||
json_output: '支持JSON格式化输出',
|
||||
thinking_budget_tokens: '深度思考预算Token数',
|
||||
thinking_budget_tokens_max_error: "不能超过 最大令牌数 ({{max}})",
|
||||
logSearchPlaceholder: '搜索日志内容',
|
||||
},
|
||||
table: {
|
||||
totalRecords: '共 {{total}} 条记录'
|
||||
@@ -2493,6 +2495,7 @@ export const zh = {
|
||||
|
||||
input_result: '输入',
|
||||
output_result: '输出',
|
||||
process_result: '数据处理',
|
||||
error: '错误信息',
|
||||
loopNum: '个循环',
|
||||
iterationNum: '个迭代',
|
||||
|
||||
@@ -97,6 +97,7 @@ export const defaultValues: FileUpload = {
|
||||
"json",
|
||||
"md",
|
||||
],
|
||||
document_image_recognition: false,
|
||||
video_enabled: false,
|
||||
video_max_size_mb: 100,
|
||||
video_allowed_extensions: [
|
||||
@@ -219,11 +220,22 @@ const FileUploadSettingModal = forwardRef<FileUploadSettingModalRef, FileUploadS
|
||||
</Col>
|
||||
</Row>
|
||||
{isEnabled && (
|
||||
<Flex align="center" gap={12} className="rb:mt-3! rb:pt-3! rb:border-t rb:border-[#DFE4ED]">
|
||||
<div>{t('application.singleMaxSize')}: </div>
|
||||
<Form.Item name={sizeKey} noStyle>
|
||||
<InputNumber min={1} max={100} suffix="MB" className="rb:flex-1" />
|
||||
</Form.Item>
|
||||
<Flex align="center" gap={16} className="rb:mt-3! rb:pt-3! rb:border-t rb:border-[#DFE4ED]">
|
||||
<div>
|
||||
<div>{t('application.singleMaxSize')}</div>
|
||||
<Form.Item name={sizeKey} noStyle>
|
||||
<InputNumber min={1} max={100} suffix="MB" className="rb:flex-1" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
{option.type === 'document' &&
|
||||
<div>
|
||||
<div>{t('application.document_image_recognition')}</div>
|
||||
<Form.Item name="document_image_recognition" valuePropName="checked" noStyle>
|
||||
<Switch className="rb:mt-1.5!" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
}
|
||||
|
||||
<Form.Item name={`${option.type}_allowed_extensions`} hidden />
|
||||
</Flex>
|
||||
)}
|
||||
|
||||
@@ -104,6 +104,7 @@ const OpenStatementSettingModal = forwardRef<OpenStatementSettingModalRef, OpenS
|
||||
<Form.Item
|
||||
label={t('application.opening_statement')}
|
||||
name="statement"
|
||||
rules={[{ required: true, message: t('common.pleaseEnter') }]}
|
||||
>
|
||||
{source === 'workflow'
|
||||
? <Editor options={chatVariables as any} variant="outlined" />
|
||||
|
||||
@@ -184,7 +184,8 @@ const ModelConfigModal = forwardRef<ModelConfigModalRef, ModelConfigModalProps>(
|
||||
{
|
||||
validator: (_, value) => {
|
||||
const maxTokens = values?.max_tokens
|
||||
if (value !== undefined && maxTokens !== undefined && value > maxTokens) {
|
||||
const deep_thinking = values?.deep_thinking;
|
||||
if (deep_thinking && value !== undefined && maxTokens !== undefined && value > maxTokens) {
|
||||
return Promise.reject(t('application.thinking_budget_tokens_max_error', { max: maxTokens }))
|
||||
}
|
||||
return Promise.resolve()
|
||||
|
||||
@@ -438,6 +438,7 @@ interface FileSetttings {
|
||||
document_enabled: boolean;
|
||||
document_max_size_mb: number;
|
||||
document_allowed_extensions: string[];
|
||||
document_image_recognition: boolean;
|
||||
video_enabled: boolean;
|
||||
video_max_size_mb: number;
|
||||
video_allowed_extensions: string[];
|
||||
@@ -499,6 +500,7 @@ export interface LogItem {
|
||||
is_draft: boolean;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
node_executions_map?: Record<string, ChatItem['subContent']>
|
||||
}
|
||||
export interface LogDetailModalRef {
|
||||
handleOpen: (vo: LogItem) => void;
|
||||
|
||||
Reference in New Issue
Block a user