mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
perf: ai param config (#3451)
* perf: ai param config * pacakge import * perf: ai config doc
This commit is contained in:
@@ -6,7 +6,7 @@ import { useSystem } from '../../../hooks/useSystem';
|
||||
import Loading from '../MyLoading';
|
||||
import MyImage from './MyImage';
|
||||
|
||||
const MyPhotoView = ({ ...props }: ImageProps) => {
|
||||
const MyPhotoView = (props: ImageProps) => {
|
||||
const { isPc } = useSystem();
|
||||
|
||||
return (
|
||||
|
76
packages/web/components/common/MySlider/InputSlider.tsx
Normal file
76
packages/web/components/common/MySlider/InputSlider.tsx
Normal file
@@ -0,0 +1,76 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { Slider, SliderTrack, SliderThumb, HStack, SliderMark } from '@chakra-ui/react';
|
||||
import MyNumberInput from '../Input/NumberInput';
|
||||
|
||||
const InputSlider = ({
|
||||
onChange,
|
||||
value,
|
||||
max = 100,
|
||||
min = 0,
|
||||
step = 1
|
||||
}: {
|
||||
value: number;
|
||||
onChange: (index: number) => void;
|
||||
max: number;
|
||||
min: number;
|
||||
step?: number;
|
||||
}) => {
|
||||
const markList = useMemo(() => {
|
||||
const valLen = max - min;
|
||||
return [
|
||||
valLen * 0.007 + min,
|
||||
valLen * 0.2 + min,
|
||||
valLen * 0.4 + min,
|
||||
valLen * 0.6 + min,
|
||||
valLen * 0.8 + min,
|
||||
valLen * 0.985 + min
|
||||
];
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<HStack zIndex={10} spacing={3}>
|
||||
<Slider
|
||||
max={max}
|
||||
min={min}
|
||||
step={step}
|
||||
value={value}
|
||||
focusThumbOnChange={false}
|
||||
onChange={onChange}
|
||||
>
|
||||
<SliderTrack bg={'myGray.100'} h={'4px'} />
|
||||
{markList.map((val, i) => (
|
||||
<SliderMark
|
||||
key={i}
|
||||
value={val}
|
||||
w={'2px'}
|
||||
h={'2px'}
|
||||
bg={'#A4A4A4'}
|
||||
borderRadius={'2px'}
|
||||
opacity={0.4}
|
||||
transform={'translateY(-50%)'}
|
||||
/>
|
||||
))}
|
||||
<SliderThumb
|
||||
bg={'primary.500'}
|
||||
border={'4px solid'}
|
||||
borderColor={'#dee7f6'}
|
||||
w={'18px'}
|
||||
h={'18px'}
|
||||
boxShadow={'none'}
|
||||
// transform={'translate(-50%, -50%) !important'}
|
||||
/>
|
||||
</Slider>
|
||||
<MyNumberInput
|
||||
size={'sm'}
|
||||
width={'150px'}
|
||||
min={min}
|
||||
max={max}
|
||||
step={step}
|
||||
value={value}
|
||||
onChange={(e) => onChange(e ?? min)}
|
||||
/>
|
||||
</HStack>
|
||||
);
|
||||
};
|
||||
|
||||
export default InputSlider;
|
@@ -25,18 +25,20 @@ const SystemStoreContextProvider = ({
|
||||
children: ReactNode;
|
||||
device?: 'pc' | 'mobile' | null;
|
||||
}) => {
|
||||
const [isPc] = useMediaQuery('(min-width: 900px)');
|
||||
|
||||
const [isPc] = useMediaQuery('(min-width: 900px)', {
|
||||
fallback: device === 'pc'
|
||||
});
|
||||
useEffect(() => {
|
||||
setSize(isPc ? 'pc' : 'mobile');
|
||||
}, [isPc]);
|
||||
|
||||
const contextValue = useMemo(
|
||||
() => ({
|
||||
isPc: device ? device === 'pc' : isPc
|
||||
isPc
|
||||
}),
|
||||
[device, isPc]
|
||||
[isPc]
|
||||
);
|
||||
|
||||
return (
|
||||
<useSystemStoreContext.Provider value={contextValue}>{children}</useSystemStoreContext.Provider>
|
||||
);
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"Run": "Execute",
|
||||
"Team Tags Set": "Team tags",
|
||||
"Team_Tags": "Team tags",
|
||||
"ai_point_price": "Billing",
|
||||
"ai_settings": "AI Configuration",
|
||||
"all_apps": "All Applications",
|
||||
"app.Version name": "Version Name",
|
||||
@@ -19,8 +20,9 @@
|
||||
"auto_execute_tip": "After turning it on, the workflow will be automatically triggered when the user enters the conversation interface. \nExecution order: 1. Dialogue starter; 2. Global variables; 3. Automatic execution.",
|
||||
"auto_save": "Auto save",
|
||||
"chat_debug": "Chat Preview",
|
||||
"chat_logs": "Conversation Logs",
|
||||
"chat_logs": "Logs",
|
||||
"chat_logs_tips": "Logs will record the online, shared, and API (requires chatId) conversation records of this app.",
|
||||
"config_ai_model_params": "Click to configure AI model related properties",
|
||||
"config_file_upload": "Click to Configure File Upload Rules",
|
||||
"config_question_guide": "Configuration guess you want to ask",
|
||||
"confirm_copy_app_tip": "The system will create an app with the same configuration for you, but permissions will not be copied. Please confirm!",
|
||||
@@ -68,13 +70,15 @@
|
||||
"interval.per_hour": "Every Hour",
|
||||
"intro": "A comprehensive model application orchestration system that offers out-of-the-box data processing and model invocation capabilities. It allows for rapid Dataset construction and workflow orchestration through Flow visualization, enabling complex Dataset scenarios!",
|
||||
"llm_not_support_vision": "This model does not support image recognition",
|
||||
"llm_use_vision": "Enable Image Recognition",
|
||||
"llm_use_vision": "Vision",
|
||||
"llm_use_vision_tip": "After clicking on the model selection, you can see whether the model supports image recognition and the ability to control whether to start image recognition. \nAfter starting image recognition, the model will read the image content in the file link, and if the user question is less than 500 words, it will automatically parse the image in the user question.",
|
||||
"logs_chat_user": "user",
|
||||
"logs_empty": "No logs yet~",
|
||||
"logs_message_total": "Total Messages",
|
||||
"logs_title": "Title",
|
||||
"look_ai_point_price": "View all model billing standards",
|
||||
"mark_count": "Number of Marked Answers",
|
||||
"max_histories_number": "Max histories",
|
||||
"module.Custom Title Tip": "This title will be displayed during the conversation.",
|
||||
"module.No Modules": "No Plugins Found",
|
||||
"module.type": "\"{{type}}\" type\n{{description}}",
|
||||
@@ -96,13 +100,15 @@
|
||||
"plugin_cost_per_times": "{{cost}} points/time",
|
||||
"plugin_dispatch": "Plugin Invocation",
|
||||
"plugin_dispatch_tip": "Adds extra capabilities to the model. The specific plugins to be invoked will be autonomously decided by the model.\nIf a plugin is selected, the Dataset invocation will automatically be treated as a special plugin.",
|
||||
"publish_channel": "Publish Channel",
|
||||
"publish_channel": "Publish",
|
||||
"publish_success": "Publish Successful",
|
||||
"question_guide_tip": "After the conversation, 3 guiding questions will be generated for you.",
|
||||
"saved_success": "Save Successful",
|
||||
"search_app": "Search Application",
|
||||
"setting_app": "Application Settings",
|
||||
"setting_plugin": "Plugin Settings",
|
||||
"setting_app": "Workflow",
|
||||
"setting_plugin": "Workflow",
|
||||
"stream_response": "Stream",
|
||||
"stream_response_tip": "Turning this switch off forces the model to use non-streaming mode and will not output content directly. \nIn the output of the AI reply, the content output by this model can be obtained for secondary processing.",
|
||||
"template.hard_strict": "Strict Q&A template",
|
||||
"template.hard_strict_des": "Based on the question and answer template, stricter requirements are imposed on the model's answers.",
|
||||
"template.qa_template": "Q&A template",
|
||||
@@ -164,7 +170,7 @@
|
||||
"workflow.form_input_description_placeholder": "For example: \nAdd your information",
|
||||
"workflow.form_input_tip": " This module can configure multiple inputs to guide users in entering specific content.",
|
||||
"workflow.input_description_tip": "You can add a description to explain to users what they need to input",
|
||||
"workflow.read_files": "Document Parsing",
|
||||
"workflow.read_files": "Document Parse",
|
||||
"workflow.read_files_result": "Document Parsing Result",
|
||||
"workflow.read_files_result_desc": "Original document text, consisting of file names and document content, separated by hyphens between multiple files.",
|
||||
"workflow.read_files_tip": "Parse the documents uploaded in this round of dialogue and return the corresponding document content",
|
||||
@@ -175,6 +181,6 @@
|
||||
"workflow.template.communication": "Communication",
|
||||
"workflow.user_file_input": "File Link",
|
||||
"workflow.user_file_input_desc": "Links to documents and images uploaded by users.",
|
||||
"workflow.user_select": "User Selection",
|
||||
"workflow.user_select": "User Select",
|
||||
"workflow.user_select_tip": "This module can configure multiple options for selection during the dialogue. Different options can lead to different workflow branches."
|
||||
}
|
||||
|
@@ -261,17 +261,14 @@
|
||||
"contribute_app_template": "Contribute Template",
|
||||
"core.Chat": "Chat",
|
||||
"core.Max Token": "Max Token",
|
||||
"core.ai.AI settings": "AI Settings",
|
||||
"core.ai.Ai point price": "AI Points Consumption",
|
||||
"core.ai.Max context": "Max Context",
|
||||
"core.ai.Model": "AI Model",
|
||||
"core.ai.Model": "Model",
|
||||
"core.ai.Not deploy rerank model": "Re-rank Model Not Deployed",
|
||||
"core.ai.Prompt": "Prompt",
|
||||
"core.ai.Support tool": "Function Call",
|
||||
"core.ai.model.Dataset Agent Model": "File read model",
|
||||
"core.ai.model.Vector Model": "Index model",
|
||||
"core.ai.model.doc_index_and_dialog": "Document Index & Dialog Index",
|
||||
"core.app.Ai response": "AI Response",
|
||||
"core.app.Api request": "API Request",
|
||||
"core.app.Api request desc": "Integrate into existing systems through API, or WeChat Work, Feishu, etc.",
|
||||
"core.app.App intro": "App Introduction",
|
||||
@@ -284,8 +281,7 @@
|
||||
"core.app.Interval timer run": "Scheduled Execution",
|
||||
"core.app.Interval timer tip": "Can Execute App on Schedule",
|
||||
"core.app.Make a brief introduction of your app": "Give Your AI App an Introduction",
|
||||
"core.app.Max histories": "Number of Chat Histories",
|
||||
"core.app.Max tokens": "Response Limit",
|
||||
"core.app.Max tokens": "Max response",
|
||||
"core.app.Name and avatar": "Avatar & Name",
|
||||
"core.app.Publish": "Publish",
|
||||
"core.app.Publish Confirm": "Confirm to Publish App? This Will Immediately Update the App Status on All Publishing Channels.",
|
||||
|
@@ -18,13 +18,13 @@
|
||||
"classification_result": "Classification Result",
|
||||
"code.Reset template": "Reset Template",
|
||||
"code.Reset template confirm": "Confirm reset code template? This will reset all inputs and outputs to template values. Please save your current code.",
|
||||
"code_execution": "Code Execution",
|
||||
"code_execution": "Code Sandbox",
|
||||
"collection_metadata_filter": "Collection Metadata Filter",
|
||||
"complete_extraction_result": "Complete Extraction Result",
|
||||
"complete_extraction_result_description": "A JSON string, e.g., {\"name\":\"YY\",\"Time\":\"2023/7/2 18:00\"}",
|
||||
"concatenation_result": "Concatenation Result",
|
||||
"concatenation_text": "Concatenation Text",
|
||||
"condition_checker": "Condition Checker",
|
||||
"condition_checker": "Condition",
|
||||
"confirm_delete_field_tip": "Confirm delete this field?",
|
||||
"contains": "Contains",
|
||||
"content_to_retrieve": "Content to Retrieve",
|
||||
@@ -69,7 +69,7 @@
|
||||
"http_extract_output": "Output field extraction",
|
||||
"http_extract_output_description": "Specified fields in the response value can be extracted through JSONPath syntax",
|
||||
"http_raw_response_description": "Raw HTTP response. Only accepts string or JSON type response data.",
|
||||
"http_request": "HTTP Request",
|
||||
"http_request": "HTTP",
|
||||
"http_request_error_info": "HTTP request error information, returns empty on success",
|
||||
"ifelse.Input value": "Input Value",
|
||||
"ifelse.Select value": "Select Value",
|
||||
@@ -96,7 +96,7 @@
|
||||
"is_tool_output_label": "as tool response",
|
||||
"judgment_result": "Judgment Result",
|
||||
"knowledge_base_reference": "Dataset Reference",
|
||||
"knowledge_base_search_merge": "Dataset Search Merge",
|
||||
"knowledge_base_search_merge": "Dataset Merge",
|
||||
"laf_function_call_test": "Laf Function Call (Test)",
|
||||
"length_equal_to": "Length Equal To",
|
||||
"length_greater_than": "Length Greater Than",
|
||||
@@ -106,7 +106,7 @@
|
||||
"length_not_equal_to": "Length Not Equal To",
|
||||
"less_than": "Less Than",
|
||||
"less_than_or_equal_to": "Less Than or Equal To",
|
||||
"loop": "Batch execution",
|
||||
"loop": "Batch Run",
|
||||
"loop_body": "loop body",
|
||||
"loop_end": "end of loop",
|
||||
"loop_input_array": "array",
|
||||
@@ -128,8 +128,8 @@
|
||||
"plugin_file_abandon_tip": "Plugin global file upload has been deprecated, please adjust it as soon as possible. \nRelated functions can be achieved through plug-in input and adding image type input.",
|
||||
"plugin_input": "Plugin Input",
|
||||
"plugin_output_tool": "When the plug-in is executed as a tool, whether this field responds as a result of the tool",
|
||||
"question_classification": "Question Classification",
|
||||
"question_optimization": "Question Optimization",
|
||||
"question_classification": "Classify",
|
||||
"question_optimization": "Query extension",
|
||||
"quote_content_placeholder": "The structure of the reference content can be customized to better suit different scenarios. \nSome variables can be used for template configuration\n\n{{q}} - main content\n\n{{a}} - auxiliary data\n\n{{source}} - source name\n\n{{sourceId}} - source ID\n\n{{index}} - nth reference",
|
||||
"quote_content_tip": "The structure of the reference content can be customized to better suit different scenarios. Some variables can be used for template configuration:\n\n{{q}} - main content\n{{a}} - auxiliary data\n{{source}} - source name\n{{sourceId}} - source ID\n{{index}} - nth reference\nThey are all optional and the following are the default values:\n\n{{default}}",
|
||||
"quote_num": "Dataset",
|
||||
@@ -159,16 +159,16 @@
|
||||
"template.forbid_stream_desc": "Forces the output mode of nested application streams to be disabled",
|
||||
"template.plugin_output": "Plugin output",
|
||||
"template.plugin_start": "Plugin start",
|
||||
"template.system_config": "System Configuration",
|
||||
"template.system_config": "System",
|
||||
"template.tool_call": "Tool Call",
|
||||
"template.tool_call_intro": "Automatically select one or more functional blocks for calling through the AI model, or call plugins.",
|
||||
"template.workflow_start": "Workflow Start",
|
||||
"text_concatenation": "Text Concatenation",
|
||||
"text_content_extraction": "Text Content Extraction",
|
||||
"template.workflow_start": "Start",
|
||||
"text_concatenation": "Text Editor",
|
||||
"text_content_extraction": "Text Extract",
|
||||
"text_to_extract": "Text to Extract",
|
||||
"these_variables_will_be_input_parameters_for_code_execution": "These variables will be input parameters for code execution",
|
||||
"tool_call_termination": "Tool Call Termination",
|
||||
"tool_custom_field": "Custom tool parameters",
|
||||
"tool_call_termination": "Stop ToolCall",
|
||||
"tool_custom_field": "Custom Tool",
|
||||
"tool_field": " Tool Field Parameter Configuration",
|
||||
"tool_input": "Tool Input",
|
||||
"tool_params.enum_placeholder": "apple \npeach \nwatermelon",
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"Run": "运行",
|
||||
"Team Tags Set": "团队标签",
|
||||
"Team_Tags": "团队标签",
|
||||
"ai_point_price": "AI积分计费",
|
||||
"ai_settings": "AI 配置",
|
||||
"all_apps": "全部应用",
|
||||
"app.Version name": "版本名称",
|
||||
@@ -21,6 +22,7 @@
|
||||
"chat_debug": "调试预览",
|
||||
"chat_logs": "对话日志",
|
||||
"chat_logs_tips": "日志会记录该应用的在线、分享和 API(需填写 chatId)对话记录",
|
||||
"config_ai_model_params": "点击配置 AI 模型相关属性",
|
||||
"config_file_upload": "点击配置文件上传规则",
|
||||
"config_question_guide": "配置猜你想问",
|
||||
"confirm_copy_app_tip": "系统将为您创建一个相同配置应用,但权限不会进行复制,请确认!",
|
||||
@@ -74,7 +76,9 @@
|
||||
"logs_empty": "还没有日志噢~",
|
||||
"logs_message_total": "消息总数",
|
||||
"logs_title": "标题",
|
||||
"look_ai_point_price": "查看所有模型计费标准",
|
||||
"mark_count": "标注答案数量",
|
||||
"max_histories_number": "最大对话轮数",
|
||||
"module.Custom Title Tip": "该标题名字会展示在对话过程中",
|
||||
"module.No Modules": "没找到插件",
|
||||
"module.type": "\"{{type}}\"类型\n{{description}}",
|
||||
@@ -103,6 +107,8 @@
|
||||
"search_app": "搜索应用",
|
||||
"setting_app": "应用配置",
|
||||
"setting_plugin": "插件配置",
|
||||
"stream_response": "流输出",
|
||||
"stream_response_tip": "关闭该开关,可以强制模型使用非流模式,并且不会直接进行内容输出。可以在 AI 回复的输出中,获取本次模型输出的内容进行二次处理。",
|
||||
"template.hard_strict": "严格问答模板",
|
||||
"template.hard_strict_des": "在问答模板基础上,对模型的回答做更严格的要求。",
|
||||
"template.qa_template": "问答模板",
|
||||
|
@@ -260,8 +260,6 @@
|
||||
"contribute_app_template": "贡献模板",
|
||||
"core.Chat": "对话",
|
||||
"core.Max Token": "单条数据上限",
|
||||
"core.ai.AI settings": "AI 配置",
|
||||
"core.ai.Ai point price": "AI 积分消耗",
|
||||
"core.ai.Max context": "最大上下文",
|
||||
"core.ai.Model": "AI 模型",
|
||||
"core.ai.Not deploy rerank model": "未部署重排模型",
|
||||
@@ -270,7 +268,6 @@
|
||||
"core.ai.model.Dataset Agent Model": "文本理解模型",
|
||||
"core.ai.model.Vector Model": "索引模型",
|
||||
"core.ai.model.doc_index_and_dialog": "文档索引 & 对话索引",
|
||||
"core.app.Ai response": "返回 AI 内容",
|
||||
"core.app.Api request": "API 访问",
|
||||
"core.app.Api request desc": "通过 API 接入到已有系统中,或企微、飞书等",
|
||||
"core.app.App intro": "应用介绍",
|
||||
@@ -283,7 +280,6 @@
|
||||
"core.app.Interval timer run": "定时执行",
|
||||
"core.app.Interval timer tip": "可定时执行应用",
|
||||
"core.app.Make a brief introduction of your app": "给你的 AI 应用一个介绍",
|
||||
"core.app.Max histories": "聊天记录数量",
|
||||
"core.app.Max tokens": "回复上限",
|
||||
"core.app.Name and avatar": "头像 & 名称",
|
||||
"core.app.Publish": "发布",
|
||||
|
@@ -3,6 +3,7 @@
|
||||
"Run": "執行",
|
||||
"Team Tags Set": "團隊標籤",
|
||||
"Team_Tags": "團隊標籤",
|
||||
"ai_point_price": "AI積分計費",
|
||||
"ai_settings": "AI 設定",
|
||||
"all_apps": "所有應用程式",
|
||||
"app.Version name": "版本名稱",
|
||||
@@ -21,6 +22,7 @@
|
||||
"chat_debug": "聊天預覽",
|
||||
"chat_logs": "對話紀錄",
|
||||
"chat_logs_tips": "紀錄會記錄此應用程式的線上、分享和 API(需填寫 chatId)對話紀錄",
|
||||
"config_ai_model_params": "點選配置 AI 模型相關屬性",
|
||||
"config_file_upload": "點選設定檔案上傳規則",
|
||||
"config_question_guide": "配置猜你想問",
|
||||
"confirm_copy_app_tip": "系統將為您建立一個相同設定的應用程式,但權限不會複製,請確認!",
|
||||
@@ -74,7 +76,9 @@
|
||||
"logs_empty": "還沒有紀錄喔~",
|
||||
"logs_message_total": "訊息總數",
|
||||
"logs_title": "標題",
|
||||
"look_ai_point_price": "查看所有模型計費標準",
|
||||
"mark_count": "標記答案數量",
|
||||
"max_histories_number": "最大對話輪數",
|
||||
"module.Custom Title Tip": "這個標題會顯示在對話過程中",
|
||||
"module.No Modules": "找不到外掛",
|
||||
"module.type": "\"{{type}}\" 類型\n{{description}}",
|
||||
@@ -103,6 +107,8 @@
|
||||
"search_app": "搜尋應用程式",
|
||||
"setting_app": "應用程式設定",
|
||||
"setting_plugin": "外掛設定",
|
||||
"stream_response": "流輸出",
|
||||
"stream_response_tip": "關閉該開關,可以強制模型使用非流模式,並且不會直接進行內容輸出。\n可在 AI 回覆的輸出中,取得本次模型輸出的內容進行二次處理。",
|
||||
"template.hard_strict": "嚴格問答範本",
|
||||
"template.hard_strict_des": "在問答範本基礎上,對模型的回答做出更嚴格的要求。",
|
||||
"template.qa_template": "問答範本",
|
||||
|
@@ -261,8 +261,6 @@
|
||||
"contribute_app_template": "貢獻範本",
|
||||
"core.Chat": "對話",
|
||||
"core.Max Token": "單筆資料上限",
|
||||
"core.ai.AI settings": "AI 設定",
|
||||
"core.ai.Ai point price": "AI 點數消耗",
|
||||
"core.ai.Max context": "最大上下文",
|
||||
"core.ai.Model": "AI 模型",
|
||||
"core.ai.Not deploy rerank model": "未部署重新排名模型",
|
||||
@@ -271,7 +269,6 @@
|
||||
"core.ai.model.Dataset Agent Model": "檔案處理模型",
|
||||
"core.ai.model.Vector Model": "索引模型",
|
||||
"core.ai.model.doc_index_and_dialog": "文件索引與對話索引",
|
||||
"core.app.Ai response": "AI 回應",
|
||||
"core.app.Api request": "API 存取",
|
||||
"core.app.Api request desc": "透過 API 整合到現有系統中,或整合到企業微信、飛書等",
|
||||
"core.app.App intro": "應用程式介紹",
|
||||
@@ -284,7 +281,6 @@
|
||||
"core.app.Interval timer run": "排程執行",
|
||||
"core.app.Interval timer tip": "可排程執行應用程式",
|
||||
"core.app.Make a brief introduction of your app": "為您的 AI 應用程式寫一段介紹",
|
||||
"core.app.Max histories": "聊天記錄數量",
|
||||
"core.app.Max tokens": "回應上限",
|
||||
"core.app.Name and avatar": "頭像與名稱",
|
||||
"core.app.Publish": "發布",
|
||||
|
Reference in New Issue
Block a user