Compare commits

...

2830 Commits
main ... v2.4.1

Author SHA1 Message Date
wangdan-fit2cloud 4ef20a9b46 fix: Component sequence adjustment
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-12-12 16:10:14 +08:00
shaohuzhang1 1141e5f19c fix: Local rearrangement model cannot be added (#4510) 2025-12-12 16:02:56 +08:00
shaohuzhang1 d1d64bba00 fix: The image uploaded from the workflow knowledge base zip file cannot be parsed (#4509) 2025-12-12 15:18:47 +08:00
shaohuzhang1 a53b0d5c10 fix: The image uploaded from the workflow knowledge base zip file cannot be parsed (#4507) 2025-12-12 14:45:37 +08:00
shaohuzhang1 47cea10a40 fix: The image uploaded from the workflow knowledge base zip file cannot be parsed (#4505) 2025-12-12 14:45:37 +08:00
CaptainB b18cd787e7 feat: add function to extract tool ID from raw ID 2025-12-12 12:47:28 +08:00
shaohuzhang1 fd400f2be1 fix: The image uploaded from the workflow knowledge base zip file cannot be parsed (#4503) 2025-12-12 11:59:10 +08:00
CaptainB d349fd5e46 chore: enhance tool call handling and fragment aggregation in tools.py 2025-12-12 10:47:57 +08:00
CaptainB 63880e3e74 fix: handle None values in row data for markdown table generation 2025-12-12 10:23:52 +08:00
liqiang-fit2cloud 377f397cc8 refactor: log tool execution duration 2025-12-11 17:22:14 +08:00
CaptainB 2d368867f1 fix: handle 'None' string in field value checks 2025-12-11 17:17:35 +08:00
zhangzhanwei 9347696676 fix: Filter special character 2025-12-11 16:34:39 +08:00
CaptainB 638f90e69f chore: limit paragraph list to first 5 segments in get_details method 2025-12-11 16:26:48 +08:00
shaohuzhang1 a0d5b17fab fix: Manually adding file types to the workflow knowledge base cannot upload files after adding them in lowercase letters (#4499) 2025-12-11 16:07:53 +08:00
wangdan-fit2cloud 1e8459c0c7 fix: Execution details image understanding image display 2025-12-11 16:07:53 +08:00
shaohuzhang1 c13219e72b fix: Manually adding file types to the workflow knowledge base cannot upload files after adding them in lowercase letters (#4498) 2025-12-11 15:46:19 +08:00
CaptainB ac7bad5262 chore: enhance field value check for query conditions 2025-12-11 15:42:38 +08:00
CaptainB ecf07cee63 chore: enhance zip content extraction with posixpath for path normalization 2025-12-11 15:10:39 +08:00
wangdan-fit2cloud f5cef9b1f0 fix: Fix operate log table style 2025-12-11 14:20:48 +08:00
shaohuzhang1 2379654bb7 fix: Compatibility issues with zooming in and out of AI dialog box images (#4495) 2025-12-11 14:12:02 +08:00
wangdan-fit2cloud b373986835 fix: Dynamic form card style bug 2025-12-11 13:01:02 +08:00
shaohuzhang1 2b05ca65cf fix: When the execution fails, the execution details still show as successful in the [Knowledge Base Workflow] (#4494) 2025-12-11 13:01:02 +08:00
wxg0103 222ca030d6 fix: remove unnecessary error logging in base_chat_open_ai.py 2025-12-11 13:01:02 +08:00
shaohuzhang1 86bd0f742a fix: Code editor input error 2025-12-11 13:01:02 +08:00
wangdan-fit2cloud 44b1387635 style: switch style
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-10 17:17:11 +08:00
shaohuzhang1 cb977a71ec
fix: When voice playback is turned on, if the answer contains a link, there will be the following abnormal message (#4488) 2025-12-10 16:54:36 +08:00
shaohuzhang1 11a894f871
fix: The local file node of the knowledge base workflow supports MD format (#4487) 2025-12-10 16:28:43 +08:00
wangdan-fit2cloud 5a8b9105ea fix: Style optimization 2025-12-10 16:22:04 +08:00
zhangzhanwei faa6323822 fix: XF tts model 2025-12-10 16:15:01 +08:00
wangdan-fit2cloud 909bb42090 fix: pdf 2025-12-10 15:37:37 +08:00
wxg0103 31d4d2c24a fix: remove unused test button from Saml2.vue 2025-12-10 14:21:03 +08:00
shaohuzhang1 9d23b6297d
fix: Modify the parameter name and display name of the loop variable in the loop node, but the variable name is not updated in the nodes outside the loop (#4485) 2025-12-10 13:55:32 +08:00
zhangzhanwei ec518206ad fix: While name in query return all trees 2025-12-10 12:51:24 +08:00
qijingyu0727 532eee571f
feat: enhance TTS model parameters and API version handling (#4480)
Co-authored-by: xiaoc <648844981@qq.com>
2025-12-10 12:25:43 +08:00
shaohuzhang1 4e58d079bf
fix: Workflow execution details execution status determination (#4483) 2025-12-10 12:25:30 +08:00
zhangzhanwei 845656611f fix: Exclude unnecessary query fields 2025-12-10 11:44:51 +08:00
wangdan-fit2cloud 509532c560 fix: Fix icon size 2025-12-10 11:38:07 +08:00
wangdan-fit2cloud 64eeb433c3 fix: Optimize the chart 2025-12-10 11:09:40 +08:00
shaohuzhang1 9fc1809ea3
fix: In the execution details, the execution time of the loop node is displayed incorrectly (#4479) 2025-12-10 11:01:25 +08:00
wxg0103 38eb915d3b fix: standardize spacing in various labels and messages across multiple files 2025-12-10 10:21:52 +08:00
zhangzhanwei 237527ea41 fix: Locales 2025-12-10 10:10:27 +08:00
CaptainB 98c30463ff feat: update folder retrieval to use source_id instead of id for consistency 2025-12-10 10:10:04 +08:00
wxg0103 dab5504ea1 fix: standardize spacing in web knowledge labels and descriptions 2025-12-10 09:40:36 +08:00
CaptainB a23f34b224 feat: update folder retrieval to include id and refactor folder path handling
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-09 21:31:28 +08:00
shaohuzhang1 7b9fae5d24
fix: Set up a complete knowledge base workflow in the loop body, debug prompts that the knowledge base write node cannot be used as the end node (#4476) 2025-12-09 20:24:06 +08:00
wangdan-fit2cloud cc3607936e perf: Fix some style bugs 2025-12-09 19:09:45 +08:00
liqiang-fit2cloud d68acede6f refactor: change error number. 2025-12-09 19:02:49 +08:00
shaohuzhang1 ff3ecb36d4
fix: Knowledge Base Workflow - The icon of the data source tool node in the variable selection drop-down box does not correspond to it (#4475) 2025-12-09 18:17:41 +08:00
zhangzhanwei 4c0132a3aa fix: Error thrown when adding voice model 2025-12-09 18:04:21 +08:00
CaptainB 98121add0b feat: update apiType logic to include shared route handling in tool list request 2025-12-09 17:59:56 +08:00
wangdan-fit2cloud d4d88ac2be fix: optimize style 2025-12-09 17:34:10 +08:00
zhangzhanwei 720cfc7f1e feat: Support photo size change 2025-12-09 17:14:27 +08:00
shaohuzhang1 666c379be9
fix: [Application] When an application with form collection is embedded into the parent application, the conversation will report an error (#4472) 2025-12-09 17:08:57 +08:00
CaptainB a291d6db3f fix: invert condition check for field_value in search document node 2025-12-09 16:56:55 +08:00
shaohuzhang1 bd473498a6
fix: Application The parent application embeds the child application and sets the variable by passing the parameter "akser" through the interface. The sub application is not displayed in the conversation log (#4471)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-09 16:51:33 +08:00
shaohuzhang1 32e5b3273f
fix: The loop nodes in the canvas are prohibited from being copied into the loop body, and the continue and break nodes inside the loop body are also prohibited from being copied into the loop body (#4470) 2025-12-09 15:10:48 +08:00
CaptainB e97ded9dc7 feat: update apiType logic to handle shared route and adjust systemType in tool list request
--bug=1064304 --user=刘瑞斌 【共享资源】共享的工作流知识库编排中,可以使用工作空间下的工具 https://www.tapd.cn/62980211/s/1808141

--bug=1064306 --user=刘瑞斌 【共享资源】共享的工作流知识库中,无法使用没有授权到工作空间的共享工具 https://www.tapd.cn/62980211/s/1808143
2025-12-09 14:43:25 +08:00
wangdan-fit2cloud 752a4d95c3 fix: tool tag display 2025-12-09 12:35:47 +08:00
CaptainB c735aaa427 fix: skip processing when field value is empty in search document conditions 2025-12-09 12:11:26 +08:00
zhangzhanwei 6e87ceffce feat: Support tag in knowledge_workflow 2025-12-09 12:05:00 +08:00
wangdan-fit2cloud 735d3d0121 feat: Document page with execution records 2025-12-09 11:36:33 +08:00
CaptainB 8e7d8d6615 feat: decode base64 file chunks before uploading 2025-12-09 10:38:26 +08:00
CaptainB 6d24d66b9d feat: simplify tool type display logic in resource index
--bug=1064279 --user=刘瑞斌 【资源管理】工具列表缺少来源字段 https://www.tapd.cn/62980211/s/1807766
2025-12-09 10:10:09 +08:00
wangdan-fit2cloud d33dd458cf fix: fix bug
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-08 19:28:29 +08:00
CaptainB e1a12c8684 refactor: optimize image Excel ID extraction logic in common_handle.py
--bug=1064254 --user=刘瑞斌 【github#4430】Excel里带图片的数据超过5行上传后不显示图片 https://www.tapd.cn/62980211/s/1807666
2025-12-08 19:13:51 +08:00
CaptainB 31f230629b chore: remove unused schema definitions from embedding model endpoints
--bug=1064123 --user=刘瑞斌 【接口文档】文档中获取知识库向量模型的接口应该废弃了,建议更新 https://www.tapd.cn/62980211/s/1807620
2025-12-08 18:35:44 +08:00
CaptainB f39e029cda feat: implement aggregation document status retrieval in listener management 2025-12-08 18:30:03 +08:00
shaohuzhang1 eb41ddf151
fix: Application The reference segmentation of the knowledge base retrieval node in the loop body is displayed as 0 (#4466) 2025-12-08 18:19:09 +08:00
shaohuzhang1 29e5f3c382
fix: After one click beautification in the loop body, the workflow of the loop body becomes smaller and smaller. (#4464) 2025-12-08 17:51:16 +08:00
wangdan-fit2cloud 489c7b6b6d fix: Tool store add label 2025-12-08 17:45:26 +08:00
CaptainB 63a624d0f5 feat: add workflow knowledge type to knowledge resource index
--bug=1064202 --user=刘瑞斌 【资源管理】知识库列表的类型应该增加工作流知识库 https://www.tapd.cn/62980211/s/1807481
2025-12-08 17:30:39 +08:00
CaptainB cb3acda519 fix: update condition for displaying tool store title based on template_id 2025-12-08 17:23:33 +08:00
shaohuzhang1 1a303ff4e7
fix: The local file node of the knowledge base workflow has not been verified (#4462) 2025-12-08 17:20:58 +08:00
CaptainB d8d6bcf013 feat: add source filtering to tool resource search functionality 2025-12-08 17:16:40 +08:00
shaohuzhang1 f665b5f500
fix: In the execution details, the display order of the child nodes of the loop body is incorrect (#4461) 2025-12-08 16:58:42 +08:00
CaptainB b85db36464 fix: correct folder_id assignment in systemManage props
--bug=1064207 --user=刘瑞斌 【资源管理】知识库文档分段迁移界面报错,无法获取目标知识库和文档 https://www.tapd.cn/62980211/s/1807411
2025-12-08 16:46:03 +08:00
shaohuzhang1 0a5a05fe07
fix: Workflow Knowledge Base Execution Record Search Result Exception (#4460) 2025-12-08 16:32:54 +08:00
wangdan-fit2cloud 265ee34261 fix: fix bug
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-08 15:52:29 +08:00
shaohuzhang1 ff26835c93
fix: Error in total time consumption statistics for executing records (#4459) 2025-12-08 15:48:48 +08:00
wxg0103 1869b47dde fix: standardize formatting and improve readability in Vue components 2025-12-08 15:40:07 +08:00
shaohuzhang1 5eea07dc8b
fix: update file handling functions (#4456) 2025-12-08 15:24:11 +08:00
wangdan-fit2cloud 8066e125df fix: Fixing icons and importing document addresses 2025-12-08 15:19:52 +08:00
liqiang-fit2cloud 3c8601639c refactor: remove duplicated function. 2025-12-08 15:04:16 +08:00
wxg0103 2a32193c26 fix: update imports to use langchain_aws for Bedrock embeddings and chat models 2025-12-08 14:38:50 +08:00
shaohuzhang1 8a9de5964d
fix: update file handling functions (#4455) 2025-12-08 14:26:44 +08:00
zhangzhanwei bd43d2f135 fix: The input content of the knowledge base write node is empty, but the workflow can be published 2025-12-08 11:36:47 +08:00
liqiang-fit2cloud 1deea980ee refactor: change error number. 2025-12-08 11:29:54 +08:00
CaptainB 44e3958ada feat: add validation logic for node model in index.vue
--bug=1064157 --user=刘瑞斌 【工作流知识库】文档内容提取节点选择文档参数为空,可以发布应用 https://www.tapd.cn/62980211/s/1806944
2025-12-08 11:25:27 +08:00
CaptainB dc0d9e29ce feat: enhance image path handling in markdown processing
--bug=1064136 --user=刘瑞斌 【工作流知识库】上传zip文件,文件中的图片内容没有写入知识库 https://www.tapd.cn/62980211/s/1806941
2025-12-08 11:16:38 +08:00
CaptainB 9d8d395087 feat: add pagination support for knowledge workflow actions 2025-12-08 10:42:35 +08:00
liqiang-fit2cloud ff5150d520 refactor: redirect stdout. 2025-12-08 10:17:56 +08:00
CaptainB b639061d3c fix: update file handling functions and improve documentation
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-12-05 22:07:23 +08:00
CaptainB 32c18ab5ae feat: add file upload functionality and enhance data source handling 2025-12-05 21:38:54 +08:00
wangdan-fit2cloud eb8dbdbaf5 fix: Optimize copywriting 2025-12-05 19:15:09 +08:00
shaohuzhang1 e4c8a25108
fix: After renaming the predecessor node, the variable list was not updated (#4452) 2025-12-05 19:00:00 +08:00
shaohuzhang1 36f4dfbc36
fix: Application List - Hold down Ctrl+to set the new window opened to still be the application list page (#4451) 2025-12-05 18:37:08 +08:00
wxg0103 8874988022 fix: remove incorrect translation for web root address in django.po 2025-12-05 18:28:59 +08:00
shaohuzhang1 12a3e9bbfb
fix: The nodes that can be added in the loop body are missing, and there are multiple recall nodes added (#4450) 2025-12-05 18:23:52 +08:00
liqiang-fit2cloud 407ef1318a Merge remote-tracking branch 'origin/v2' into v2 2025-12-05 18:12:56 +08:00
liqiang-fit2cloud 695d59d1d5 refactor: trim memory. 2025-12-05 18:12:47 +08:00
wangdan-fit2cloud 9acc4bf9a6 fix: Upgrade the UI version and fix style bugs. 2025-12-05 18:10:54 +08:00
shaohuzhang1 bc1f15e843
fix: Local file import, drag and drop upload method to upload files in formats other than allowed (#4449) 2025-12-05 17:59:24 +08:00
zhangzhanwei 6c1451f0e1 refactor: Support different types of aliyun stt model 2025-12-05 17:38:24 +08:00
liqiang-fit2cloud 21437632af refactor: change print to sys.stdout. 2025-12-05 16:45:30 +08:00
wangdan-fit2cloud cdc5fae477 feat: Execution records and details function 2025-12-05 16:38:08 +08:00
liqiang-fit2cloud 3eff896f2d refactor: change print to sys.stdout. 2025-12-05 16:25:54 +08:00
wxg0103 f5feddf6ab feat: add translations for file upload error messages in django.po 2025-12-05 16:04:57 +08:00
wangdan-fit2cloud 92237e4dcf perf: Execution record 2025-12-05 15:10:25 +08:00
shaohuzhang1 3a7818dc9e
fix: Clicking on the website data source cannot open the data source settings interface (#4446) 2025-12-05 15:06:15 +08:00
shaohuzhang1 5cfd88e64d
fix: Application List - Open in More Actions to go to the chat, page returns 404 (#4445) 2025-12-05 14:48:13 +08:00
wxg0103 4c4d8dd05d fix: enhance file upload limit check to account for multiple conditions 2025-12-05 14:31:35 +08:00
wxg0103 b2a0290960 fix: correct file upload limit check to include existing URLs 2025-12-05 14:17:32 +08:00
liqiang-fit2cloud 4d0ac41a97 refactor: change dir permission. 2025-12-05 13:21:26 +08:00
CaptainB ff167c2238 chore: update django dependency to version 5.2.9
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-05 12:47:25 +08:00
shaohuzhang1 5bd29f622c
fix: The data source Tree uses fetc_list_function (#4444) 2025-12-05 12:36:57 +08:00
liqiang-fit2cloud d4bd49ba9d refactor: change dir permission. 2025-12-05 12:36:33 +08:00
shaohuzhang1 94af9e45bd
fix: When adding a new node, the default execution condition is' all ', which often results in errors. Adjust it to default to any (#4443) 2025-12-05 11:59:27 +08:00
shaohuzhang1 d835e24d35
fix: When there are user input parameters in the workflow, the data source setting information is cleared after returning to the previous step from the user input page (#4442) 2025-12-05 11:31:28 +08:00
CaptainB b58ed36a7b fix: update file limit binding in LocalFileUpload component
--bug=1064093 --user=刘瑞斌 【工作流知识库】本地文件数据源节点,设置每次最多上传文件数限制无效 https://www.tapd.cn/62980211/s/1806155
2025-12-05 11:21:41 +08:00
wxg0103 2d68fdaa00 feat: add publish label for English and Chinese translations in common.ts 2025-12-05 11:13:28 +08:00
shaohuzhang1 3b3dfa5719
fix: Workflow Execution details can be filtered using status filtering (#4441) 2025-12-05 11:13:17 +08:00
CaptainB c3ddf24d27 fix: update form_data binding to use with_filter_type in index.vue 2025-12-05 11:10:52 +08:00
CaptainB a70e27b9c0 feat: add additional nodeCascaderRefs for enhanced validation
--bug=1064068 --user=刘瑞斌 【工作流知识库】文档分段节点高级分段时,分段长度、自动清洗选项切换参数引用方式会互相影响 https://www.tapd.cn/62980211/s/1806124
2025-12-05 11:05:23 +08:00
wangdan-fit2cloud 8dc3cae775 perf: Optimize copywriting 2025-12-05 11:04:28 +08:00
CaptainB a5a27445d6 fix: update problem_list population to use append for titles and document names
--bug=1064074 --user=刘瑞斌 【工作流知识库】高级分段时,文档名称、分段标题作为问题异常,被切割成单字问题了 https://www.tapd.cn/62980211/s/1806119
2025-12-05 10:56:37 +08:00
CaptainB ce6b41d78e fix: handle None case for cell_value in xlsx_parse_table_handle
--bug=1064042 --user=刘瑞斌 【工作流知识库】QA问答对分段时,分段的问题为空,导入后关联问题为 None https://www.tapd.cn/62980211/s/1806084
2025-12-05 10:47:24 +08:00
shaohuzhang1 3627d8ac4f
fix: The data source Tree uses fetc_list_function (#4440) 2025-12-05 10:46:26 +08:00
CaptainB 44326c3a7c fix: update item name assignment in base_document_split_node to handle default case 2025-12-05 10:25:35 +08:00
CaptainB 6503053cd1 fix: handle file name for uploaded files starting with http
--bug=1064094 --user=刘瑞斌 【工作流知识库】本地文件导入的文档,文档名称显示错误,都显示成file.txt https://www.tapd.cn/62980211/s/1806074
2025-12-05 10:17:30 +08:00
CaptainB 7aa13a4206 fix: remove unused fetch_list_function logic in KnowledgeWorkflowSerializer 2025-12-05 09:59:27 +08:00
wxg0103 0535e7b8ce fix: enforce maximum file upload limit in file upload component 2025-12-05 09:21:04 +08:00
CaptainB 433f0b1ca0 fix: Remove debug print statement from ToolSerializer
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-04 21:30:50 +08:00
CaptainB b10ce2296b fix: Update tool_type assignment in ToolSerializer to use tool_data value 2025-12-04 21:30:10 +08:00
CaptainB cec3381954 fix: Update tool_type assignment in ToolSerializer to use instance value 2025-12-04 21:21:53 +08:00
wangdan-fit2cloud 37e366251e perf: Style optimization 2025-12-04 20:52:40 +08:00
wangdan-fit2cloud d3e88eae29 feat: Execution details record
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-04 20:30:28 +08:00
liqiang-fit2cloud 778d379cc5 fix: set --graceful-timeout to 5 min. 2025-12-04 19:47:45 +08:00
liqiang-fit2cloud 72ca3bb30e Merge remote-tracking branch 'origin/v2' into v2 2025-12-04 19:42:56 +08:00
liqiang-fit2cloud cbdfb31211 fix: set --graceful-timeout to 60. 2025-12-04 19:42:47 +08:00
wangdan-fit2cloud d193546ba5 perf: Optimize some styles 2025-12-04 19:41:15 +08:00
CaptainB 3a70e3cb49 feat: enhance datasource URL generation in KnowledgeWorkflow and update fetch function handling 2025-12-04 19:10:26 +08:00
CaptainB 2ce4f9af92 feat: enhance Markdown parsing by splitting content into sheets and adding sheet titles 2025-12-04 19:10:26 +08:00
shaohuzhang1 8fd568dd97
fix: Workflow Basic Node User Input Configurable Title (#4439) 2025-12-04 18:58:32 +08:00
wangdan-fit2cloud 317d630cfa perf: Execution details 2025-12-04 18:48:11 +08:00
wxg0103 3e1d34b83d feat: add getFile function to retrieve file URLs in application and chat modules 2025-12-04 18:24:33 +08:00
zhangzhanwei b664ab571f fix: Tool lib return button 2025-12-04 18:11:14 +08:00
shaohuzhang1 a846514a1c
fix: Knowledge Base Workflow Execution List (#4437) 2025-12-04 17:55:08 +08:00
wangdan-fit2cloud 6fd4c1fd31 perf: Organize translation files 2025-12-04 17:03:03 +08:00
wxg0103 f2266c8d2a fix: handle None case for video_list in base_video_understand_node 2025-12-04 16:44:21 +08:00
wxg0103 41b7f79202 fix: restore v-model binding for file list in upload component 2025-12-04 16:43:50 +08:00
wxg0103 6c0d094aa6 feat: add video understanding node with multilingual support 2025-12-04 16:35:06 +08:00
wxg0103 3ae440185e fix: correct file limit condition to allow maximum file uploads 2025-12-04 16:18:49 +08:00
wxg0103 356b0ab9c4 fix: correct file limit condition to allow maximum file uploads 2025-12-04 16:13:35 +08:00
liqiang-fit2cloud f8ada9a110 refactor: remove init parameter from class ToolExecutor. 2025-12-04 15:40:50 +08:00
wangdan-fit2cloud b034737b35 perf: Optimize icons 2025-12-04 15:22:55 +08:00
CaptainB a197cfc69d feat: implement CSV, XLS, and XLSX content extraction with Markdown formatting 2025-12-04 14:33:19 +08:00
shaohuzhang1 c4dd09ca1e
feat: Knowledge Base Workflow Execution Record (#4435) 2025-12-04 14:22:46 +08:00
zhangzhanwei 0db2622663 fix: Knowledge workflow permission 2025-12-04 13:47:06 +08:00
liqiang-fit2cloud 94eb6959d9 feat: add MAXKB_SANDBOX_PYTHON_PROCESS_LIMIT_CPU_CORES env.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-04 11:23:33 +08:00
CaptainB 447393a544 fix: ensure document ID is converted to string in document list
--bug=1064030 --user=刘瑞斌 【知识库】工作流知识库的文档内容提取节点输出的文档列表,id字段是个UUID对象,后续节点引用后无法解析,需要转成字符串输出 https://www.tapd.cn/62980211/s/1805648
2025-12-04 10:57:34 +08:00
CaptainB e83f2bd55b feat: remove duplicate name validation from knowledge workflows 2025-12-04 10:46:02 +08:00
wxg0103 648d8878eb fix: restore functionality to push valid files to the file list 2025-12-04 10:38:16 +08:00
CaptainB 9594b4fef6 fix: improve problem list population in custom split strategy
--bug=1064029 --user=刘瑞斌 【知识库】工作流知识库使用高级分段时,开启文档标题或名称关联问题开关,分段失败 https://www.tapd.cn/62980211/s/1805605
2025-12-04 10:03:27 +08:00
wxg0103 517a4de54e feat: add SQL queries for token usage and top questions analytics 2025-12-04 09:14:58 +08:00
wangdan-fit2cloud a0103aa014 fix: Adjust execution details and fix some bugs. 2025-12-03 19:25:53 +08:00
wxg0103 c0f0eb43e3 feat: update SQL queries to support edition-based logic in application stats 2025-12-03 18:49:21 +08:00
zhangzhanwei 62fa6d5cfe pref: Remove return content button 2025-12-03 18:16:11 +08:00
liqiang-fit2cloud b1db3a6c25 perf: simplify initialization of ToolExecutor. 2025-12-03 17:46:13 +08:00
shaohuzhang1 9539082092
fix: Workflow knowledge base import button error (#4429) 2025-12-03 17:17:22 +08:00
CaptainB ac9bb0d288 feat: enhance Result.vue to determine API type based on route 2025-12-03 17:15:23 +08:00
CaptainB 48baeac102 feat: add upload document endpoint to knowledge workflow 2025-12-03 17:10:48 +08:00
wxg0103 7c8bbef86d fix: add show-password attribute to private key and certificate inputs in Saml2.vue 2025-12-03 17:08:16 +08:00
CaptainB 0d8958847f feat: include is_publish flag in workflow serialization 2025-12-03 16:55:26 +08:00
zhangzhanwei 85b408ecd1 fix: Shared knowledge workflow back 2025-12-03 16:40:00 +08:00
wxg0103 4591d4d322 fix: optimize SQL queries for token usage and top questions with improved username handling 2025-12-03 15:37:02 +08:00
wangdan-fit2cloud 2bcb43eaf7 perf: Style optimization 2025-12-03 15:22:08 +08:00
shaohuzhang1 d07fc150dd
fix: Default data for local file nodes (#4426) 2025-12-03 15:16:03 +08:00
zhangzhanwei 877d413b1d fix: Workflow save before publish 2025-12-03 15:11:05 +08:00
zhangzhanwei 751cdc4299 fix: Node height 2025-12-03 14:49:17 +08:00
zhangzhanwei dbac0201a8 fix: Knowledge write node height 2025-12-03 14:45:08 +08:00
liqiang-fit2cloud 243cc6ccd2 feat: catch memory error. 2025-12-03 14:39:34 +08:00
liqiang-fit2cloud 46f5a6c9ce Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-12-03 14:35:34 +08:00
zhangzhanwei b2d2063843 feat: Locales 2025-12-03 14:28:16 +08:00
zhangzhanwei e626e0e0e4 fix: Resource permission list does not display non-regular user roles 2025-12-03 14:10:28 +08:00
wxg0103 1d2919094b fix: correct error handling in URL processing function 2025-12-03 14:03:17 +08:00
CaptainB 44ff544e35 feat: call radioChange on component mount
--bug=1063991 --user=刘瑞斌 【工具】- 选择【数据源】后,切换到应用或知识库菜单,再切换回工具列表,数据显示不准确 https://www.tapd.cn/62980211/s/1805110
2025-12-03 12:51:01 +08:00
liqiang-fit2cloud bdf75ba3f0 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-12-03 12:25:48 +08:00
CaptainB 6308ee4ff3 feat: add test connection endpoint for system tools
--bug=1063992 --user=刘瑞斌 【资源管理】mcp工具在资源管理中测试连接一直转圈 https://www.tapd.cn/62980211/s/1805081
2025-12-03 12:09:25 +08:00
CaptainB 13b1525806 fix: remove MCP tool type restriction from copy and export permissions
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-03 11:58:15 +08:00
shaohuzhang1 842b4ddc85
fix: Workflow knowledge base execution supports document removal and continued import (#4420) 2025-12-03 11:47:09 +08:00
liqiang-fit2cloud f55f38bce3 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-12-03 11:35:33 +08:00
liqiang-fit2cloud 6960262757 feat: add mem limit. 2025-12-03 11:35:23 +08:00
zhangzhanwei fb2c1b05cf feat: Locales 2025-12-03 11:30:38 +08:00
CaptainB ec238b7132 feat: set current working directory for sandbox execution 2025-12-03 11:23:18 +08:00
wangdan-fit2cloud 68a7a0f4dc perf: Optimize icons 2025-12-03 11:15:24 +08:00
zhangzhanwei 2f0df1f204 feat: Knowledge workflow edit permission 2025-12-03 10:43:00 +08:00
CaptainB ae0a34a220 chore: remove newline character from split characters in split_model.py 2025-12-03 10:32:36 +08:00
liqiang-fit2cloud 71f1e26c8f refactor: run python code without su -. 2025-12-03 09:52:02 +08:00
wangdan-fit2cloud 39d4ebc49c perf: Optimize translation
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-02 21:02:41 +08:00
wangdan-fit2cloud d39a27f360 perf: Knowledge base workflow adjustment 2025-12-02 19:51:01 +08:00
CaptainB 9255089d8b feat: enhance PDF content extraction with font size analysis
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-02 19:22:56 +08:00
liqiang-fit2cloud c76f514738 Merge remote-tracking branch 'origin/v2' into v2 2025-12-02 18:41:04 +08:00
liqiang-fit2cloud e04d7d7cd4 refactor: add comment. 2025-12-02 18:40:49 +08:00
shaohuzhang1 7531bfd450
fix: Switching data sources during debugging of multiple Feishu data sources in the knowledge base workflow may result in the inability to obtain the document list (#4417) 2025-12-02 18:39:30 +08:00
wangdan-fit2cloud 745adf930e fix: Adding nodes in the execution details 2025-12-02 18:33:57 +08:00
CaptainB 54e4423d84 feat: add document_list to context in base_document_split_node 2025-12-02 18:28:20 +08:00
CaptainB 275e59501c feat: add additional context variables to document split node 2025-12-02 18:24:41 +08:00
CaptainB 8c802c3d01 feat: add Markdown parsing support for QA handling 2025-12-02 18:20:01 +08:00
CaptainB 582fb99b9e feat: add Markdown parsing support for QA handling 2025-12-02 17:39:28 +08:00
liqiang-fit2cloud ee539322ad feat: banned host support CIDR. 2025-12-02 16:58:07 +08:00
zhangzhanwei 953fc5f434 feat: Knowledge workflow save interface 2025-12-02 16:43:19 +08:00
shaohuzhang1 0a233cae84
fix: The knowledge base workflow upload defaults to selecting the first one (#4415) 2025-12-02 16:20:15 +08:00
liqiang-fit2cloud bfb5949582 Merge remote-tracking branch 'origin/v2' into v2 2025-12-02 16:07:59 +08:00
liqiang-fit2cloud 0638f6951a fix: handle long arguments in sandbox. 2025-12-02 16:07:51 +08:00
CaptainB 6ad6241e15 fix: correct logo image width in KnowledgeSetting component 2025-12-02 16:03:51 +08:00
wxg0103 7a77610bcf fix: correct error handling in URL processing function 2025-12-02 16:00:59 +08:00
liqiang-fit2cloud 9b621bc783 fix: handle long arguments in sandbox. 2025-12-02 15:42:55 +08:00
shaohuzhang1 d83d70aecf
fix: Upload documents from the workflow knowledge base (#4414) 2025-12-02 15:40:49 +08:00
wangdan-fit2cloud f6ddd7afa3 fix: Fix import document router error 2025-12-02 15:24:15 +08:00
CaptainB 3a83472d77 feat: add source_file_id to document split and knowledge write nodes 2025-12-02 15:19:31 +08:00
CaptainB 97bd98e6ce feat: allow additional knowledge type in template condition 2025-12-02 14:58:19 +08:00
zhangzhanwei e39aa24dca feat: Knowledge workflow back route permission 2025-12-02 14:56:18 +08:00
wxg0103 60e9916360 fix: raise exception for file size limit exceeded 2025-12-02 14:44:55 +08:00
wxg0103 ecdf558672 fix: update mp3 MIME type and improve file upload error handling 2025-12-02 14:40:45 +08:00
wxg0103 33da607302 feat: implement AWS Bedrock Vision-Language and Reranker models with credential validation 2025-12-02 14:27:38 +08:00
wangdan-fit2cloud 12bc39ff65 fix: Fix import document router error 2025-12-02 14:21:40 +08:00
shaohuzhang1 848b48b490
fix: After modifying the dialogue prefix, the embedded page cannot have a conversation (#4411) 2025-12-02 14:12:24 +08:00
CaptainB 35b6fe13a1 feat: add knowledge version management endpoints and publish functionality 2025-12-02 12:53:33 +08:00
wxg0103 16f4d2a721 feat: add upload method selection prompt to file upload settings 2025-12-02 11:40:01 +08:00
zhangzhanwei ac97e6026f fix: Knowledge workflow route 2025-12-02 11:27:28 +08:00
wxg0103 8e5aa084f6 fix: restructure local upload component for improved readability
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-02 11:06:55 +08:00
CaptainB a8c4e48e31 feat: enhance form layout and add dynamic selection for chunk size, patterns, and limits 2025-12-02 10:13:25 +08:00
wangdan-fit2cloud 4b417edbbf perf: Knowledge base workflow document import
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-12-01 18:28:54 +08:00
shaohuzhang1 f29a8c3701
fix: The knowledge base workflow data source can only be the starting node (#4409) 2025-12-01 18:19:32 +08:00
wxg0103 7e9c440869 feat: add upload method label translations to workflow settings 2025-12-01 17:47:58 +08:00
shaohuzhang1 7e1c2c2166
fix: Unable to parse expression (#4408) 2025-12-01 17:25:46 +08:00
wxg0103 0f6cd8afc3 fix: update file upload limit handling to use dictionary access 2025-12-01 16:26:36 +08:00
wxg0103 a9692ee681 feat: add langchain-aws dependency for enhanced functionality 2025-12-01 16:01:43 +08:00
wxg0103 4c70a5cc93 feat: add langchain-aws dependency for enhanced functionality 2025-12-01 15:54:28 +08:00
CaptainB ad869bc9c6 feat: remove unique constraint on knowledge workflow version 2025-12-01 15:52:29 +08:00
CaptainB 117212a580 chore: update typos_check.yml to exclude loopEdge.ts from checks 2025-12-01 15:50:12 +08:00
wangdan-fit2cloud c9656e8804 fix: Fix table rendering errors 2025-12-01 15:28:19 +08:00
shaohuzhang1 cbbdef0462
feat: Knowledge base workflow release, version management function (#4405)
* feat: Knowledge base workflow release, version management function

* feat: Knowledge base workflow release, version management function
2025-12-01 15:04:25 +08:00
liqiang-fit2cloud e3c36b3476 refactor: catch more exception details. 2025-12-01 14:52:05 +08:00
CaptainB c2658fa735 feat: update file name for existing records based on sha256_hash and knowledge/document IDs 2025-12-01 14:36:36 +08:00
CaptainB 056f79a8b8 feat: update shared knowledge workflow API and adjust data source handling 2025-12-01 13:30:05 +08:00
CaptainB f08a9c53d4 feat: add knowledge workflow management endpoints and related functionality 2025-12-01 13:19:35 +08:00
wangdan-fit2cloud 769790a768 fix: Fix table rendering errors 2025-12-01 12:43:42 +08:00
CaptainB 9e3b16c3ce feat: add success message for document replacement in multiple languages 2025-12-01 12:19:36 +08:00
wxg0103 8a147dddb6 fix: set default table height to 300 for improved layout 2025-12-01 11:39:31 +08:00
liqiang-fit2cloud 5b393e92d6 fix: remove useless code caused by merge. 2025-12-01 11:25:25 +08:00
CaptainB e9d4ac38ac feat: enhance knowledge serialization to include workflow details
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-11-28 19:17:36 +08:00
wangdan-fit2cloud e0bbf06357 fix: Fix document routing issues 2025-11-28 18:26:03 +08:00
wxg0103 caafea2cc0 feat: add Docker AI provider to the model provider list 2025-11-28 17:44:46 +08:00
wxg0103 becfd1f4a9 feat: add Docker AI icon SVG asset 2025-11-28 17:41:00 +08:00
zhangzhanwei 35fe162032 feat: Knowledge write node chunk embeding 2025-11-28 17:36:00 +08:00
shaohuzhang1 8a1284d075
fix: build type-check error (#4400) 2025-11-28 16:58:43 +08:00
wxg0103 590a7a38f3 feat: implement Docker AI model provider with various model credentials and parameters 2025-11-28 16:49:08 +08:00
CaptainB 62cbb7a8dc feat: add workflow knowledge card to KnowledgeSetting component 2025-11-28 16:42:47 +08:00
CaptainB 6ca265dae8 feat: add chunk_size parameter to document splitting and chunk handling 2025-11-28 16:05:12 +08:00
CaptainB 1a1722c4a6 refactor: enhance chunk size input with tooltip for better user guidance 2025-11-28 15:48:23 +08:00
shaohuzhang1 bfae088df6
feat: knowledge workflow (#4399)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
* feat: init knowledge workflow

* feat: add knowledge workflow and version models, serializers, and API views

* feat: knowledge workflow

* feat: knowledge workflow

* feat: add KnowledgeWorkflowModelSerializer and Operate class for workflow management

* fix: route

* feat: knowledge workflow

* feat: Knowledge workflow permission

* feat: knowledge workflow

* feat: knowledge workflow

* feat: knowledge workflow

* feat: knowledge workflow

* feat: Data source web node

* fix: Back route

* feat: knowledge workflow

* feat: knowledge workflow

* feat: Knowledge write node

* feat: add Data Source tool functionality and localization

* feat: add Data Source tool functionality and localization

* feat: knowledge workflow

* feat: knowledge workflow

* fix: simplify export tool permission check in ToolListContainer.vue

* fix: simplify export condition in ToolResourceIndex.vue

* fix: simplify condition for copying tool in ToolListContainer

* feat: knowledge workflow

* fix: Upload local files and add output fields

* feat: Knowledge write

* feat: add Document Split Node functionality and localization

* feat: add Document Split Node functionality and localization

* feat: Knowledge write

* feat: enhance Document Split Node with result processing and problem list generation

* fix: Allow problem be blank

* feat: enhance Document Split Node with result processing and problem list generation

* feat: tool datasource

* fix: Optimization of knowledge base workflow execution logic

* refactor: streamline image handling by updating application and knowledge ID management

* refactor: streamline image handling by updating application and knowledge ID management

* feat: extend support modes in variable aggregation node to include knowledge workflows

* feat: Chunks stored

* refactor: simplify file handling in document extraction by removing unnecessary byte conversion and enhancing file saving logic

* refactor: update file ID assignment in document extraction to use provided metadata

* feat: Workflow menu that distinguishes between applications and knowledge bases

* refactor: update file ID assignment in document extraction to use provided metadata

* fix: Add workspace ID as workflow execution parameter

* feat: add code template for Data Source tool form functionality

* refactor: remove unused sys import and improve module handling

* feat: Execution details support loading status

* refactor: update tool type handling and improve category merging logic

* feat: Alter fork depth

* fix: ensure filterList is properly initialized and updated in getList function

* refactor: simplify ToolStoreDialog by removing unused toolType logic

* perf: Optimize the style

* style: adjust div width for improved layout in Tree component

* refactor: improve polling mechanism for knowledge workflow action

* fix: Get workspace_id from workflow params

* fix: filter out 'file_bytes' from result in get_details method

* feat: add recursive filtering for file_bytes in context data

* fix: append results to paragraph_list instead of replacing it

* perf: Optimize translation files

* fix: include document name in bytes_to_uploaded_file call for better file handling

* refactor: optimize buffer retrieval in document processing

* refactor: remove redundant parameter from bytes_to_uploaded_file call

* fix: Page style optimization

* feat: add slider for setting limit in document rules form

* feat: add workflow knowledge management endpoints and related functionality

* fix: swap file size and file count limits in form inputs

* refactor: update tool_config args to use list format for improved readability

* feat: Node supports knowledge base workflow

* feat: Node supports knowledge base workflow

* fix: Basic node data cannot be obtained in the workflow

* style: Knowledge base workflow debugging page style adjustment

* fix: Loop nodes cannot be used in the knowledge base workflow

* fix: Knowledge base workflow variable assignment node

* feat: add chunk size slider to form for custom split strategy

* fix: Workflow style optimization

---------

Co-authored-by: CaptainB <bin@fit2cloud.com>
Co-authored-by: zhangzhanwei <zhanwei.zhang@fit2cloud.com>
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-11-28 15:38:20 +08:00
liqiang-fit2cloud cf59cca8bd fix: change dir permission. 2025-11-28 14:14:31 +08:00
liqiang-fit2cloud 594b7b27fa Merge remote-tracking branch 'origin/v2' into v2 2025-11-28 11:22:48 +08:00
liqiang-fit2cloud 64561a7b67 fix: forbid sandbox to replace process, only creating is permitted 2025-11-28 11:22:38 +08:00
wxg0103 47939ac6c0 fix: correct typo in application_id parameter for get_url endpoint 2025-11-28 10:17:54 +08:00
wxg0103 15a44158be feat: update get_url endpoint to include application ID in the URL 2025-11-28 10:16:13 +08:00
liqiang-fit2cloud 94b2659019 refactor: use /tmp instead of /opt/maxkb-app/sandbox/tmp if SANDBOX_TMP_DIR_ENABLED is enabled. 2025-11-28 10:13:48 +08:00
liqiang-fit2cloud ca9fa9d10d refactor: change TMPDIR env. 2025-11-28 09:58:35 +08:00
liqiang-fit2cloud 9f18d3ce07 refactor: change heartbeat file dir. 2025-11-28 09:35:52 +08:00
liqiang-fit2cloud f67aef11fd fix: os.execvp() can create subprocess.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-27 20:11:38 +08:00
zhangzhanwei d9ecf8cc9c fix: Generate prompt 2025-11-27 18:22:46 +08:00
wxg0103 a05335a0b3 feat: update getFile function to include application ID for URL retrieval 2025-11-27 17:44:36 +08:00
wxg0103 8c3caa27dd feat: refactor URL content retrieval to use a dedicated function with application checks 2025-11-27 17:37:00 +08:00
liqiang-fit2cloud 94e60b073f refactor: optimize timeout exception msg. 2025-11-27 16:56:20 +08:00
liqiang-fit2cloud 3bfe400d70 build: fix gcc error in arm64. 2025-11-27 16:08:58 +08:00
liqiang-fit2cloud 916a8fe67c deps: upgrade redis-server. 2025-11-27 15:53:49 +08:00
liqiang-fit2cloud 2d0e0b45c4 deps: upgrade redis-server. 2025-11-27 15:46:20 +08:00
liqiang-fit2cloud 715adc13c5 deps: upgrade redis-server. 2025-11-27 15:41:51 +08:00
liqiang-fit2cloud 10b466ba91 refactor: change lib dir.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-27 11:21:55 +08:00
liqiang-fit2cloud af9bf0d99c refactor: change lib dir. 2025-11-27 10:52:42 +08:00
liqiang-fit2cloud c74cfebebf Revert "deps: upgrade redis-server."
This reverts commit d3e7d81c33.
2025-11-27 10:51:35 +08:00
liqiang-fit2cloud d3e7d81c33 deps: upgrade redis-server. 2025-11-27 10:48:28 +08:00
liqiang-fit2cloud 674e34a735 refactor: change lib dir. 2025-11-27 10:29:20 +08:00
liqiang-fit2cloud f341930795 security: not allow to create subprocess in sandbox by default.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-26 15:18:43 +08:00
liqiang-fit2cloud 74ba4ce4fc fix: kill all processes after timeout.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-26 14:01:43 +08:00
liqiang-fit2cloud 9ec9cf7e0f fix: kill all processes after timeout. 2025-11-26 12:23:15 +08:00
liqiang-fit2cloud 0222d9e89a Merge remote-tracking branch 'origin/v2' into v2 2025-11-26 12:16:30 +08:00
liqiang-fit2cloud fd4c14f8e8 refactor: format code. 2025-11-26 12:16:20 +08:00
fit2cloudzhao 2cdd42ccd3 fix: Fix the non-empty check of the tool input parameters 2025-11-26 11:42:19 +08:00
wxg0103 9a474b2302 feat: implement SAML2 authentication with configuration options 2025-11-26 11:31:04 +08:00
liqiang-fit2cloud a89b1ff6d9 security: not allow to create subprocess in sandbox by default. 2025-11-26 11:24:59 +08:00
zhangzhanwei 7da64a2268 feat: Filter user by role
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-25 15:22:58 +08:00
liqiang-fit2cloud 197d514cb4 refactor: clear all env from sandbox. 2025-11-25 14:33:13 +08:00
liqiang-fit2cloud ec0be20525 Merge remote-tracking branch 'origin/v2' into v2
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-25 10:58:28 +08:00
liqiang-fit2cloud 75da3bd82d refactor: format code. 2025-11-25 10:58:17 +08:00
dependabot[bot] 938098948f chore(deps): bump pypdf in the pip group across 1 directory
Bumps the pip group with 1 update in the / directory: [pypdf](https://github.com/py-pdf/pypdf).


Updates `pypdf` from 6.1.3 to 6.4.0
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/6.1.3...6.4.0)

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.4.0
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 10:37:57 +08:00
liqiang-fit2cloud 5e909a4ba1 feat: add MAXKB_SANDBOX_PYTHON_PROCESS_TIMEOUT_SECONDS env. 2025-11-25 10:27:08 +08:00
liqiang-fit2cloud eb30b88d10 refactor: remove MAXKB_SANDBOX_PYTHON_BANNED_KEYWORDS.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-24 18:42:06 +08:00
liqiang-fit2cloud 057e0420cf security: not allow to create subprocess in sandbox by default. 2025-11-24 18:25:20 +08:00
wxg0103 3670ec27de feat: enhance image generation by supporting multiple model types
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-24 10:33:17 +08:00
CaptainB fff59daa9c chore: update langchain dependencies to latest versions for some security fix
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-23 14:13:53 +08:00
liqiang-fit2cloud d6a3a3cf1f refactor: change dir permissions.
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-11-21 15:05:32 +08:00
liqiang-fit2cloud 49e52aa53c refactor: change dir permissions. 2025-11-21 14:58:59 +08:00
liqiang-fit2cloud e27d39c1ac refactor: change dir permissions. 2025-11-21 14:10:28 +08:00
liqiang-fit2cloud 491c39f4d0 refactor: change dir permissions. 2025-11-21 12:23:36 +08:00
liqiang-fit2cloud a9b6f2b211 refactor: change dir permissions. 2025-11-21 10:35:47 +08:00
liqiang-fit2cloud fb37c57b53 refactor: change dir permissions.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-21 09:37:19 +08:00
wangdan-fit2cloud dfd26dea40 perf: One click beautification within the loop node
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-20 15:17:46 +08:00
liqiang-fit2cloud c114eff9b6 refactor: change dir permissions. 2025-11-20 14:46:48 +08:00
wxg0103 56a8795b33 feat: add local and URL upload options with validation messages 2025-11-20 10:23:20 +08:00
liqiang-fit2cloud 8c0836627a refactor: remove print.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-19 17:16:22 +08:00
wxg0103 18b40f3664 fix: remove unnecessary print statement from model invocation
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-19 16:24:49 +08:00
wxg0103 05b59a4d35 fix: remove unnecessary print statement from model invocation 2025-11-19 15:40:59 +08:00
wxg0103 27dd90c7df feat: enhance token management and normalize content handling in chat model 2025-11-19 15:14:54 +08:00
liqiang-fit2cloud 7d3f92bd51 fix: fix incorrect permission may introduce security vulnerabilities. 2025-11-19 14:32:05 +08:00
wxg0103 9d4b2bf010 feat: enhance image and video handling by supporting URLs and file IDs
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-18 18:27:11 +08:00
liqiang-fit2cloud 30494cf6de refactor: avoid using temp files in sandbox. 2025-11-18 17:46:13 +08:00
liqiang-fit2cloud 390ab83ed4 refactor: avoid using temp files in sandbox. 2025-11-18 16:48:22 +08:00
liqiang-fit2cloud da5c4b0ee2 refactor: avoid using temp files in sandbox.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-18 16:10:08 +08:00
liqiang-fit2cloud dec1431560 refactor: avoid using temp files in sandbox. 2025-11-18 15:55:34 +08:00
zhangzhanwei e939c6e85a fix: Reason content 2025-11-18 15:29:46 +08:00
liqiang-fit2cloud 1a35ddb074 Merge remote-tracking branch 'origin/v2' into v2 2025-11-18 14:57:01 +08:00
liqiang-fit2cloud 6a1c3786f4 refactor: avoid using temp files in sandbox. 2025-11-18 14:56:52 +08:00
wangdan-fit2cloud 7b5e5ab9db perf: Workflow allows opening new windows with the Ctrl key. 2025-11-18 14:54:51 +08:00
liqiang-fit2cloud 24b8a7bab1 refactor: avoid using temp files in sandbox. 2025-11-18 14:37:12 +08:00
liqiang-fit2cloud 8bfce62ad8 refactor: avoid using temp files in sandbox. 2025-11-18 14:27:48 +08:00
wangdan-fit2cloud 6d38a71906 perf: Login authentication added prompt message 2025-11-18 11:22:19 +08:00
wangdan-fit2cloud f09b68d301 perf: Optimize tool store style 2025-11-17 17:54:27 +08:00
zhangzhanwei 7ec4e7cefa fix: Mcp error raise
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-17 15:37:30 +08:00
liqiang-fit2cloud 60a66c47a1 fix: fix incorrect permission may introduce security vulnerabilities. 2025-11-17 14:35:04 +08:00
liqiang-fit2cloud c1eb6ac621 fix: fix incorrect permission may introduce security vulnerabilities. 2025-11-17 12:46:26 +08:00
liqiang-fit2cloud d12b74f27c fix: fix incorrect permission may introduce security vulnerabilities. 2025-11-17 12:23:55 +08:00
liqiang-fit2cloud 94df0bb5f7 Merge remote-tracking branch 'origin/v2' into v2 2025-11-17 11:16:41 +08:00
liqiang-fit2cloud 79988b170c fix: fix incorrect permission may introduce security vulnerabilities. 2025-11-17 11:16:31 +08:00
zhangzhanwei 9f8d7d6108 fix: About read permission 2025-11-17 11:07:33 +08:00
liqiang-fit2cloud 91e8e833a9 fix: fix incorrect permission may introduce security vulnerabilities. 2025-11-17 10:59:09 +08:00
CaptainB 37d886e9ed refactor: optimize RSA encryption and decryption functions with caching
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-11-14 22:15:09 +08:00
shaohuzhang1 23147e5498
perf: Memory optimization (#4362) 2025-11-14 22:08:02 +08:00
zhangzhanwei f3350980c7 perf: Memory optimization
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-14 18:42:53 +08:00
wangdan-fit2cloud 48c4ffc7b4 feat: Application overview adds user token statistics 2025-11-14 16:51:56 +08:00
wangdan-fit2cloud 7db2714197 perf: url upload style
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-13 18:13:40 +08:00
CaptainB 97eb80882b chore: pre build v2.4.0-dev 2025-11-13 16:30:20 +08:00
CaptainB 2afc0b976d feat: enhance tool message generation with input and output formatting
--story=1020020 --user=刘瑞斌 【个人】mcp 调用可以展示出 request 和 response ,有时候 查询结果不对或不符合预期,可能是 request 入参不对 https://www.tapd.cn/62980211/s/1798256
2025-11-13 16:21:35 +08:00
wxg0103 93770b7ed0 feat: add comments to clarify token usage and top questions data structure 2025-11-13 15:13:19 +08:00
wxg0103 40c327d49a feat: add translations for application token usage and top question statistics 2025-11-13 15:02:25 +08:00
wxg0103 a1d8117839 fix: update top questions statistics terminology from "top10" to "top" 2025-11-13 15:01:58 +08:00
wxg0103 0555632095 feat: add token usage and top questions statistics endpoints 2025-11-13 14:56:56 +08:00
wxg0103 74b1bce315 feat: add token usage and top questions statistics retrieval 2025-11-13 14:55:47 +08:00
wangdan-fit2cloud 719ba08c6e perf: Optimize the display of the header username
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-11-12 17:58:01 +08:00
wxg0103 697f6509bb fix: increase username and nickname length validation to 4-64 characters 2025-11-12 16:52:51 +08:00
CaptainB 4f58295d39 feat: add default manager to AppModelMixin 2025-11-12 15:31:41 +08:00
CaptainB 30fdae34c6 fix: change default value of with_valid parameter in save method to True 2025-11-12 15:10:26 +08:00
wxg0103 8f3d5ec940 fix: update username length validation to 4-64 characters 2025-11-12 14:26:39 +08:00
wxg0103 153a3faa8a fix: update WeCom QR code iframe URL to use state instead of accessToken
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-12 11:42:13 +08:00
zhangzhanwei a568cfe893 fix: Whisper stt model 2025-11-12 11:31:53 +08:00
wxg0103 e8c6e75a09 fix: include accessToken in WeCom QR code iframe URL 2025-11-12 11:28:21 +08:00
CaptainB b148152c94 fix: update terminology from "documents" to "problems" in batch generation 2025-11-12 11:05:56 +08:00
shaohuzhang1 523164f319
fix: After adding form collection at the loop node, the variables from subsequent nodes in the loop become empty (#4351) 2025-11-12 10:43:52 +08:00
liqiang-fit2cloud a6a0f56d88 refactor: rename env CORE_WORKER to MAXKB_CORE_WORKER. 2025-11-12 08:55:11 +08:00
CaptainB decd060304 chore: adjust default worker count calculation in command.py
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-11 20:41:55 +08:00
liqiang-fit2cloud 71165cdb71 refactor: add code comment.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-11 18:32:52 +08:00
liqiang-fit2cloud d0f696d222 Merge remote-tracking branch 'origin/v2' into v2 2025-11-11 18:13:32 +08:00
liqiang-fit2cloud 324f836fdd refactor: never restart core worker if worker=1. 2025-11-11 18:13:21 +08:00
wangdan-fit2cloud fc35a6b3ae fix: Fixing the display of conversation time during dialogue 2025-11-11 17:09:18 +08:00
wangdan-fit2cloud ecdbeaad73 feat: The dividing line in the directory section can be dragged and dropped 2025-11-11 15:54:07 +08:00
wxg0103 371e4e6a09 fix: remove streaming parameter from GeminiImage initialization 2025-11-11 14:47:56 +08:00
CaptainB 3b448ddec7 chore: update element-plus to 2.11.7 and jspdf to 3.0.3 in package.json 2025-11-11 13:33:29 +08:00
zhangzhanwei f1766f921b fix: Application read permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-10 11:38:22 +08:00
zhangzhanwei 7f1299e8c5 fix: When having read permission for the application, the application settings page can be viewed 2025-11-10 10:58:16 +08:00
liqiang-fit2cloud 1ed1bbc1b0 refactor: throw EACCES error for IP, throw EAI_FAIL for domain name.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-10 10:08:57 +08:00
liqiang-fit2cloud ad1742fd0f refactor: delete .SANDBOX_BANNED_HOSTS file if SANDBOX_PYTHON_BANNED_KEYWORDS is empty/ 2025-11-10 09:39:54 +08:00
CaptainB da73582093 refactor: enhance init_scheduler to include xpack job execution
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-11-07 21:12:29 +08:00
CaptainB 42d91e232b refactor: remove scheduler service and related code 2025-11-07 21:02:27 +08:00
wxg0103 0ca2306039 fix: add optional chaining to breadcrumbData length check 2025-11-07 18:09:46 +08:00
shaohuzhang1 ccc8c06c51
refactor: add cl100k_base.tiktoken tokenizer. (#4331)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-07 16:09:26 +08:00
liqiang-fit2cloud f6c70da5ff refactor: add cl100k_base.tiktoken tokenizer. 2025-11-07 15:34:36 +08:00
liqiang-fit2cloud f9c1742b43 refactor: change model path in MKTokenizer. 2025-11-07 14:57:04 +08:00
shaohuzhang1 f457588cd5
feat: Local model validation using local_madel (#4330) 2025-11-07 14:43:40 +08:00
shaohuzhang1 3f6453eb3a
feat: Using the HuggingFace tokenizer (#4329) 2025-11-07 13:29:17 +08:00
liqiang-fit2cloud fa0cd61584 fix: ensure worker count is properly converted to integer for max_requests 2025-11-07 11:18:02 +08:00
liqiang-fit2cloud 9a0fa37254 fix: fix typo. 2025-11-07 11:12:57 +08:00
liqiang-fit2cloud 180ee40cdc refactor: set MAXKB_SANDBOX_HOME env. 2025-11-07 11:10:14 +08:00
liqiang-fit2cloud 22fb0b55bf Merge remote-tracking branch 'origin/v2' into v2 2025-11-07 11:02:27 +08:00
liqiang-fit2cloud 83814b30f2 refactor: ban host.docker.internal access by default. 2025-11-07 11:02:17 +08:00
CaptainB fe7d75d720 fix: ensure worker count is properly converted to integer for max_requests 2025-11-07 10:33:06 +08:00
CaptainB a8dc1e00d4 fix: add .SANDBOX_BANNED_HOSTS to .gitignore 2025-11-07 10:20:28 +08:00
CaptainB 6b8a9bdc74 fix: correct parameter name for graceful timeout in Gunicorn configuration 2025-11-07 10:19:40 +08:00
liqiang-fit2cloud 7a4594db66 refactor: set timeout for workers. 2025-11-07 10:13:24 +08:00
liqiang-fit2cloud 207a67dcc2 refactor: never restart scheduler worker if worker=1. 2025-11-07 10:04:16 +08:00
liqiang-fit2cloud ea2c2f9e2b refactor: never restart local_model worker if LOCAL_MODEL_HOST_WORKER=1. 2025-11-07 09:58:15 +08:00
liqiang-fit2cloud ff570a3c71 refactor: read SANDBOX_BANNED_HOSTS from file instead of env. 2025-11-07 09:47:35 +08:00
wangdan-fit2cloud 1263592221 feat: Folder directories support moving or dragging.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-06 21:02:55 +08:00
shaohuzhang1 6df1e19eaa
fix: dependency package (#4328) 2025-11-06 20:17:21 +08:00
CaptainB 806393f28c fix: update globals_v initialization to use an empty dictionary in tool_code.py 2025-11-06 17:18:23 +08:00
liqiang-fit2cloud 0bd9e170fb Merge remote-tracking branch 'origin/v2' into v2 2025-11-06 16:52:57 +08:00
liqiang-fit2cloud c1fbb41aa5 refactor: forbidden access by hostname or docker ip. 2025-11-06 16:52:47 +08:00
shaohuzhang1 8cabf823e8
fix: dependency package (#4325)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-06 16:46:20 +08:00
liqiang-fit2cloud f0ecad6de1 refactor: rename MAXKB_SANDBOX_PYTHON_ALLOW_HOSTS_REGEXES to MAXKB_SANDBOX_PYTHON_BANNED_HOSTS 2025-11-06 15:41:35 +08:00
shaohuzhang1 1b464c4d8f
fix: Rearrange model dependency (#4324) 2025-11-06 14:24:48 +08:00
liqiang-fit2cloud 3ab17c61ff Merge remote-tracking branch 'origin/v2' into v2 2025-11-06 11:23:20 +08:00
liqiang-fit2cloud 6e39df454c refactor: rename MAXKB_SANDBOX_PYTHON_ALLOW_HOSTS_REGEXES to MAXKB_SANDBOX_PYTHON_ALLOW_HOST_REGEXES 2025-11-06 11:23:09 +08:00
shaohuzhang1 8a0a807763
fix: Set the startup environment variables (#4322) 2025-11-06 11:22:36 +08:00
CaptainB 6ac10785c9 fix: set environment variables for LD_PRELOAD and SANDBOX_ALLOW_HOSTS_REGEXES in sandbox execution 2025-11-06 11:10:37 +08:00
liqiang-fit2cloud 9029240931 refactor: rename MAXKB_SANDBOX_PYTHON_BANNED_HOSTS to MAXKB_SANDBOX_PYTHON_ALLOW_HOSTS_REGEXES 2025-11-06 11:03:48 +08:00
shaohuzhang1 88fc5dd398
fix: Set the startup environment variables (#4321) 2025-11-06 10:31:14 +08:00
dependabot[bot] a4d8595dbf
chore(deps): bump django in the pip group across 1 directory (#4320)
Bumps the pip group with 1 update in the / directory: [django](https://github.com/django/django).


Updates `django` from 5.2.7 to 5.2.8
- [Commits](https://github.com/django/django/compare/5.2.7...5.2.8)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.8
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-06 09:26:14 +08:00
CaptainB bb7dfbc2fe fix: set environment variables for banned hosts and preload library in sandbox execution
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-05 21:19:53 +08:00
shaohuzhang1 ebf54aa12f
fix: Application workflow, after the loop ends, there is a recall node that cannot have a conversation (#4319) 2025-11-05 19:53:01 +08:00
shaohuzhang1 a8d0729e65
perf: Memory optimization (#4318) 2025-11-05 19:05:26 +08:00
liqiang-fit2cloud 1f4d6d1123 feat: add MAXKB_SANDBOX_PYTHON_BANNED_HOSTS env to ban host for sandbox in tools code. 2025-11-05 19:03:17 +08:00
liqiang-fit2cloud f0be269cdc feat: add MAXKB_SANDBOX_PYTHON_BANNED_HOSTS env to ban host for sandbox in tools code. 2025-11-05 18:44:57 +08:00
wangdan-fit2cloud d7a6de1515 fix: Fixed the issue where resource authorization modifications would automatically fold subfolders 2025-11-05 17:37:27 +08:00
liqiang-fit2cloud 1d749a4a92 feat: add MAXKB_SANDBOX_PYTHON_BANNED_HOSTS env to ban host for sandbox in tools code. 2025-11-05 17:00:50 +08:00
liqiang-fit2cloud b7152867a3 feat: add MAXKB_SANDBOX_PYTHON_BANNED_HOSTS env to ban host for sandbox in tools code. 2025-11-05 16:55:29 +08:00
liqiang-fit2cloud 9971df1a02 feat: add MAXKB_SANDBOX_PYTHON_BANNED_HOSTS env to ban host for sandbox in tools code. 2025-11-05 16:43:17 +08:00
CaptainB a30d0d07d1 revert: add Gunicorn preload option and initialize shared resources
This reverts commit 1af14bdb27.
2025-11-05 16:39:54 +08:00
CaptainB 2a64d281ab fix: add empty environment variable dictionary for subprocess execution
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-05 12:45:31 +08:00
CaptainB 1af14bdb27 feat: add Gunicorn preload option and initialize shared resources 2025-11-05 12:38:00 +08:00
liqiang-fit2cloud d9b7810cc8 fix: remove env from sandbox. 2025-11-05 12:37:46 +08:00
wangdan-fit2cloud b841d862a8 perf: Optimize file directory style 2025-11-05 11:44:57 +08:00
CaptainB ddc60dd1c3 revert: add subprocess handling for local model and conditional post handler execution
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
This reverts commit 8e3550eb83.
2025-11-04 19:25:56 +08:00
zhangzhanwei 26a3067992 feat: Folder move order by name 2025-11-04 17:49:11 +08:00
wxg0103 9fb5e2a084 fix: remove WeCom JSSDK dependency from package.json 2025-11-04 16:40:03 +08:00
wxg0103 8c054c23f5 fix: adjust iframe styling for WeCom QR code component 2025-11-04 16:35:26 +08:00
wxg0103 c7443757f0 fix: update WeCom QR code handling to use iframe and include callback URL 2025-11-04 16:05:34 +08:00
zhangzhanwei eb867daa6c feat: Folder move
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-11-04 15:05:12 +08:00
CaptainB 8e3550eb83 feat: add subprocess handling for local model and conditional post handler execution 2025-11-04 14:19:06 +08:00
wangdan-fit2cloud 065a44315a fix: Revise the copy 2025-11-04 14:15:38 +08:00
liqiang-fit2cloud 1fd6d13242 perf: revert preload. 2025-11-04 14:00:32 +08:00
liqiang-fit2cloud c3ab9f458d perf: revert preload. 2025-11-04 13:56:20 +08:00
liqiang-fit2cloud 701c962c2e perf: revert preload. 2025-11-04 13:35:53 +08:00
liqiang-fit2cloud 65bcb28aa8 perf: revert preload. 2025-11-04 13:33:22 +08:00
liqiang-fit2cloud 28c2f517fc perf: revert preload. 2025-11-04 13:02:12 +08:00
liqiang-fit2cloud ab170c843e perf: revert preload. 2025-11-04 11:20:29 +08:00
liqiang-fit2cloud 792d32d7e1 perf: revert preload. 2025-11-04 11:03:56 +08:00
liqiang-fit2cloud dc9c4c9e01 perf: revert preload. 2025-11-04 10:40:55 +08:00
liqiang-fit2cloud 8c788bf785 perf: revert preload. 2025-11-04 09:31:27 +08:00
CaptainB 5b46e7d730 chore: update document deletion logic to handle paragraph IDs and related mappings
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
--bug=1063248 --user=刘瑞斌 【知识库】删除文档时,分段与问题的关联关系没有清除 https://www.tapd.cn/62980211/s/1793500
2025-11-03 16:38:32 +08:00
王旭辉 d636d6ea7a fix(vector): 修复 source_type 判断类型问题
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
- 将 source_type 转换为字符串后再与枚举值比较
- 避免了类型不匹配导致的判断错误
- 确保了数据分块功能的正常运行
2025-11-03 10:44:21 +08:00
shaohuzhang1 fcd258d05c
fix: The maximum limit for application dialogue has been modified to 10000000 times (#4302) 2025-11-03 10:20:20 +08:00
liqiang-fit2cloud 33b4efa2a5 fix: fix LD_PRELOAD env.
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-10-31 18:36:44 +08:00
liqiang-fit2cloud 4c5317ca51 fix: fix LD_PRELOAD env. 2025-10-31 18:35:28 +08:00
liqiang-fit2cloud 3f986c5f65 fix: fix LD_PRELOAD env. 2025-10-31 18:19:31 +08:00
shaohuzhang1 a0d3031b4f
fix: Unable to export dialogue log data due to error (#4298) 2025-10-31 14:00:06 +08:00
zhangzhanwei 2a15017523 fix: XF stt model 2025-10-31 13:49:24 +08:00
wangdan-fit2cloud 90f4830d82 fix: Fix the shared knowledge base list issue
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-31 13:12:14 +08:00
wangdan-fit2cloud 0dc1d74cd1 perf: Optimize copywriting
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-30 17:59:31 +08:00
zhangzhanwei d9bda9679d fix: Migration 2025-10-30 17:23:50 +08:00
CaptainB d0cd6d657a refactor: replace get_embedding_model_default_params with get_model_default_params 2025-10-30 17:12:30 +08:00
CaptainB 1b08643b98 fix: enhance embedding model retrieval with default parameters 2025-10-30 17:05:23 +08:00
CaptainB ed19db07d1 feat: add function to retrieve default parameters for embedding models
--bug=1063177 --user=刘瑞斌 【知识库】-知识库使用的模型更换维度参数值并重新向量化后,命中测试、检索报错 https://www.tapd.cn/62980211/s/1792117
2025-10-30 17:00:38 +08:00
wxg0103 2de6bd2018 chore: update file hashes for community 2025-10-30 16:24:21 +08:00
zhangzhanwei aba41c4a4b fix: Migrate file 2025-10-30 15:38:41 +08:00
wangdan-fit2cloud c4e70be7b4 fix: Fix translation issues and multi-line input form issues 2025-10-30 15:36:01 +08:00
wxg0103 ab434b0a9e fix: add retry mechanism for file uploads and response handling in image.py 2025-10-30 15:34:41 +08:00
zhangzhanwei 775aa9148c fix: Embedding model setting 2025-10-30 14:32:59 +08:00
zhangzhanwei 274dfdae5c fix: Model get in migration file 2025-10-30 14:27:46 +08:00
CaptainB 543f83a822 refactor: update ZhipuChatModel to use BaseChatOpenAI and improve token counting
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
--bug=1061305 --user=刘瑞斌 【应用】ai对话启用工具后部分模型(智谱)不统计tokens https://www.tapd.cn/62980211/s/1791683
2025-10-30 11:12:43 +08:00
zhangzhanwei ef162bdc3e fix: Folder permission of workspace manager 2025-10-30 10:12:24 +08:00
zhangzhanwei c86306a67e fix: Common user folder permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-29 18:32:09 +08:00
wangdan-fit2cloud 3c7e5ff3b6 perf: Variable aggregation node adds sorting and modifies some styling issues 2025-10-29 18:26:37 +08:00
shaohuzhang1 ebb3c74dc5
fix: The starting node of the loop in the loop body should be prohibited from deletion (#4287) 2025-10-29 16:56:18 +08:00
shaohuzhang1 2298bf6992
fix: After enabling identity authentication in the application, the knowledge base retrieves the reference document list variable, but there is no content retrieved when asking questions on the application dialogue page (#4286) 2025-10-29 15:53:37 +08:00
wangdan-fit2cloud b423e8a26f fix: Fix prompt errors 2025-10-29 15:34:59 +08:00
zhangzhanwei 2cf1ad7ea4 fix: In the variable aggregation strategy that returns the first non-null value of each group, empty strings, empty lists, and empty objects are not treated as null values 2025-10-29 15:34:34 +08:00
CaptainB a4b7b8dbbb fix: improve error logging in tools.py to include exception info 2025-10-29 15:08:57 +08:00
wangdan-fit2cloud a84be67d4d fix: Variable aggregation node adds execution details 2025-10-29 14:37:07 +08:00
shaohuzhang1 28001613f8
fix: When the workflow does not respond, there is an error in the historical chat record data (#4282) 2025-10-29 13:43:02 +08:00
wangdan-fit2cloud a1898e837a fix: variable aggregation node style
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-29 11:29:22 +08:00
zhangzhanwei 52316895d4 fix: Tool folder 2025-10-29 11:09:14 +08:00
zhangzhanwei 855d2b25d3 fix: The component list in the loop body is missing variable aggregation
--bug=1063074 --user=张展玮 【应用】循环体中组件列表缺少变量聚合 https://www.tapd.cn/62980211/s/1790996
2025-10-29 10:12:56 +08:00
shaohuzhang1 2151c51f78
fix: Variable assignment data type converted (#4279)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-28 18:32:11 +08:00
wangxuhui 57195f277a
fix(permission): 修复权限常量解析操作符索引错误 (#4275)
- 修正了权限字符串解析时操作符索引,从原来的第三部分改为第二部分
- 确保权限实例创建时操作符获取正确
- 改善权限常量解析的准确性和稳定性

Co-authored-by: 王旭辉 <2569429256@qq.com>
2025-10-28 18:31:31 +08:00
wxg0103 82224271e8 fix: update video handling to return URLs instead of base64 encoding 2025-10-28 18:21:08 +08:00
zhangzhanwei 79b47bb1b3 feat: Node execute 2025-10-28 18:09:52 +08:00
wxg0103 02311687c8 fix: update video format handling in base_video_understand_node.py 2025-10-28 17:55:54 +08:00
wxg0103 28d403f237 fix: update message handling in image.py to support multiple message types 2025-10-28 16:24:21 +08:00
wxg0103 79fce87e93 fix: add video format detection for uploaded files in image.py 2025-10-28 15:54:56 +08:00
wxg0103 6af51a4235 fix: add support for VideoUnderstandNode in ExecutionDetailCard.vue
--bug=1063024 --user=王孝刚 【应用】执行详情中,视频理解节点没有显示消耗tokens数据 https://www.tapd.cn/62980211/s/1790772
2025-10-28 15:21:56 +08:00
shaohuzhang1 b679b17f56
fix: When extracting parameters, input parameters that are not strings result in the node being unable to execute (#4276) 2025-10-28 15:18:27 +08:00
wxg0103 e9db3a598c feat: add generate prompt button and improve code formatting in index.vue 2025-10-28 15:11:04 +08:00
CaptainB e6b67274a3 chore: update el-select to fetch tags on focus and remove unused watch
--bug=1063013 --user=刘瑞斌 【应用编排】文档标签检索组件没有同步知识库更新的标签 https://www.tapd.cn/62980211/s/1790748
2025-10-28 14:55:21 +08:00
wangdan-fit2cloud 8f20f4b002 perf: Optimize copywriting 2025-10-28 14:16:41 +08:00
shaohuzhang1 871e810918
fix: Resource authorization: "Select All" is ineffective (#4274) 2025-10-28 11:29:17 +08:00
zhangzhanwei c3acbeff63 feat: Locales
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-28 11:09:37 +08:00
zhangzhanwei 22f72c5d33 fix: Remove duplicate user id 2025-10-28 10:23:15 +08:00
wxg0103 e17d7c4d10 feat: add file upload method with base64 encoding in image.py 2025-10-28 10:15:22 +08:00
zhangzhanwei 2a096152b0 fix: Tool permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-27 18:05:24 +08:00
wangdan-fit2cloud 8ecb6a855c fix: workflow multi-selection 2025-10-27 17:47:57 +08:00
zhangzhanwei e17bb8f5dd fix: Locales 2025-10-27 17:47:13 +08:00
shaohuzhang1 8dbef83d7a
fix: After uploading the file, ask a question. After completing the question and answer, change the answer and the file will not be uploaded again, resulting in the loss of file information (#4269) 2025-10-27 17:38:30 +08:00
shaohuzhang1 f3bf9e2388
fix: The application export loop node cannot be used (#4268) 2025-10-27 17:31:52 +08:00
zhangzhanwei aaa0dab747 fix: Workspace manager folder 2025-10-27 17:09:07 +08:00
shaohuzhang1 03e4bda814
fix: Alibaba Cloud Bailian Stream Response (#4266) 2025-10-27 17:02:53 +08:00
wxg0103 267bdae924 feat: enhance video processing by adding video model parameter and implement file upload to OSS 2025-10-27 16:43:27 +08:00
zhangzhanwei 8bfbac671c fix: Workspace permission table 2025-10-27 16:37:33 +08:00
shaohuzhang1 ea8ad1db45
fix: After uploading the file, ask a question. After completing the question and answer, change the answer and the file will not be uploaded again, resulting in the loss of file information (#4262) 2025-10-27 15:24:24 +08:00
zhangzhanwei 1174ee11c6 fix: Folder authorization of common user
--bug=1062968 --user=张展玮 【应用】普通用户对自己管理的文件夹进行资源授权,生效资源选择所有子资源,授权报错 https://www.tapd.cn/62980211/s/1790231
2025-10-27 14:38:11 +08:00
shaohuzhang1 9a46cac406
fix: Folder and Resource Selection Interaction Abnormality (#4260) 2025-10-27 14:30:37 +08:00
CaptainB d147b794ce chore: replace split_text with smart_split_paragraph in pdf_split_handle.py 2025-10-27 14:23:42 +08:00
zhangzhanwei 8da6f7421c fix: Parameter configuration function
--bug=1062940 --user=张展玮 【资源管理】资源管理列表,向量模型、语音识别模型缺少参数设置功能 https://www.tapd.cn/62980211/s/1790202
2025-10-27 14:20:21 +08:00
zhangzhanwei 2fc4a393ad feat: Group field dialog 2025-10-27 13:47:31 +08:00
wangdan-fit2cloud 42d7aeb5bf perf: Generate prompt words to add copy 2025-10-27 13:33:24 +08:00
wangdan-fit2cloud 42de3e0bd6 fix: Optimize copywriting 2025-10-27 13:33:24 +08:00
CaptainB 25d4e3d502 chore: refactor embedding model parameter handling 2025-10-27 12:50:54 +08:00
CaptainB 18543a0703 feat: add OpenAI embedding model parameters form
--bug=1062976 --user=刘瑞斌 【模型】openai的向量模型,设置dimensions参数后,向量化失败 https://www.tapd.cn/62980211/s/1790130
2025-10-27 12:46:49 +08:00
shaohuzhang1 58f29ee2f6
fix: Resource authorization Sub-resource authorization Parent directory cascading authorization (#4255)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-10-24 17:09:22 +08:00
wangdan-fit2cloud f8a9da4582 fix: Optimize style 2025-10-24 16:39:58 +08:00
zhangzhanwei 982b34e2a7 Return to the corresponding permission directory and locate the tool folder 2025-10-24 16:34:37 +08:00
shaohuzhang1 2ecdb66307
fix: Resource authorization selection directory checkbox Cancel optimization (#4253) 2025-10-24 16:25:54 +08:00
CaptainB bc1afb9020 chore: update mermaid to version 11.12.0 2025-10-24 16:15:21 +08:00
wangdan-fit2cloud 177e58d295 fix: Optimize loop node
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-24 15:12:06 +08:00
shaohuzhang1 53082141cb
fix: Subsequent nodes in the form have lost reference data (#4251) 2025-10-24 14:49:07 +08:00
zhangzhanwei 8fda8196f2 fix: Xinference add
--bug=1062934 --user=张展玮 【github#4242】添加xinference平台的语音识别模型失败 https://www.tapd.cn/62980211/s/1789683
2025-10-24 14:42:11 +08:00
zhangzhanwei 08418b98f1 fix: Root folder permission of knowledge and tool
--bug=1062946 --user=张展玮 【资源授权】为普通用户授权知识库、工具根目录的管理权限,普通用户不能管理知识库、工具的根目录 https://www.tapd.cn/62980211/s/1789640
2025-10-24 14:03:12 +08:00
shaohuzhang1 2dee3532ff
feat: Variable assignment nodes support ending nodes (#4247) 2025-10-24 11:59:08 +08:00
zhangzhanwei a66e636aa4 feat: Variable aggregation node 2025-10-24 11:49:31 +08:00
wangdan-fit2cloud 4393db9f05 fix: Fix the issue with tag management 2025-10-24 11:37:22 +08:00
shaohuzhang1 586c3536ca
feat: AI dialogue nodes support historical chat history parameters (#4245) 2025-10-24 11:35:27 +08:00
wxg0103 47c27e58f7 fix: update username regex validation to allow any characters within length constraints 2025-10-24 11:07:30 +08:00
CaptainB 609667d9d3 chore: optimize knowledge ID retrieval in base_search_knowledge_node
--bug=1062936 --user=刘瑞斌 【应用】应用访问限制开启登录认证,登录后对话,知识库引用文档标签检索节点的输出参数报错 https://www.tapd.cn/62980211/s/1789493
2025-10-24 10:38:00 +08:00
wangdan-fit2cloud 4398500200 perf: Optimize copywriting
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-23 18:36:13 +08:00
CaptainB e994e848a9 chore: update search question label handling and add validation for new nodeCascader reference
--bug=1062930 --user=刘瑞斌 【文档标签检索】检索设置为自动,检索问题没有必填标记,为空时调试,提示信息不准确 https://www.tapd.cn/62980211/s/1789361
2025-10-23 18:12:24 +08:00
CaptainB 4cda73ba57 refactor: optimize document matching logic for tag conditions 2025-10-23 17:43:28 +08:00
CaptainB 27b74580a4 chore: update document.py to create and associate new source file ID in metadata 2025-10-23 16:41:15 +08:00
wangdan-fit2cloud 4d081d9fd0 fix: Fix the issue of image enlargement in the paragraph 2025-10-23 16:21:03 +08:00
CaptainB e71cf925ba chore: add tag setting option to document dropdown 2025-10-23 15:17:45 +08:00
CaptainB 9c0e79114f fix: correct dropdown item disabled logic and handle new position assignment 2025-10-23 14:20:35 +08:00
dependabot[bot] 14ff47a409 build(deps): bump pypdf in the pip group across 1 directory
Bumps the pip group with 1 update in the / directory: [pypdf](https://github.com/py-pdf/pypdf).


Updates `pypdf` from 6.0.0 to 6.1.3
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/6.0.0...6.1.3)

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.1.3
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-23 12:36:43 +08:00
CaptainB 096c72513f feat: add handling for missing source files in document processing
--bug=1062915 --user=刘瑞斌 【知识库】快速创建的文档,替换原文档报错,找不到源文件 https://www.tapd.cn/62980211/s/1789099
2025-10-23 11:48:44 +08:00
CaptainB a584378002 chore: update file query to include document_id in filter
--bug=1062912 --user=刘瑞斌 【知识库】文档-替换原文档成功,但是下载原文档依然是替换前的文档 https://www.tapd.cn/62980211/s/1789094
2025-10-23 11:43:13 +08:00
CaptainB 1070d27d2a feat: add translations for tag management messages in django.po
--bug=1062907 --user=刘瑞斌 【知识库】创建或编辑标签,标签或标签值重复的异常提示没有国际化 https://www.tapd.cn/62980211/s/1789069
2025-10-23 11:11:13 +08:00
CaptainB 75d79918b8 fix: ensure unique tag IDs when creating new document tags
--bug=1062908 --user=刘瑞斌 【知识库】文档标签设置,添加标签时,重复选择相同的标签,添加报错 https://www.tapd.cn/62980211/s/1789052
2025-10-23 10:55:03 +08:00
CaptainB d7748ac68b fix: update TooltipLabel usage to correctly reference item.label 2025-10-23 10:49:53 +08:00
CaptainB cfa80800d6 chore: update migration to alter systemsetting type and remove duplicates 2025-10-23 10:49:53 +08:00
liqiang-fit2cloud 85d6a2696d perf: try to reduce memory usage by adding env LD_PRELOAD. 2025-10-23 10:47:07 +08:00
liqiang-fit2cloud af5d0dcb9f perf: try to reduce memory usage by adding --preload argument for multi workers. 2025-10-23 10:25:25 +08:00
liqiang-fit2cloud c5aa570482 perf: try to reduce memory usage by decreasing default core workers to 2. 2025-10-23 10:20:05 +08:00
wangdan-fit2cloud 978579af10 perf: refine style
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-22 19:38:14 +08:00
shaohuzhang1 7b3c1c7823
fix: The parameter extraction node does not display input parameters in the execution details (#4239) 2025-10-22 18:24:55 +08:00
shaohuzhang1 c5dfbde07c
fix: Error parameter not popped up prompt during variable splitting and parameter extraction node verification (#4238) 2025-10-22 17:57:16 +08:00
shaohuzhang1 fe2180ba3d
fix: When collecting data from the multiple-choice box of the form collection node, it is recommended to support pressing enter to select the option (#4237) 2025-10-22 17:34:25 +08:00
shaohuzhang1 9c6bf019c8
fix: Variable splitting and parameter extraction result in data loss when there is a form collection node (#4236) 2025-10-22 17:10:27 +08:00
shaohuzhang1 173994e65a
feat: Add SECRET_KEY environment variable settings (#4235) 2025-10-22 16:51:02 +08:00
wxg0103 92e8a9105f feat: update encryption process to use UTF-8 encoding for login form data 2025-10-22 16:40:46 +08:00
shaohuzhang1 9faebd8a41
fix: Variable splitting node expression not validated (#4233) 2025-10-22 16:33:22 +08:00
shaohuzhang1 c4526afb1a
fix: After adding parameters to the variable splitting parameter extraction node, the subsequent node parameters were not updated (#4231) 2025-10-22 16:02:06 +08:00
wxg0103 678122fe9e feat: update video file extensions and clean up code formatting in file upload settings 2025-10-22 15:01:01 +08:00
shaohuzhang1 b36e8f5350
perf: Optimize the export of conversation logs (#4230) 2025-10-22 14:53:42 +08:00
zhangzhanwei 57271e97be feat: Update django migration 2025-10-22 14:50:23 +08:00
wangdan-fit2cloud 6ea020f7f5 perf: Add a description of the parameters passed to the start node interface 2025-10-22 14:43:28 +08:00
zhangzhanwei 4648f08f98 feat: About permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-22 14:13:49 +08:00
CaptainB 887de56877 feat: enhance model handling with default parameters and cache model check 2025-10-22 12:30:47 +08:00
wangdan-fit2cloud 92d5e17600 feat: Execution details of variable splitting and parameter extraction 2025-10-22 11:55:49 +08:00
zhangzhanwei 4487964d17 feat: Replace source file permission 2025-10-22 11:25:11 +08:00
wangdan-fit2cloud c3fca96c98 perf: Optimize multiple selections 2025-10-22 11:19:44 +08:00
CaptainB 147eea4160 feat: implement bulk update for files with matching SHA256 hash 2025-10-22 10:43:32 +08:00
zhangzhanwei c0ae78411e feat: Tag permission interface 2025-10-22 10:18:41 +08:00
zhangzhanwei 2d38540070 feat: Tag Permission 2025-10-22 10:15:08 +08:00
CaptainB 219fe97c87 feat: Add document_id_list parameter to query methods in vector classes 2025-10-22 10:04:37 +08:00
wangdan-fit2cloud 09c5c9c042 feat: Variable Splitting Node and Parameter Extraction Node
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-21 19:30:24 +08:00
shaohuzhang1 727c8bfa98
feat: Enhance dynamic form rendering (#4223) 2025-10-21 19:25:22 +08:00
CaptainB da7f0edecd refactor: configure logging levels for mcp and mcp.server 2025-10-21 17:59:25 +08:00
wangdan-fit2cloud 6485d12646 feat: Support folder authorization(#3853) 2025-10-21 17:03:21 +08:00
zhangzhanwei 0bc635a802 feat: Folder Permission 2025-10-21 15:15:59 +08:00
CaptainB f6c72b44c2 refactor: simplify return statement in get_reference_content method
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-21 11:59:07 +08:00
CaptainB c8c26bb6d3 fix: correct tool_params reset logic in index.vue
--bug=1062838 --user=刘瑞斌 【应用】MCP 节点切换下一个参数引用上一个参数会被删除 https://www.tapd.cn/62980211/s/1788333
2025-10-21 11:46:24 +08:00
CaptainB c31142eeab feat: add tag filtering and input support in document search functionality 2025-10-21 10:38:16 +08:00
zhangzhanwei 349402b2d8 feat: Folder authorization can optionally include sub-resources 2025-10-21 10:22:03 +08:00
CaptainB cbac86a15d fix: update valueMessage placeholders in application workflow for consistency 2025-10-21 10:08:43 +08:00
wxg0103 674cd614eb feat: update routing to navigate to chat with access token after OAuth2 callback 2025-10-21 09:25:33 +08:00
wxg0103 39aaee8e02 fix: handle empty message case in common.py and update username regex validation in user.py
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-20 18:42:55 +08:00
wxg0103 39bd4de6ee feat: enhance script loading with error handling and cleanup, update routing for chat navigation 2025-10-20 18:10:55 +08:00
wangdan-fit2cloud 75eab6749e feat: The document supports setting tags 2025-10-20 17:31:49 +08:00
CaptainB aa42c6f76f feat: add API method for replacing source files in documents 2025-10-20 15:51:04 +08:00
CaptainB 620d4ff996 feat: add document replacement functionality with file upload 2025-10-20 15:32:30 +08:00
wangdan-fit2cloud 76ba9d0513 feat: Add tag management 2025-10-20 15:05:54 +08:00
CaptainB ba5f86d6df feat: add API endpoint and methods for retrieving workspace knowledge tags
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-20 11:32:44 +08:00
CaptainB 9d1149b5ca feat: add isShared parameter to loadSharedApi calls in ParagraphCard, SelectDocumentDialog, and index components 2025-10-20 11:06:33 +08:00
wangdan-fit2cloud e458236455 fix: Cancel the switch mode of the dialogue window(#4202) 2025-10-20 10:58:52 +08:00
shaohuzhang1 c9a614cad0
feat: The form collection 'multiple-choice box' supports custom input (#4218) 2025-10-20 10:57:39 +08:00
shaohuzhang1 6f1c83d287
feat: The judge supports `startsWith` and `endsWith` (#4217) 2025-10-20 10:48:03 +08:00
shaohuzhang1 c0c15d8983
fix: When there is a form node in the loop node, the loop data is lost (#4214)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-10-17 18:13:13 +08:00
wangdan-fit2cloud 62873d882f feat: create tag function 2025-10-17 18:03:59 +08:00
CaptainB 6eaca43d6e feat: simplify dataProcessing node by removing redundant list entries 2025-10-17 17:58:09 +08:00
zhangzhanwei 4b0dd1b7c0 feat: Variable aggregation 2025-10-17 17:31:59 +08:00
CaptainB 3e1e434dbf feat: delete associated DocumentTag entries when deleting documents 2025-10-17 17:27:02 +08:00
liqiang-fit2cloud 55dc3a67e1 build: remove Check Disk Space step. 2025-10-17 16:34:14 +08:00
wangdan-fit2cloud 93efd15f04 feat: Add Document Search node function 2025-10-17 16:31:09 +08:00
shaohuzhang1 5189816069
fix: Workflow adding nodes sometimes fails to connect correctly to anchor points (#4211) 2025-10-17 16:02:20 +08:00
shaohuzhang1 505947ded2
fix: Cannot use form collection in loop (#4210) 2025-10-17 15:44:36 +08:00
CaptainB ffc5c9e555 chore: remove unused import from HistoryPanel.vue 2025-10-17 15:39:12 +08:00
shaohuzhang1 8ff4e50669
fix: Loop body supports parameter extraction nodes (#4209) 2025-10-17 15:23:39 +08:00
wxg0103 828e74f635 feat: update user sync terminology for clarity in English and Chinese 2025-10-17 15:21:29 +08:00
shaohuzhang1 c25a950650
feat: Support parameter extraction nodes (#4208) 2025-10-17 15:18:33 +08:00
wangdan-fit2cloud a4330e30a8 fix: Fix operate log page error 2025-10-17 14:30:22 +08:00
zhangzhanwei f5f88b3db2 feat: Refresh user profile after create folder 2025-10-17 14:04:22 +08:00
CaptainB c9266e6631 chore: some i18n 2025-10-17 12:55:12 +08:00
CaptainB 947152ed33 feat: enhance search functionality with dynamic scope selection and improved UI 2025-10-17 11:43:56 +08:00
zhangzhanwei 3ba1a0be7b feat: Tree-structured data query 2025-10-17 11:39:06 +08:00
wxg0103 087f707002 feat: update OAuth2 callback functions to include access token handling for DingTalk and Lark 2025-10-17 11:14:03 +08:00
CaptainB 79fbc52741 feat: add search document node functionality and related configurations 2025-10-17 10:27:31 +08:00
wangdan-fit2cloud ff763c4944 perf: ‌optimize breadcrumb‌
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-16 18:37:47 +08:00
zhangzhanwei da74718b67 feat: Create a composite unique key to remove duplicate data
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-16 16:45:03 +08:00
wxg0103 5fdb6dc34b feat: add video message handling and improve video context processing 2025-10-16 15:14:41 +08:00
wangdan-fit2cloud 57b3aa1254 fix: Fix the issue where the display history setting does not take effect(#4201) 2025-10-16 14:11:56 +08:00
wangdan-fit2cloud 1f4dd3577c fix: Fix the start node cannot be deleted 2025-10-16 11:25:33 +08:00
zhangzhanwei a6082c909f fix: Folder_auth_permission_migrate
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-15 16:55:50 +08:00
wangdan-fit2cloud 192d9b3dbb fix: close workflow mul select 2025-10-15 15:33:25 +08:00
CaptainB 47546ecef4 fix: correct tag ID retrieval in document filtering 2025-10-15 15:03:37 +08:00
shaohuzhang1 cfef12b504
fix: ts error in type (#4196) 2025-10-15 14:25:35 +08:00
CaptainB c47c70afb0 feat: implement knowledge tag management functionality 2025-10-15 11:35:34 +08:00
shaohuzhang1 56d32c1b71
feat: Add additional fields to form nodes (#4195) 2025-10-15 11:34:30 +08:00
zhangzhanwei 05e0f2ab5c fix: Get tool error 2025-10-15 11:04:55 +08:00
zhangzhanwei 9a8c8cc7d5 feat: The folder creator manages permissions and the root directory displays all resources 2025-10-15 10:45:54 +08:00
wangdan-fit2cloud fae540c819 fix: Vision Model i18n 2025-10-15 10:43:05 +08:00
wxg0103 ef0713ecc6 feat: improve code formatting and add video list handling in chat components 2025-10-15 10:23:37 +08:00
shaohuzhang1 629c6ee3a8
feat: Add description fields to interface parameters (#4189)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-14 18:52:02 +08:00
shaohuzhang1 f470cd134c
feat: Dialogue built-in user information function (#4188) 2025-10-14 17:53:58 +08:00
wxg0103 622780e77d feat: add video understanding node and related components 2025-10-14 17:38:05 +08:00
zhangzhanwei 80c790bc8c fix: Typos error 2025-10-14 16:48:12 +08:00
zhangzhanwei 94560b8394 feat: Folder authorization frontend 2025-10-14 16:39:41 +08:00
zhangzhanwei 89749a3006 feat: Folder authorization backend 2025-10-14 16:33:13 +08:00
shaohuzhang1 d696d2e1d6
feat: Workflow implements multi-select nodes
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-10-14 15:03:15 +08:00
shaohuzhang1 d39e8aa36a
fix: Wordflow implements multi-select nodes (#4183)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-10-14 14:54:43 +08:00
shaohuzhang1 70cfd7eb59
fix: typos (#4182) 2025-10-14 12:01:15 +08:00
shaohuzhang1 112ca7976a
feat: Support variable splitting nodes (#4181) 2025-10-14 11:05:42 +08:00
CaptainB cae5682110 feat: add smart_split_paragraph function for intelligent text segmentation
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
--bug=1061634 --user=刘瑞斌 【知识库】知识库智能分段,如果切分段落太长的话,可以按照完整段落进行切分,创建多个片段。 https://www.tapd.cn/62980211/s/1783998
2025-10-13 10:26:06 +08:00
CaptainB c0715c5b17 chore: integrate prompt generation in value conversion
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
--bug=1056308 --user=刘瑞斌 【应用】函数的自定义类型参数不支持通过变量名引用变量 https://www.tapd.cn/62980211/s/1783859
2025-10-11 18:27:49 +08:00
wxg0103 9d9ae437d4 feat: add operation log clear policy and related dialog for cleanup time setting 2025-10-11 17:40:15 +08:00
wxg0103 bbab216f4c feat: implement log cleaning job and related API endpoints 2025-10-11 17:26:21 +08:00
CaptainB dab9f8de33 fix: handle tooltip display for labels in index.vue
--bug=1062579 --user=刘瑞斌 【应用】MCP节点中,工具参数没有提示信息,依然显示提示图标,提示信息为空 https://www.tapd.cn/62980211/s/1783808
2025-10-11 16:51:33 +08:00
shaohuzhang1 301785bfda
fix: The tool in the application export loop body has not been exported (#4177) 2025-10-11 16:21:46 +08:00
CaptainB e4ac7783e3 feat: add optional parameters to OpenAIEmbeddingModel for enhanced embedding functionality 2025-10-11 15:16:21 +08:00
wxg0103 01ba883946 feat: add permission for clearing operation log policy 2025-10-11 15:08:51 +08:00
wxg0103 0e3de5dfb8 feat: add log cleanup time setting to system settings 2025-10-11 14:34:34 +08:00
CaptainB 8fb6b3bbbd feat: add confirmation dialog before syncing documents
--bug=1062555 --user=刘瑞斌 【知识库】Web知识库文档列表,批量同步文档时,没有弹出提示框 https://www.tapd.cn/62980211/s/1783580
2025-10-11 13:51:11 +08:00
wangdan-fit2cloud abf57a9458 fix: fix i18n
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-10 18:18:07 +08:00
wxg0103 f5a7cdd010 feat: remove URI encoding for redirect URI in wecomQrCode component 2025-10-10 17:33:03 +08:00
wangdan-fit2cloud 336a4dd1a6 fix: refine translation 2025-10-10 16:59:40 +08:00
wxg0103 a5c2c6e0d6 feat: encode redirect URI in wecomQrCode component for improved URL handling 2025-10-10 16:57:53 +08:00
wxg0103 446a450c9d feat: encode redirect URI in wecomQrCode component for improved URL handling 2025-10-10 16:54:22 +08:00
wxg0103 fa4ba6611d feat: add logging for redirect URI in wecomQrCode component 2025-10-10 16:52:06 +08:00
wangdan-fit2cloud 0101370dc7 fix: fix tool store search 2025-10-10 16:30:52 +08:00
CaptainB b60c471694 fix: validate JSON object in form submission 2025-10-10 15:24:51 +08:00
CaptainB f31a8d380a chore: remove unnecessary check for empty storeTools in ToolStoreDialog 2025-10-10 15:24:51 +08:00
CaptainB a2600ea98c chore: refactor ToolStoreDialog.vue to streamline onBeforeMount usage 2025-10-10 15:24:51 +08:00
shaohuzhang1 7318fda061
fix: After selecting the knowledge base for the knowledge base retrieval node, copy the node, but the new node does not have the control for selecting the knowledge base (#4170) 2025-10-10 14:37:35 +08:00
zhangzhanwei 3a267ac074 fix: Translate fixed name 2025-10-10 14:15:11 +08:00
shaohuzhang1 6faa72d0b7
fix: In workflow applications, the display of custom icons for sub applications and tools in the box below the variable selection is incorrect (#4168) 2025-10-10 13:55:16 +08:00
shaohuzhang1 f59648b817
fix: The name of the loop body is not fixed (#4167)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-10 11:54:16 +08:00
shaohuzhang1 37e506fc98
fix: The discriminator is empty and the judgment is incorrect (#4166) 2025-10-10 11:07:08 +08:00
wangdan-fit2cloud c795cb342a fix: update tool param name 2025-10-10 11:01:59 +08:00
CaptainB f3ef42b76f chore: enhance re_findall function to handle None and empty string patterns 2025-10-10 10:37:02 +08:00
zhangzhanwei 0b72c5d4c2 fix: i18n
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-10-09 18:32:30 +08:00
wxg0103 e8a52c824a feat: implement authentication check in image processing model 2025-10-09 18:29:28 +08:00
wangdan-fit2cloud 9c1177759a fix: Optimize some styles 2025-10-09 17:28:06 +08:00
CaptainB 7dbd70fbfd chore: map tool description to desc in ToolStoreDialog 2025-10-09 17:21:08 +08:00
shaohuzhang1 483538a431
fix: Loop node, MCP node cannot be dragged and added (#4159) 2025-10-09 17:15:12 +08:00
CaptainB 8e8948cf87 chore: add description field to FieldFormDialog
--story=1019827 --user=刘瑞斌 工具- 使用参数同启用参数一样增加 提示信息字段,目前参数没有说明,不方便使用 https://www.tapd.cn/62980211/s/1782428
2025-10-09 17:08:51 +08:00
CaptainB 1b56707503 feat: add ToolStoreDescDrawer component and integrate with ToolListContainer
--story=1019826 --user=刘瑞斌 工具- 工具商店的工具,点击面板可以打开详情抽屉 https://www.tapd.cn/62980211/s/1782377
2025-10-09 16:52:31 +08:00
CaptainB 21045ea337 chore: update tool_params handling in index.vue
--bug=1062339 --user=刘瑞斌 【MCP】MCP节点,从“引用变量” 切换到 “自定义” 没有清空 “引用变量” 的值 https://www.tapd.cn/62980211/s/1782327
2025-10-09 16:52:31 +08:00
CaptainB c5f028be15 chore: update tool_params handling in index.vue
--bug=1062339 --user=刘瑞斌 【MCP】MCP节点,从“引用变量” 切换到 “自定义” 没有清空 “引用变量” 的值 https://www.tapd.cn/62980211/s/1782327
2025-10-09 16:13:41 +08:00
CaptainB 80629b9574 chore: enhance re_findall function to handle empty patterns and regex errors
--bug=1062401 --user=刘瑞斌 【知识库】知识库文档分段的时候,如果使用的分段标识是文档中不存在的符号,点击生成预览会报错,希望这个报错提示词可以优化一下,方便识别 https://www.tapd.cn/62980211/s/1782047
2025-10-09 13:23:10 +08:00
shaohuzhang1 d380a22384
fix: Multiple judgments in a workflow cannot be combined with one discriminator #4146 (#4151) 2025-10-09 11:51:58 +08:00
dependabot[bot] 634586fbe7 chore(deps): bump django in the pip group across 1 directory
Bumps the pip group with 1 update in the / directory: [django](https://github.com/django/django).


Updates `django` from 5.2.6 to 5.2.7
- [Commits](https://github.com/django/django/compare/5.2.6...5.2.7)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.7
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 11:19:33 +08:00
CaptainB 6db96460cc chore: update default docker image tag to v2.3.0-dev 2025-10-09 11:17:16 +08:00
CaptainB 9f73eb0aa2 chore: enhance error handling in McpToolFormDrawer
--bug=1062456 --user=刘瑞斌 【工具】新建MCP,配置信息不合规,报错提示不对 https://www.tapd.cn/62980211/s/1781971
2025-10-09 11:15:55 +08:00
CaptainB 36636f2707 chore: improve loading state management in ToolFormDrawer
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
--bug=1062445 --user=刘瑞斌 【工具】创建工具完成后,在抽屉收起前可以再次点击创建,导致可重复创建工具 https://www.tapd.cn/62980211/s/1781953
2025-10-09 11:10:23 +08:00
zhangzhanwei 9406a2c1da fix: Rename 2025-10-09 11:04:20 +08:00
zhangzhanwei 797c0bb8d6 fix: No history while use openai chat
--bug=1061932 --user=张展玮 【系统API】调用 openai 接口对话,无法获取历史聊天记录信息 https://www.tapd.cn/62980211/s/1781929
2025-10-09 10:53:32 +08:00
zhangzhanwei f834569f91 feat: raise error
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-09-29 18:07:09 +08:00
zhangzhanwei f943cc52bb feat: Raise error when can not generate prompt 2025-09-29 18:06:58 +08:00
wangdan-fit2cloud 8f16358e20 fix: icon error 2025-09-29 17:58:53 +08:00
CaptainB 75531b671c fix: refine visibility condition for form item based on tool permissions 2025-09-29 17:30:20 +08:00
CaptainB f82fa8a6fa feat: add read permission checks for system management and sharing components
--bug=1062363 --user=刘瑞斌 【应用】简单应用进入编辑页面会弹工具无权限的提示 https://www.tapd.cn/62980211/s/1781286
2025-09-29 17:28:23 +08:00
wangdan-fit2cloud 219bc20f26 fix: tool store bugs 2025-09-29 17:06:26 +08:00
CaptainB 1dcca7fcc7 feat: add read permission checks for system management and sharing components
--bug=1062363 --user=刘瑞斌 【应用】简单应用进入编辑页面会弹工具无权限的提示 https://www.tapd.cn/62980211/s/1781286
2025-09-29 17:04:38 +08:00
wxg0103 124d0ae288 feat: add translations for "Captcha is required" in multiple languages 2025-09-29 15:39:19 +08:00
CaptainB 408e79ff12 refactor: rename categories to defaultCategories and initialize categories from it 2025-09-29 15:34:30 +08:00
wxg0103 d1fd625972 fix: correct indentation for resetValidation call in UserDrawer.vue 2025-09-29 15:14:00 +08:00
wangdan-fit2cloud c430e62475 fix: tool store style 2025-09-29 14:54:31 +08:00
CaptainB 54eb60d2c4 fix: handle all exceptions in fetch toolstore tools error logging 2025-09-29 14:51:55 +08:00
wxg0103 4991890739 style: format code for improved readability and consistency 2025-09-29 14:10:53 +08:00
zhangzhanwei 40609c6531 fix: Chat log add error
--bug=1062388 --user=张展玮 【应用】应用对话日志添加到知识库,无法选择非根目录下的知识库 https://www.tapd.cn/62980211/s/1780716
2025-09-29 14:06:17 +08:00
wangdan-fit2cloud 752f19007f fix: tool store style 2025-09-29 11:00:59 +08:00
wangdan-fit2cloud 0a85921159 fix: text error 2025-09-29 10:44:43 +08:00
zhangzhanwei c3c53c1998 fix: Chat log add to knowledge error
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-29 10:07:08 +08:00
wxg0103 d8ab952a87 feat: update login titles for improved clarity in user interface 2025-09-29 09:42:03 +08:00
CaptainB e443f31cc5 feat: conditionally validate MCP transport based on tool type
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
--bug=1062394 --user=刘瑞斌 【工具】启用、禁用工具失败 https://www.tapd.cn/62980211/s/1780683
2025-09-28 19:29:51 +08:00
CaptainB 54aa6218e0 fix: prevent loading state from triggering multiple requests in ParagraphList
--bug=1062188 --user=刘瑞斌 【知识库】上传文档时,分段完成后编辑分段内容,编辑没有生效,控制台报错 https://www.tapd.cn/62980211/s/1780667
2025-09-28 18:41:44 +08:00
CaptainB 942842e3a8 feat: enhance application creation flow with loading state management
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-28 17:19:20 +08:00
CaptainB 6f392b775c feat: refactor application creation to await user profile update
--bug=1062377 --user=刘瑞斌 【应用】新建简易应用没有打开应用编辑界面 https://www.tapd.cn/62980211/s/1780590
2025-09-28 17:11:04 +08:00
CaptainB 2922f9e8f2 fix: update current_time formatting to include timezone information
--bug=1062367 --user=刘瑞斌 【知识库】文档状态中的时间与实际时间有时区差 https://www.tapd.cn/62980211/s/1780536
2025-09-28 16:25:19 +08:00
zhangzhanwei 57439e7758 fix: Generate prompt 2025-09-28 15:52:44 +08:00
CaptainB df442272e9 feat: add MCP transport validation to ToolExecutor 2025-09-28 15:33:25 +08:00
CaptainB 29ce72528b feat: update time handling to use timezone-aware datetime objects 2025-09-28 15:18:02 +08:00
wxg0103 7c23d6c24d chore: add source field to user data in user.py 2025-09-28 14:45:47 +08:00
wxg0103 74efef904f feat: enhance logout logic to handle different user source types 2025-09-28 14:45:16 +08:00
wxg0103 0c0f30c58e chore: update AliyunBaiLianReranker to use BaseDocumentCompressor and enhance document compression logic 2025-09-28 12:07:38 +08:00
CaptainB 6b23469c29 fix: reorder user profile update in application creation flow
--bug=1062351 --user=刘瑞斌 【应用】创建应用时,快速点击创建按钮,可重复创建应用 https://www.tapd.cn/62980211/s/1780369
2025-09-28 10:56:08 +08:00
wxg0103 10b66db914 feat: add displayCodeRequired message for failed attempts in application overview 2025-09-28 10:48:20 +08:00
zhangzhanwei 79457ee41f fix: Generate prompt output
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-28 09:41:28 +08:00
zhangzhanwei 684b86f197 pref: Generate prompt 2025-09-28 09:37:23 +08:00
wxg0103 d466d0f512 feat: add resetValidation method to MemberFormContent and improve formatting in UserDrawer
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-09-26 18:23:21 +08:00
wangdan-fit2cloud cc0eef326b fix: style 2025-09-26 18:20:18 +08:00
wangdan-fit2cloud 196b8bba58 fix: optimize folder style (#4104) 2025-09-26 17:44:36 +08:00
shaohuzhang1 9640c7ba9e
fix: Allow variables to be assigned as the end node of the loop node (#4125) 2025-09-26 17:03:45 +08:00
zhangzhanwei c073d0c665 fix: STT node 2025-09-26 15:46:00 +08:00
shaohuzhang1 8d4bad55f2
fix: [Application] An application that adds interface parameters, clicks on the application list page to initiate a conversation, but does not carry interface parameters (#4122) 2025-09-26 14:52:43 +08:00
wxg0103 c56742f9b3 fix: remove console error logging from QR code initialization 2025-09-26 14:41:03 +08:00
shaohuzhang1 88023f34ba
fix: Infinite cycle, maximum number of cycles failed and page scaling (#4121) 2025-09-26 14:11:10 +08:00
shaohuzhang1 5d546c0a6f
fix: Application creation time in reverse order (#4118) 2025-09-26 14:08:57 +08:00
zhangzhanwei 9396166cbb fix: intent node achors 2025-09-26 13:42:48 +08:00
shaohuzhang1 f9623a6bdb
fix: Drift of the loop body during each refresh in the canvas (#4116) 2025-09-26 10:33:33 +08:00
shaohuzhang1 d92dcd722b
fix: Add file name to prompt when processing images with doc (#4114)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-25 18:51:21 +08:00
zhangzhanwei d70d6e1fa7 fix: Intent node height 2025-09-25 18:19:56 +08:00
CaptainB f5fbbfc06c feat: add McpServerInputDialog component for variable input and handling 2025-09-25 17:37:08 +08:00
shaohuzhang1 7a0daeda24
fix: Unable to select loop node parameters after page refresh (#4111) 2025-09-25 17:36:43 +08:00
shaohuzhang1 801891de82
fix: OpenAPI authentication (#4110) 2025-09-25 17:16:39 +08:00
zhangzhanwei 3e8bf8a631 fix: Intent node
--bug=1062137 --user=张展玮 【应用】意图识别节点存在空的意图项,可以发布应用成功 https://www.tapd.cn/62980211/s/1779110
2025-09-25 16:56:08 +08:00
wxg0103 82fdef16f1 feat: enable captcha requirement based on max attempts configuration 2025-09-25 16:20:07 +08:00
wxg0103 d883d0fa3e fix: correct cache key format for login attempt tracking 2025-09-25 16:19:19 +08:00
wxg0103 97b5847bb2 fix: add focus event handler to ModelSelect for improved user interaction 2025-09-25 16:16:19 +08:00
zhangzhanwei 414756eade fix: STT node
--bug=1062113 --user=张展玮 【应用】语音转文本节点,没有支持模型参数设置 https://www.tapd.cn/62980211/s/1778991
2025-09-25 16:04:02 +08:00
shaohuzhang1 7baedb9b1c
fix: The restriction on simple application questioning is not effective (#4107) 2025-09-25 15:59:27 +08:00
zhangzhanwei e8c36a6223 feat: STT model params 2025-09-25 15:47:33 +08:00
CaptainB a2130edd08 fix: provide default value for mcp_servers in application.py
--bug=1062220 --user=刘瑞斌 【应用】新建简单应用报错 https://www.tapd.cn/62980211/s/1778977
2025-09-25 15:46:02 +08:00
wxg0103 94823b2a6a chore: refactor captcha generation logic in login.py
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-25 13:46:09 +08:00
CaptainB fc05d26eaf feat: add TestConnection API endpoint and corresponding frontend functionality 2025-09-25 12:05:21 +08:00
CaptainB 2735540dd6 chore: increase axios timeout to 30 minutes
--bug=1062162 --user=刘瑞斌 【github#3995】当知识库数据量过大时,导出excel或导出zip会超时报错 https://www.tapd.cn/62980211/s/1778654
2025-09-25 10:13:08 +08:00
wangdan-fit2cloud b879f3a99e perf: prompt
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-24 18:57:16 +08:00
wxg0103 6f3ad77fba fix: update getCaptcha function to include accessToken and simplify captcha display logic 2025-09-24 18:55:37 +08:00
wxg0103 0406fbcaf7 feat: enhance captcha generation with access token validation and configurable max attempts 2025-09-24 18:55:09 +08:00
shaohuzhang1 db0ed2662b
style: Highly optimized when adding BREAK and Continue nodes (#4102) 2025-09-24 17:37:45 +08:00
wangdan-fit2cloud 2c624a26ba fix: loop node issue 2025-09-24 17:24:52 +08:00
shaohuzhang1 04b42c399d
feat: Incorrect assignment of session variables in loop (#4101) 2025-09-24 17:21:18 +08:00
shaohuzhang1 5cbf216c5c
feat: Loop body supports zooming in and out (#4100) 2025-09-24 17:06:58 +08:00
wxg0103 ec77948165 fix: add tooltips for Text-to-Video and Image-to-Video model types in CreateModelDialog 2025-09-24 16:51:31 +08:00
CaptainB e9156f7138 feat: add new fields to Application model and update serializer mappings
--bug=1062164 --user=刘瑞斌 【应用】-简单应用中添加MCP、工具后,复制应用生成的应用中没有引用 MCP、工具 https://www.tapd.cn/62980211/s/1778474
2025-09-24 15:43:40 +08:00
shaohuzhang1 10ded1b7d1
feat: Loop body supports zooming in and out (#4099) 2025-09-24 15:36:52 +08:00
wangdan-fit2cloud cf6e4624f8 fix: The application's API parameters include a "question" parameter, but the returned address is incorrec(#4076) 2025-09-24 14:24:19 +08:00
wangdan-fit2cloud df681176ed fix: magnify or minify icon
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-24 11:21:16 +08:00
shaohuzhang1 070fb0fdbe
fix: Adjust the distance between the loop body and loop nodes (#4095)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-23 19:50:24 +08:00
shaohuzhang1 e46cb54e45
fix: Continue and break to fill in conversation details (#4094) 2025-09-23 19:47:07 +08:00
shaohuzhang1 d26b61f18b
fix: Error displaying execution details for assigning loop node variables (#4093) 2025-09-23 19:36:35 +08:00
wangdan-fit2cloud 95fb124c07 fix: loop icon 2025-09-23 18:45:13 +08:00
wxg0103 52e737c31b fix: update login settings UI and improve localization for verification code messages 2025-09-23 18:41:45 +08:00
shaohuzhang1 80da909dc3
fix: Loop node exception handling (#4092) 2025-09-23 17:22:17 +08:00
wangdan-fit2cloud ccb43a05a5 fix: An error is displayed in the loop node of the execution details. 2025-09-23 17:18:09 +08:00
liqiang-fit2cloud 6a9b59163c fix: Infinite loop increases maximum loop count limit 2025-09-23 17:13:49 +08:00
shaohuzhang1 cc0cde929a
fix: When the loop node is closed, the loop body is not displayed (#4091) 2025-09-23 17:07:59 +08:00
shaohuzhang1 218cbf4ad9
fix: Loop node deletion without deleting loop body (#4090) 2025-09-23 15:55:32 +08:00
shaohuzhang1 b0509f74e7
fix: Infinite loop increases maximum loop count limit (#4089) 2025-09-23 15:40:07 +08:00
shaohuzhang1 4242c776ed
fix: Infinite loop increases maximum loop count limit (#4088) 2025-09-23 15:35:21 +08:00
zhangzhanwei 9b00b857bf fix: Intent node i18n
--bug=1062041 --user=张展玮 【应用编排】意图识别的输入下拉框必填提示没有国际化 https://www.tapd.cn/62980211/s/1777709
2025-09-23 14:44:27 +08:00
wxg0103 8a1506ff4a fix: add focus event to ModelSelect for dynamic model fetching
--bug=1062087 --user=王孝刚 【应用编排】在图片生成节点-选择模型下拉框中添加模型后,没有及时回显 https://www.tapd.cn/62980211/s/1777730
2025-09-23 14:23:57 +08:00
wxg0103 716f2a4559 fix: update model type in ModelSelect component to ITV and TTV
--bug=1062096 --user=王孝刚 【应用编排】在文生视频组件的模型下拉框中点添加模型按钮,弹框中默认的模型类型是图片生成 https://www.tapd.cn/62980211/s/1777699
2025-09-23 14:04:33 +08:00
shaohuzhang1 525e2091b0
fix: Wireless cyclic index remains unchanged (#4083)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-23 12:43:53 +08:00
wxg0103 15af6c97f8 chore: update negative prompt handling and fix tooltip field labels 2025-09-23 11:13:24 +08:00
wangdan-fit2cloud 83456553f2 fix: Optimize text 2025-09-23 10:56:37 +08:00
shaohuzhang1 4266a74b8c
fix: Loop validation and other bugs (#4082)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-22 19:28:11 +08:00
shaohuzhang1 3fad820e99
feat: The comparator is greater than or less than the supported string comparison (#4081) 2025-09-22 18:18:37 +08:00
wxg0103 ccf6d86dea chore: update logging for auth setting changes and add translations 2025-09-22 17:52:44 +08:00
zhangzhanwei 67a82dca1c fix: STT model params add when create 2025-09-22 17:19:56 +08:00
CaptainB 2df99de91d fix: handle case where tool is None in tool activation check 2025-09-22 16:25:02 +08:00
shaohuzhang1 6805d7605b
fix: Judgment execution logic (#4073) 2025-09-22 15:09:58 +08:00
shaohuzhang1 d5ef8f3a34
docs: OpenAPI request URL (#4071) 2025-09-22 14:12:27 +08:00
wxg0103 180c115f17 fix: update default voice selection for TTS to MOSS-TTSD-v0.5:alex 2025-09-22 14:02:41 +08:00
shaohuzhang1 4269eeb2c9
docs: OpenAPI request URL (#4070)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-22 11:51:59 +08:00
zhangzhanwei 53082657d7 feat: Remove debug 2025-09-22 10:37:51 +08:00
zhangzhanwei f96772f280 feat: Remove debug permission 2025-09-22 10:34:49 +08:00
CaptainB 8b13174d9c fix: add model change handler to update AI mode parameters 2025-09-20 21:58:28 +08:00
CaptainB 2306f90048 fix: add type search option to KnowledgeResourceIndex
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
fix: add tool type search option to ToolResourceIndex
2025-09-20 13:06:39 +08:00
wangdan-fit2cloud d7ee6b74b3 fix: change workflow icon
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-19 18:52:28 +08:00
wxg0103 2e69698e6b chore: update watermark attributes and cache timeout settings 2025-09-19 18:22:54 +08:00
wxg0103 b42f6bddae fix: add support for additional model types in CreateModelDialog 2025-09-19 18:18:38 +08:00
wangdan-fit2cloud 5328757521 fix: The intention is to identify the display issue of the node 2025-09-19 17:56:32 +08:00
zhangzhanwei eb6873c329 fix: Improve intent node
--bug=1062028 --user=张展玮 【应用编排】意图识别节点没有带上历史聊天记录进行分类 https://www.tapd.cn/62980211/s/1776831
2025-09-19 17:55:13 +08:00
zhangzhanwei 6a0145758c feat: Remove debug permission 2025-09-19 16:54:24 +08:00
wangdan-fit2cloud f77ad75025 fix: Prohibit mobile web page zooming. 2025-09-19 16:18:42 +08:00
CaptainB 13554fd27b fix: add conditional rendering for tool selection in application form
--bug=1062024 --user=刘瑞斌 【应用】简单应用中引用的工具被删除后,同步删除应用中的引用信息 https://www.tapd.cn/62980211/s/1776714
2025-09-19 16:15:14 +08:00
wxg0103 60ce4bf70d fix: improve error handling for video generation process 2025-09-19 15:31:48 +08:00
wxg0103 3b2c337e36 feat: update login redirection and form submission handling 2025-09-19 15:28:12 +08:00
wxg0103 47d4bce84f fix: improve error handling and logging in video generation process 2025-09-19 14:51:17 +08:00
wxg0103 2060012660 feat: reset captcha field on login form submission failure 2025-09-19 14:16:05 +08:00
wxg0103 e4232166e8 feat: update login settings API call to use structured parameters 2025-09-19 14:03:58 +08:00
wxg0103 5bea2b2566 fix: handle exceptions in get_file_base64 method 2025-09-19 11:13:32 +08:00
wxg0103 0693ae99ca feat: update translations for login and image retrieval messages 2025-09-19 11:13:15 +08:00
zhangzhanwei bda02137e5 pref: imporve Prompt
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-19 10:56:43 +08:00
wxg0103 5c0dfa8c96 fix: cast setTimeout callback to any for type safety 2025-09-19 10:47:09 +08:00
wxg0103 15c4274294 feat: add type search option and improve select input formatting 2025-09-19 10:20:06 +08:00
zhangzhanwei 71cec2fca4 feat: Support stt model params setting 2025-09-19 10:15:02 +08:00
wxg0103 8d9c466ced feat: add ITV and TTV model types to data and update model type checks 2025-09-19 09:24:40 +08:00
wxg0103 f06bdf3ee5 feat: implement RSA encryption for login data and update authentication settings
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-18 18:43:39 +08:00
wxg0103 74c454532d feat: enhance user authentication with RSA key handling and encrypted data support 2025-09-18 18:42:55 +08:00
wxg0103 a0118ca397 feat: add TTS model credential and general parameters form 2025-09-18 16:23:03 +08:00
wxg0103 7674804f38 fix: update login methods retrieval to use data from authentication settings 2025-09-18 15:48:06 +08:00
wxg0103 faf238109b feat: add password authentication option and update related translations 2025-09-18 15:47:38 +08:00
wangdan-fit2cloud e1b3f47337 fix: loop node 2025-09-18 15:31:17 +08:00
wangdan-fit2cloud 7af880f1db feat: Consciousness recognition node 2025-09-18 14:55:03 +08:00
wxg0103 16ade76446 fix: enhance redirect logic in authentication to include 'password' auth type 2025-09-18 13:28:48 +08:00
wxg0103 b6bab14d8a fix: update authentication settings retrieval and enhance redirect logic for password auth type 2025-09-18 13:26:56 +08:00
wangdan-fit2cloud 376e25d796 fix: Fix type errors 2025-09-18 11:40:09 +08:00
CaptainB 8220f52ace fix: initialize mcp_tool_ids as an empty array and update conditional rendering for mcp_servers 2025-09-18 11:17:04 +08:00
CaptainB c1a214b08f feat: add variable handling for tool parameters in base_chat_node and base_mcp_node
--story=1019430 --user=刘瑞斌 GitHub#3113 【MCP调用】MCP配置支持传入变量 https://www.tapd.cn/62980211/s/1775665
2025-09-18 11:17:04 +08:00
shaohuzhang1 b9ac3b941d
fix: Loop node response data (#4052)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-17 18:33:46 +08:00
wangdan-fit2cloud 4b52d5f232 feat: loop node 2025-09-17 18:23:13 +08:00
shaohuzhang1 31c6154e7a
fix: Resolve the issue of sub canvas drift (#4051) 2025-09-17 18:16:23 +08:00
wxg0103 70f6d6b048 fix: update password handling in user authentication to use plain text instead of encrypted password 2025-09-17 17:54:40 +08:00
wxg0103 68ce998012 feat: add username parameter to getCaptcha function and hash password with MD5 during login 2025-09-17 17:52:06 +08:00
wxg0103 d4bdee1340 fix: reduce login failure record expiration time from 3600 to 600 seconds
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-17 17:21:43 +08:00
shaohuzhang1 ab93ac7c4e
fix: Loop node embedding sub application error (#4050) 2025-09-17 16:41:45 +08:00
wxg0103 52f420df58 refactor: clean up code formatting and improve readability in index.vue 2025-09-17 15:21:02 +08:00
wxg0103 680502f366 feat: enhance login logic with dynamic captcha display and add API for fetching authentication settings 2025-09-17 15:11:39 +08:00
wxg0103 b96b499bc7 feat: add login authentication configuration endpoints and update related serializers 2025-09-17 15:09:36 +08:00
CaptainB e2314360e9 fix: update tool name assignment to use instance data in tool and shared_tool modules
--bug=1061891 --user=刘瑞斌 【工具】从工具商店创建的工具,修改名称后添加还是显示的默认名称 https://www.tapd.cn/62980211/s/1774595
2025-09-17 13:00:30 +08:00
CaptainB b3073c8aad refactor: remove unused tool name assignment in tool and shared_tool modules
--bug=1061891 --user=刘瑞斌 【工具】从工具商店创建的工具,修改名称后添加还是显示的默认名称 https://www.tapd.cn/62980211/s/1774595
2025-09-17 12:57:54 +08:00
wxg0103 cf91734db5 refactor: adjust max_attempts default and captcha requirement in authentication logic 2025-09-17 10:26:43 +08:00
wxg0103 0969f70104 feat: add authentication settings API endpoints and enhance login logic with access token validation
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-16 18:26:55 +08:00
wxg0103 ceb601d74a feat: add login settings management and captcha display logic 2025-09-16 18:24:40 +08:00
zhangzhanwei 6c2b2f6c17 feat: STT model params
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-16 16:15:21 +08:00
wangdan-fit2cloud a04ee1764c fix: Optimize font color(#2792) 2025-09-16 16:11:07 +08:00
shaohuzhang1 7264545ab6
feat: Support loop node (#4045) 2025-09-16 15:49:49 +08:00
CaptainB e7ce9a0524 chore: update django dependency to version 5.2.6 2025-09-16 15:44:30 +08:00
zhangzhanwei 754fd8fab9 fix: Support shared model
--bug=1061852 --user=张展玮 【应用】自动生成提示词时,如果使用的是共享模型,生成失败,提示模型不存在或不是大语言模型 https://www.tapd.cn/62980211/s/1774010
2025-09-16 14:56:53 +08:00
zhangzhanwei e489a635af fix: Prompt generate
--bug=1061828 --user=张展玮 【提示词生成】- AI对话节点中,生成的提示词点击替换不管用 https://www.tapd.cn/62980211/s/1773916
2025-09-16 14:25:29 +08:00
CaptainB b4cdd87e6e fix: change mcp_tool_id field type from UUID to CharField 2025-09-16 11:18:40 +08:00
CaptainB dd13fe7554 fix: ensure mcp_source is set to 'custom' only when mcp_servers is not empty 2025-09-16 10:37:13 +08:00
wangdan-fit2cloud f065146d5f fix: Generated prompt word issues
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-15 15:06:19 +08:00
zhangzhanwei 709e60390a feat: Extract reason using regex 2025-09-15 15:00:23 +08:00
CaptainB 584850b576 feat: conditionally render form items based on feature flags 2025-09-15 14:05:04 +08:00
zhangzhanwei 422dde8ba3 feat: System application generate prompt 2025-09-15 11:48:11 +08:00
zhangzhanwei d47dbc3a50 refactor: Generate prompt serializer 2025-09-15 11:40:22 +08:00
wxg0103 f1cd675caa feat: add translation for video generation error messages and implement TTV model parameters 2025-09-15 11:08:54 +08:00
zhangzhanwei b9b91925f0 refactor: Add applicationId in generate prompt
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-09-12 17:18:23 +08:00
zhangzhanwei 6412c79794 feat: Improve prompt 2025-09-12 17:14:33 +08:00
wangdan-fit2cloud 0c53e31b2a feat: Add a back to bottom button to the chat page(#2957) 2025-09-12 16:52:55 +08:00
wxg0103 1fb280aa3d feat: add source field to user serializer and update user creation logic 2025-09-12 15:34:13 +08:00
wxg0103 7dc132e35c feat: implement text-to-video and image-to-video generation nodes with serializers and workflow integration 2025-09-12 14:27:48 +08:00
zhangzhanwei ce6f801a35 feat: Intent classify
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-12 11:54:53 +08:00
CaptainB bd668e7e2a feat: handle empty store tools in ToolStoreDialog 2025-09-12 11:18:14 +08:00
wangdan-fit2cloud 823ac6b1a3 feat: Tool store
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-11 18:04:24 +08:00
wangdan-fit2cloud fad4ce9cd0 feat: The model directly generates optimized prompt words 2025-09-11 17:18:19 +08:00
CaptainB 94d3bf3125 fix: add null checks before filtering tool IDs in ApplicationSetting.vue 2025-09-11 15:05:15 +08:00
CaptainB 589a16572b feat: update default docker image tag to v2.2.0-dev 2025-09-11 14:56:07 +08:00
CaptainB 81c827061b feat: add configuration for maximum number of uploaded files
--bug=1061639 --user=刘瑞斌 【知识库】知识库的最多上传文件数设置不生效 https://www.tapd.cn/62980211/s/1771564
2025-09-11 14:23:36 +08:00
CaptainB af64f7eab7 feat: enhance variable selection to support boolean type
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-09-10 10:34:20 +08:00
CaptainB e988cbca91 feat: add Appstore tool retrieval and store tool API endpoint 2025-09-09 15:08:33 +08:00
wangdan-fit2cloud a5d046c26b fix: Pressing the Enter key will open a new web page 2025-09-09 14:45:02 +08:00
zhangzhanwei 8e10410046 docs: .gitignore 2025-09-09 14:23:51 +08:00
zhangzhanwei b06fd7ad2a feat: Generate prompt 2025-09-09 14:11:02 +08:00
shaohuzhang1 4cb39127be
fix: Workflow start time and time zone error (#4011) 2025-09-09 13:52:13 +08:00
zhangzhanwei d2463abaac feat: Vllm url support v1 2025-09-09 13:49:46 +08:00
shaohuzhang1 6ddad88357
fix: Ecarts rendering error (#4009) 2025-09-09 13:43:37 +08:00
shaohuzhang1 2de5b1ecf0
fix: Unable to add session variables after editing (#4008) 2025-09-09 11:47:37 +08:00
wangdan-fit2cloud aba254c907 fix: generate question components style 2025-09-09 11:35:14 +08:00
CaptainB adbee39082 chore: add translation key for MCP/Tool Execution Process 2025-09-08 18:12:27 +08:00
zhangzhanwei ff6714e505 feat: Generate Prompt 2025-09-08 17:06:07 +08:00
CaptainB ec5c076557 chore: add mcp_output_enable field to application and applicationversion models 2025-09-08 15:43:51 +08:00
CaptainB 4a8cd95119 feat: add MCP and tool configuration options in application settings 2025-09-08 14:54:35 +08:00
zhangzhanwei 76766ebc23 fix: Information regarding role permissions management has not been internationalised.
--bug=1061417 --user=张展玮 【国际化BUG】2.10版本,角色权限管理的信息没有国际化 https://www.tapd.cn/62980211/s/1768834
2025-09-08 10:30:59 +08:00
CaptainB 121614fb81 chore: add model_params_setting to document, knowledge, and paragraph processing
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
--story=1018694 --user=刘瑞斌 【菲尼克斯】知识库生成问题选择模型,希望可以设置模型参数 https://www.tapd.cn/62980211/s/1768601
2025-09-05 17:48:40 +08:00
shaohuzhang1 5ed5d2786d
fix: Workflow session variables cannot be added (#3998) 2025-09-05 15:07:46 +08:00
CaptainB f4ff796c9f chore: update default docker image tag to v2.1.1-dev
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-05 13:44:12 +08:00
CaptainB 383957abb3 chore: update regex pattern and file path in common.py
--bug=1061351 --user=刘瑞斌 【知识库】知识库导出zip没有图片 https://www.tapd.cn/62980211/s/1768275
2025-09-05 11:48:14 +08:00
CaptainB 689391384e chore: update export_zip to include knowledge name in filename
--bug=1061385 --user=刘瑞斌 【知识库】导出的知识库名字都为archive https://www.tapd.cn/62980211/s/1768251
2025-09-05 11:37:09 +08:00
CaptainB 59164d86dd chore: add mcp_tool_id parameter to i_chat_node.py 2025-09-05 10:39:05 +08:00
CaptainB 9a4f1eda99 chore: add mcp_tool_ids parameter to support multiple MCP Tool IDs 2025-09-05 10:37:57 +08:00
CaptainB f20235d662 chore: update mcp_tool_id to mcp_tool_ids for multi-select functionality 2025-09-05 10:18:51 +08:00
CaptainB b5005e4744 fix: correct JSON serialization in exec_code method
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-04 18:10:11 +08:00
CaptainB 817d5bcd5a chore: replace pickle with json for data serialization in tool_code.py 2025-09-04 16:42:59 +08:00
shaohuzhang1 d94871b9c3
fix: Model parameter save permission error (#3989)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-03 16:27:28 +08:00
shaohuzhang1 410101ea94
fix: Workflow publishing name time error (#3988) 2025-09-03 15:08:22 +08:00
CaptainB d5d962c53d chore: enhance tool query to include user nickname
--bug=1061299 --user=刘瑞斌 【工具】编辑工具后,工具的创建者不显示了,刷新可恢复正常 https://www.tapd.cn/62980211/s/1766692
2025-09-03 15:07:14 +08:00
CaptainB fcd6b53bfc chore: add check for inactive tools in base_mcp_node.py 2025-09-03 14:35:40 +08:00
CaptainB d21518e7b7 fix: validate mcp_tool_id when mcp_source is referencing
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-03 12:50:06 +08:00
CaptainB 22f70dd488 fix: add conditional rendering for mcp_tool_id and update mcp_source assignment logic 2025-09-03 10:56:31 +08:00
shaohuzhang1 26945a54bf
fix: Delete folder, if there are unauthorized resources in the file for the current user, prompt message needs to be optimized (#3986)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-02 17:47:33 +08:00
shaohuzhang1 5332c264b0
fix: When adding interface parameters during application editing, go directly to the conversation after publishing. The URL of the conversation interface does not include interface parameters (#3985) 2025-09-02 17:38:55 +08:00
zhangzhanwei 1ec918632f fix: Problem create permission 2025-09-02 17:33:50 +08:00
shaohuzhang1 c0fcc21c86
fix: Create application orchestration, select the knowledge base Q&A assistant template, and when publishing, the knowledge base retrieval node prompts to set parameters (#3983) 2025-09-02 17:30:31 +08:00
wangdan-fit2cloud 6e233c54bc fix: upload style optimize 2025-09-02 17:11:04 +08:00
CaptainB 1ad5eec380 fix: update chat update_time to use timezone.now for consistency 2025-09-02 15:52:04 +08:00
CaptainB 0b6b45928d fix: ensure only active tools are processed in base_chat_node.py
--bug=1061252 --user=刘瑞斌 【工具】MCP被禁用后,依然可以在应用中调用 https://www.tapd.cn/62980211/s/1765960
2025-09-02 15:52:04 +08:00
zhangzhanwei a8e8a0580f fix: Chat log add knowledge 2025-09-02 15:04:04 +08:00
CaptainB 59efb68bb5 feat: add model caching to get_dynamics_model function in search.py 2025-09-02 14:20:41 +08:00
shaohuzhang1 2f12c61337
fix: The form failed to parse when there are labels in the internal data (#3980) 2025-09-02 14:12:46 +08:00
wangdan-fit2cloud 4ade65ee00 fix: style optimize
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-02 12:15:25 +08:00
shaohuzhang1 c4c0ba0b38
fix: The execution details of the form file upload cannot be displayed back (#3978) 2025-09-02 11:18:20 +08:00
shaohuzhang1 f6e9bf6483
fix: Single line multi select cards (#3977)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-09-01 19:04:45 +08:00
wxg0103 d9ad9aabf2 chore: update file hashes for community and fix formatting in permission_constants.py 2025-09-01 17:35:08 +08:00
shaohuzhang1 67bb0a0abd
feat: Support single line multi select cards (#3976) 2025-09-01 16:56:32 +08:00
CaptainB b1dcdcbf97 chore: set default mcp_source to 'custom' if None
--bug=1061187 --user=刘瑞斌 【迁移】应用AI对话节点使用了MCP,迁移后对话时,不会调用MCP工具 https://www.tapd.cn/62980211/s/1765228
2025-09-01 15:54:41 +08:00
shaohuzhang1 9970d21a8e
fix: Not displaying execution details and returning too much data (#3974) 2025-09-01 15:47:15 +08:00
wangdan-fit2cloud cbee152262 fix: Fix history display errors 2025-09-01 15:28:02 +08:00
wangdan-fit2cloud bc26024bcc perf: style
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-29 17:56:05 +08:00
CaptainB fe35ba3cdc fix: update MCP tool icon rendering in index.vue 2025-08-29 17:12:02 +08:00
wangdan-fit2cloud a244361ad9 fix: icon issue 2025-08-29 17:03:29 +08:00
CaptainB 545693f19f fix: update getToolList function signature and correct filter query in shared_tool.py 2025-08-29 16:11:56 +08:00
zhangzhanwei 53e67caaff fix: Chat_log_permission 2025-08-29 15:41:08 +08:00
zhangzhanwei 6b17b450d4 fix: Chat log add to knowledge permission
--bug=1060944 --user=张展玮 【权限】用户只有知识库的查看权限,但可以将对话日志中的信息添加到知识库作为分段,并可删除 https://www.tapd.cn/62980211/s/1763639
2025-08-29 15:29:06 +08:00
CaptainB 82701e7513 fix: include default values in parameter initialization
--bug=1060961 --user=刘瑞斌 【工具优化】在“启动参数”设置中保存默认值后,应用内调用时可直接使用预设的默认参数,无需在工具中每次单独设置,简化操作流程。 https://www.tapd.cn/62980211/s/1764217
2025-08-29 14:51:36 +08:00
wangdan-fit2cloud 7ee33b82dc fix: Optimize the refresh issue of conversation history‌。 2025-08-29 13:49:34 +08:00
shaohuzhang1 617937fe58
fix: typos (#3965) 2025-08-29 12:00:30 +08:00
shaohuzhang1 f6aaac4e00
perf: Parsing Tokens (#3964) 2025-08-29 11:54:16 +08:00
CaptainB 75c461f385 chore: replace datetime.now() with timezone.now() for consistent time handling 2025-08-29 10:16:53 +08:00
CaptainB 669764492c fix: make datetime aware in get_start_time and get_end_time methods 2025-08-28 18:11:25 +08:00
wangdan-fit2cloud 24b36bf90f fix: Fix form node drag-and-drop issues and some style errors 2025-08-28 17:10:50 +08:00
shaohuzhang1 d53b4dcd00
fix: Return the link to the connection pool after the node execution is completed (#3957) 2025-08-28 16:08:05 +08:00
zhangzhanwei 91a58ce990 fix: Dropitem permission 2025-08-28 14:36:21 +08:00
shaohuzhang1 e23d413f97
fix: The validation prompt for the JSON input box is incorrect (#3954) 2025-08-28 11:29:35 +08:00
shaohuzhang1 269c12b737
fix: Default value for form node reference parameter checkbox (#3953) 2025-08-28 11:22:56 +08:00
zhangzhanwei 4786970689 feat: Support iFLYTEK large model for Chinese-English speech recognition 2025-08-28 10:57:52 +08:00
CaptainB f9f96fd2cd chore: add allow_download flag to document metadata 2025-08-28 10:12:15 +08:00
shaohuzhang1 796001a4ae
fix: Canvas icon cannot be dragged or dropped (#3951) 2025-08-27 19:10:24 +08:00
wangdan-fit2cloud 27f0250aaf fix: Fix translation gaps 2025-08-27 19:07:41 +08:00
shaohuzhang1 ce8f907932
fix: When the label of the form tab is empty, the content is not supported (#3950) 2025-08-27 19:06:15 +08:00
shaohuzhang1 f12ba4eeeb
fix: Please remove the default prompt words after uploading files for the dialogue interface and debugging interface (#3949) 2025-08-27 18:34:58 +08:00
wxg0103 a0bca36341 fix: improve code formatting and consistency in index.vue 2025-08-27 18:00:24 +08:00
wxg0103 211ddccc2f fix: update password edit permission logic for local users 2025-08-27 17:59:57 +08:00
wangdan-fit2cloud 420b36fbdb fix: Fix some styling issues 2025-08-27 17:37:11 +08:00
shaohuzhang1 dbfdc73ce5
fix: The basic information nodes of advanced orchestration will add session variables when editing session variables (#3947) 2025-08-27 17:25:56 +08:00
CaptainB a19bd1eef1 chore: add allow_download field to existing Document records
--bug=1060848 --user=刘瑞斌 【知识库】文档设置[允许知识库来源中下载 ]应该默认开启 https://www.tapd.cn/62980211/s/1762365
2025-08-27 15:36:54 +08:00
CaptainB 4063fef48a chore: add allow_download field to existing Document records
--bug=1060848 --user=刘瑞斌 【知识库】文档设置[允许知识库来源中下载 ]应该默认开启 https://www.tapd.cn/62980211/s/1762365
2025-08-27 15:27:19 +08:00
wxg0103 b5cd3f9b31 feat: add reset_meta function and update meta handling in Document model 2025-08-27 15:26:22 +08:00
wangdan-fit2cloud 7756d02b6a feat: Resource management authorization 2025-08-27 15:12:41 +08:00
CaptainB 2434acf685 feat: enable document download option in ImportDocumentDialog
--bug=1060849 --user=刘瑞斌 【知识库】文档的批量设置,负载没有带上允许下载的设置数据,导致设置失败 https://www.tapd.cn/62980211/s/1762350
2025-08-27 15:07:36 +08:00
shaohuzhang1 d0266de89f
fix: PDF export cross-domain (#3945) 2025-08-27 14:23:58 +08:00
wxg0103 79b590d94f fix: clean up code formatting and improve consistency in index.vue 2025-08-27 12:00:57 +08:00
CaptainB 7683c39d66 feat: add MCP configuration option and dialog to ToolResourceIndex
--bug=1060875 --user=刘瑞斌 【资源管理】工具列表的MCP资源缺少MCP服务配置查看功能 https://www.tapd.cn/62980211/s/1762106
2025-08-27 11:48:09 +08:00
zhangzhanwei 675e90d3db fix: Chat log search 2025-08-27 11:48:03 +08:00
wxg0103 93e5c9db38 feat: enhance model provider with additional LLM and embedding models 2025-08-27 11:14:05 +08:00
shaohuzhang1 a05573bcdc
feat: Form collection single line tab supports variables (#3942)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-26 20:01:39 +08:00
shaohuzhang1 7948e4f78b
feat: Export conversation page to PDF (#3941) 2025-08-26 18:38:58 +08:00
zhangzhanwei 39fd66e84b feat: Permission front 2025-08-26 18:38:03 +08:00
zhangzhanwei d69a753491 feat: Permission constants 2025-08-26 18:35:13 +08:00
zhangzhanwei aed2803133 feat: Locales 2025-08-26 17:35:39 +08:00
shaohuzhang1 b2aecdbec0
feat: Set display history (#3937)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-26 17:09:45 +08:00
zhangzhanwei c082dae066 fix: Query by permission in system resource management
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
--bug=1060785 --user=张展玮 【资源授权】-通过权限查询资源无效 https://www.tapd.cn/62980211/s/1761243
2025-08-26 13:59:29 +08:00
wxg0103 8cdb085734 feat: add support for v2 API version in embedding models and update validation logic 2025-08-26 13:20:31 +08:00
zhangzhanwei 20cf018c81 fix: Models rerank stt 2025-08-26 11:58:51 +08:00
zhangzhanwei e28c858351 fix: Application menu displays conversation users and conversation logs
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
--bug=1060818 --user=张展玮 【应用】应用只授权用户查看权限,详情页,没有展示对话用户、对话日志菜单 https://www.tapd.cn/62980211/s/1760973
2025-08-25 18:30:05 +08:00
shaohuzhang1 23c9bc545c
feat: chat export pdf (#3931)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-25 18:13:07 +08:00
zhangzhanwei deb7333750 fix: Permission of chat_user
--bug=1060792 --user=张展玮 【资源授权】知识库-授权单个用户单个知识库的查看权限,用户登录后能看见“向量化”&对话用户页面页可以“授权” https://www.tapd.cn/62980211/s/1760904
2025-08-25 17:47:54 +08:00
zhangzhanwei 2948bc9e00 fix: import error 2025-08-25 15:43:55 +08:00
wxg0103 9dfd696398 fix: update WeChat bot tooltip for clarity
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-25 15:28:56 +08:00
wxg0103 bad7524938 feat: add WeChat bot platform to application access 2025-08-25 15:28:17 +08:00
zhangzhanwei f84d093f71 fix: The role-based authorization option is temporarily hidden
--bug=1060787 --user=张展玮 【资源管理】偶先不展示按角色授权选项的现象 https://www.tapd.cn/62980211/s/1760688
2025-08-25 15:26:16 +08:00
shaohuzhang1 5dafe6f7fe
fix: Unable to retrieve session variables after form collection node (#3926) 2025-08-25 14:58:25 +08:00
shaohuzhang1 679453372e
feat: Whether the document support settings of the General Knowledge Base and Feishu Knowledge Base allow downloading (#3924) 2025-08-25 14:50:33 +08:00
zhangzhanwei 64e9a29a60 feat: Search application chat log by user 2025-08-25 14:42:45 +08:00
zhangzhanwei 89c8821dce feat: Support searching application conversation logs by user 2025-08-25 14:38:16 +08:00
wxg0103 934c61538d fix: update langchain-openai dependency to version 0.3.31 2025-08-25 11:13:02 +08:00
CaptainB 20642223a7 chore: clean up whitespace and formatting in index.vue 2025-08-25 11:03:20 +08:00
wxg0103 fbfeb67db6 chore: update file hashes for community and xpack
fix: correct parameter name in KimiChatModel instantiation
2025-08-25 10:51:37 +08:00
wangdan-fit2cloud c217712642 perf: Optimize some front-end pages
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-22 17:54:48 +08:00
CaptainB b6919c34f8 fix: enhance mcp_source logic in McpServersDialog
--bug=1060762 --user=刘瑞斌 【应用】v2.0.2版本已存在的应用的MCP,升级版本后,编辑界面,MCP回显错误 https://www.tapd.cn/62980211/s/1760254
2025-08-22 17:46:51 +08:00
CaptainB 925cedec28 chore: refactor tool loading logic to improve shared tool handling
--bug=1060756 --user=刘瑞斌 【应用】AI对话节点的工具,无法获取共享工具 https://www.tapd.cn/62980211/s/1760222
2025-08-22 17:36:59 +08:00
CaptainB 72fd741fbc chore: remove outdated tencentcloud-sdk-python-asr dependency 2025-08-22 16:55:45 +08:00
zhangzhanwei 6e53d2ab0e feat: Tool type in resource authorization 2025-08-22 16:36:35 +08:00
wangdan-fit2cloud 1f5544b13e
perf: Optimize the folder to enter the second level page and retain records and the first conversation does not display the previous record (#3917) 2025-08-22 16:27:13 +08:00
CaptainB 600cd73d2d fix: improve formatting and add JSON validation in McpServersDialog
--bug=1060753 --user=刘瑞斌 【应用】AI对话节点的MCP使用自定义方式,配置格式错误依然可以保存成功 https://www.tapd.cn/62980211/s/1760128
2025-08-22 16:21:51 +08:00
CaptainB c39d7a4102 fix: improve formatting and add JSON validation in McpServersDialog
--bug=1060753 --user=刘瑞斌 【应用】AI对话节点的MCP使用自定义方式,配置格式错误依然可以保存成功 https://www.tapd.cn/62980211/s/1760128
2025-08-22 16:20:45 +08:00
liqiang-fit2cloud 1e05eb18e1 Revert "build: add --prefer-binary."
This reverts commit a5c38af016.
2025-08-22 16:17:49 +08:00
liqiang-fit2cloud a5c38af016 build: add --prefer-binary. 2025-08-22 16:13:13 +08:00
CaptainB bbd901e580 chore: add macpytorch index for macOS wheel source 2025-08-22 16:00:17 +08:00
liqiang-fit2cloud a5d6ae9fbc Revert "build: add --prefer-binary."
This reverts commit 78dce1a26b.
2025-08-22 15:57:02 +08:00
liqiang-fit2cloud 78dce1a26b build: add --prefer-binary. 2025-08-22 15:51:58 +08:00
liqiang-fit2cloud dafe41ed65 Revert "build: optimize Dockerfile."
This reverts commit c41ba9200f.
2025-08-22 15:50:56 +08:00
liqiang-fit2cloud c41ba9200f build: optimize Dockerfile. 2025-08-22 15:40:47 +08:00
CaptainB c8e8afa8b9 feat: enhance execute method to support mcp_tool_id and mcp_source parameters
--bug=1060726 --user=刘瑞斌 【工具】应用中引用的MCP没删除后,在应用对话界面依然可以调用MCP的工具 https://www.tapd.cn/62980211/s/1759963
2025-08-22 14:32:59 +08:00
liqiang-fit2cloud c3001ffd2d Revert "build: optimize Dockerfile."
This reverts commit d03022fe60.
2025-08-22 14:18:46 +08:00
liqiang-fit2cloud 3940a9f62b Merge remote-tracking branch 'origin/v2' into v2 2025-08-22 14:14:08 +08:00
liqiang-fit2cloud d03022fe60 build: optimize Dockerfile. 2025-08-22 14:13:59 +08:00
CaptainB 3a59453b06 fix: refine export condition for custom tool types 2025-08-22 14:13:06 +08:00
CaptainB d7ad3ff524 feat: enhance ToolResourceIndex with MCP tool editing functionality
--bug=1060727 --user=刘瑞斌 【资源管理】MCP的编辑界面,与工具模块MCP的编辑界面不一致 https://www.tapd.cn/62980211/s/1759939
2025-08-22 14:09:24 +08:00
liqiang-fit2cloud dd0948ed20 build: optimize Dockerfile.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-22 11:28:15 +08:00
zhangzhanwei c572cb1f3c fix: Resource authorization query by permission 2025-08-22 10:15:52 +08:00
liqiang-fit2cloud f187812e50 build: optimize Dockerfile. 2025-08-22 10:12:14 +08:00
CaptainB 16718dcca1 chore: pin cohere dependency to version 5.17.0
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-21 18:17:46 +08:00
liqiang-fit2cloud e8b972e91c Revert "build: try to enable --use-feature=fast-deps."
This reverts commit b89c4e31aa.
2025-08-21 18:10:47 +08:00
shaohuzhang1 841b6397a5
style: MCP config dialog style (#3911)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-21 18:06:20 +08:00
shaohuzhang1 77b86b99e9
fix: Form collection file upload cannot delete file (#3910) 2025-08-21 18:04:50 +08:00
zhangzhanwei f5fada9b9e feat: Vllm reranker model bge reranker v2 m3 2025-08-21 18:02:47 +08:00
liqiang-fit2cloud b89c4e31aa build: try to enable --use-feature=fast-deps. 2025-08-21 18:02:47 +08:00
CaptainB c429097239 feat: add MCP Service Config dialog and update tool form labels 2025-08-21 17:14:36 +08:00
liqiang-fit2cloud 12feafb5c5 refactor: remove vite-plugin-compression as gzip is enabled in django. 2025-08-21 15:52:40 +08:00
shaohuzhang1 5ce9897bca
perf: Optimize some styles (#3907)
* perf: Optimize packaging

* perf: Optimize some styles

---------

Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-21 15:40:22 +08:00
liqiang-fit2cloud a77da52ad4 build: init py3 in base image. 2025-08-21 15:37:52 +08:00
liqiang-fit2cloud 4229b47df1 build: init py3 in base image. 2025-08-21 15:32:02 +08:00
liqiang-fit2cloud ae5fb8fae3 build: init py3 in base image. 2025-08-21 15:20:53 +08:00
CaptainB 5ca82e1f4e chore: add MCP name field to tool form
--bug=1060678 --user=刘瑞斌 【工具】添加、编辑MCP界面,MCP名称输入框的提示应该改成“请输入MCP名称” https://www.tapd.cn/62980211/s/1759264
2025-08-21 14:21:11 +08:00
CaptainB 878f8c0ac4 chore: add tool creation labels in multiple languages
--bug=1060683 --user=刘瑞斌 【工具】-创建功能列表中,“空白创建”应该改成“创建工具” https://www.tapd.cn/62980211/s/1759252
2025-08-21 14:14:25 +08:00
zhangzhanwei 452fd53310 fix: Resource authorization 2025-08-21 14:12:37 +08:00
wxg0103 ca7ba9d64c feat: update WeChat bot logo and add new SVG asset 2025-08-21 11:42:46 +08:00
liqiang-fit2cloud aed0168795 refactor: remove vite-plugin-compression as gzip is enabled in django.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-21 10:39:54 +08:00
shaohuzhang1 e715e244af
perf: Optimize
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
* fix: New conversation user, user group should be a mandatory field(#3833)

* fix: Filter empty files uploaded during application dialogue(#3836)

* fix: License not uploaded, knowledge base hits test interface style issue(#3852)

* perf: Optimize packaging

---------

Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-20 19:02:29 +08:00
zhangzhanwei c8ec7c5558 feat: Vllm whisper model 2025-08-20 18:25:21 +08:00
shaohuzhang1 27aeba47c4
feat: chat upload input style (#3898)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-20 17:45:58 +08:00
liqiang-fit2cloud e9434b6ba6 build: try to build web separately. 2025-08-20 17:41:27 +08:00
CaptainB 8c5201b901 feat: enhance MCP tool selection and display in application forms 2025-08-20 17:35:55 +08:00
wangdan-fit2cloud 80f53ec8fb
feat: AI dialogue nodes support calling tools configured in the system (#3896) 2025-08-20 16:07:12 +08:00
liqiang-fit2cloud aac0f297df build: try to build web separately. 2025-08-20 15:53:33 +08:00
wxg0103 ee494a5bc0 chore: update file hashes for consistency and remove unnecessary ordering in model queries 2025-08-20 14:20:47 +08:00
wxg0103 c83462ef74 fix: make API URL and keys required fields in llm.py 2025-08-20 10:33:47 +08:00
wangdan-fit2cloud 082cfaaada fix: fix code bug
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-19 19:08:57 +08:00
wangdan-fit2cloud 7fcd8d4fce
perf: Optimize front-end code 2025-08-19 18:51:09 +08:00
liqiang-fit2cloud 3c46251eae Merge remote-tracking branch 'origin/v2' into v2 2025-08-19 18:35:46 +08:00
liqiang-fit2cloud 64f2f73d4b build: try to speed up web-build. 2025-08-19 18:35:38 +08:00
wxg0103 8c410a1d0a fix: update langchain-openai dependency to version 0.3.30 2025-08-19 18:33:36 +08:00
liqiang-fit2cloud 20cc5325f6 build: try to speed up web-build. 2025-08-19 18:26:45 +08:00
shaohuzhang1 c631d775bf
feat: Add create MCP function (#3885)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-19 17:36:23 +08:00
liqiang-fit2cloud 1e00a6d763 Revert "build: try to speed up web-build."
This reverts commit 245babbcae.
2025-08-19 17:33:20 +08:00
liqiang-fit2cloud 245babbcae build: try to speed up web-build. 2025-08-19 17:28:16 +08:00
liqiang-fit2cloud 85ec2d7fa7 build: try to speed up web-build. 2025-08-19 17:21:46 +08:00
liqiang-fit2cloud b9065107c0 build: try to speed up web-build. 2025-08-19 17:19:54 +08:00
CaptainB 0732936f8b fix: replace pip with uv for package installation in Dockerfile 2025-08-19 17:17:38 +08:00
liqiang-fit2cloud ded828104e build: try to speed up web-build. 2025-08-19 17:15:59 +08:00
CaptainB 63d441f928 fix: add uv.lock to .gitignore to prevent tracking of lock file
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-19 16:18:02 +08:00
CaptainB 9f83755007 fix: update Dockerfile to install dependencies from pyproject.toml and adjust .dockerignore 2025-08-19 16:01:51 +08:00
CaptainB 103bd6697b fix: correct torch dependency syntax in pyproject.toml 2025-08-19 15:53:19 +08:00
CaptainB 7fc1d89659 fix: refactor database collation refresh and reindex logic with improved error handling 2025-08-19 15:52:04 +08:00
liqiang-fit2cloud b9fcd68418 build: try uv. 2025-08-19 15:50:41 +08:00
zhangzhanwei 354f85ddb6 feat: Qwen asr speech recognition 2025-08-19 15:44:22 +08:00
CaptainB 9461ca8071 feat: add migration to refresh collation and reindex database 2025-08-19 13:44:10 +08:00
liqiang-fit2cloud 11b689226c fix: fix tool issue occurred after upgrade debian to trixie. 2025-08-19 13:06:56 +08:00
liqiang-fit2cloud 02e183e65c build: upgrade pg from 17.5 to 17.6. 2025-08-19 09:55:40 +08:00
liqiang-fit2cloud 5c6a5ea1aa fix: update base images in Dockerfile to use trixie variant 2025-08-19 09:48:27 +08:00
liqiang-fit2cloud 29314a79d0 fix: update base images in Dockerfile to use trixie variant 2025-08-19 09:43:31 +08:00
liqiang-fit2cloud 4a8963b548 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-08-19 09:25:44 +08:00
shaohuzhang1 d26883581c
feat: Form nodes support file upload and multi-line text (#3879)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-18 19:08:00 +08:00
zhangzhanwei 31d71d137a feat: Front end permissions for resource authorization 2025-08-18 18:16:20 +08:00
CaptainB 4847eba4bf fix: add check for existing problem-paragraph mapping before processing
--bug=1060558 --user=刘瑞斌 【github#3868】知识库分段,重复添加同一个问题,问题会重复多次关联分段 https://www.tapd.cn/62980211/s/1756889
2025-08-18 17:08:22 +08:00
wxg0103 044465fcc6 feat: enhance model credential validation and support for multiple API versions 2025-08-18 16:46:27 +08:00
zhangzhanwei 795db14c75 feat: Backend permissions for resource authorization 2025-08-18 16:39:00 +08:00
CaptainB ed424428ac fix: update base images in Dockerfile to use bookworm variant 2025-08-18 15:32:04 +08:00
CaptainB c82a33ce48 fix: update postgres dependency to version 17.6-bullseye 2025-08-18 14:57:34 +08:00
zhangzhanwei 2714a941f9 feat: Resource authorization permission 2025-08-18 14:24:31 +08:00
CaptainB f1c7f0f3af feat: add allow_download option to document form 2025-08-18 14:04:21 +08:00
zhangzhanwei b32b06391f feat: Qwen2.5-omni-7b full modal speech recognition 2025-08-18 11:05:34 +08:00
shaohuzhang1 a85c36f289
feat: Workflow form nodes support reference assignment (#3866) #2439
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-15 18:08:18 +08:00
wxg0103 f78027818d fix: improve formatting and consistency in ChatHistoryDrawer.vue 2025-08-15 17:59:26 +08:00
zhangzhanwei 15ec70c4a8 feat: Interface with Qwen Omni speech to text model 2025-08-15 17:52:43 +08:00
shaohuzhang1 33806f66d0
feat: Workplace resource authorization (#3864)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-15 17:48:52 +08:00
CaptainB a700bc126f fix: update pypdf dependency to version 6.0.0 2025-08-15 16:36:29 +08:00
justin0u0 6def3eecda
fix(ui): markdown unordered list does not show correctly (#3857) 2025-08-15 16:03:23 +08:00
shaohuzhang1 c0b2aa3688
feat: System resource authorization function (#3861)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-15 16:03:03 +08:00
wxg0103 f78e24105f feat: enhance WeCom Bot configuration with updated URL info and additional guidance 2025-08-15 15:43:25 +08:00
liqiang-fit2cloud 8e5f1bb74e Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-08-14 16:25:14 +08:00
CaptainB f1bc8bba73 fix: add platform-specific torch dependency for Windows support
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-14 16:23:30 +08:00
liqiang-fit2cloud b03c8cf384 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-08-14 16:15:58 +08:00
CaptainB e76b0a7d71 fix: update torch dependency to support platform-specific installation 2025-08-14 16:15:48 +08:00
zhangzhanwei 9ea37a4799 feat:Multiple permission filtering function 2025-08-14 16:10:21 +08:00
liqiang-fit2cloud 55db283d96 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-08-14 14:41:54 +08:00
CaptainB 581143cba2 fix: improve error logging format for TencentCloudSDKException 2025-08-14 14:31:03 +08:00
CaptainB 8fe21248a8 chore: remove tencentcloud-sdk-python-asr dependency from pyproject.toml
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-14 11:37:48 +08:00
liqiang-fit2cloud 530a546352 refactor: disable upgrade from v1 to v2. 2025-08-14 11:28:44 +08:00
CaptainB 194b6844f5 feat: add tencentcloud-sdk-python-asr dependency 2025-08-14 11:26:39 +08:00
zhangzhanwei f9f475a5a0 feat: Integrate with Tencent SentienceRecognition model 2025-08-14 11:23:16 +08:00
wxg0103 8ee9bc04eb feat: add WeCom Bot configuration support in application settings
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-13 17:34:15 +08:00
liqiang-fit2cloud 6279c9bc3e dep: update description. 2025-08-13 17:29:06 +08:00
liqiang-fit2cloud 0d1d3a19b8 dep: update torch. 2025-08-13 17:03:46 +08:00
liqiang-fit2cloud c8762ade9a build: update ENV. 2025-08-13 14:57:50 +08:00
CaptainB af4f9e5139 fix: improve default parameter handling in MCP tool code generation 2025-08-13 13:37:00 +08:00
CaptainB 3830ee920d feat: enhance function parameter handling to support default values 2025-08-13 12:44:39 +08:00
CaptainB 5e99770999 feat: enhance MCP tool execution with unique ID generation and improved file handling 2025-08-13 12:30:30 +08:00
CaptainB bb665b5196 feat: enhance MCP tool execution with unique ID generation and improved file handling 2025-08-13 11:49:37 +08:00
CaptainB f0a3391897 refactor: simplify error handling in MCP server code execution 2025-08-13 11:49:37 +08:00
zhangzhanwei 5061708c1f rafactor: User resource permission read and edit 2025-08-13 10:11:46 +08:00
shaohuzhang1 5c0735109a
perf: Partial icon updates (#3847)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-12 18:47:05 +08:00
liqiang-fit2cloud 4865a092e4 Revert "build: try uv."
This reverts commit 5a35665ded.
2025-08-12 17:29:32 +08:00
liqiang-fit2cloud 02a8aaa6d0 Merge remote-tracking branch 'origin/v2' into v2 2025-08-12 17:25:42 +08:00
liqiang-fit2cloud 5a35665ded build: try uv. 2025-08-12 17:25:34 +08:00
CaptainB 0fe432eefd fix: enable tool code file cleanup by removing commented-out code 2025-08-12 17:25:17 +08:00
liqiang-fit2cloud cf5d5c73ec Revert "build: try uv."
This reverts commit 1837512abc.
2025-08-12 17:24:45 +08:00
CaptainB 541f1f26c8 feat: refactor MCP code generation and update cleanup logic 2025-08-12 17:23:22 +08:00
liqiang-fit2cloud 1837512abc build: try uv. 2025-08-12 17:22:03 +08:00
CaptainB 1d7a5af626 feat: refactor MCP server code generation and add execution method 2025-08-12 17:13:30 +08:00
CaptainB f2459ed124 feat: add support for CUSTOM tool type in tool list retrieval 2025-08-12 16:01:07 +08:00
CaptainB e9c8c9581f feat: add MCP tool ID and source fields to chat node for enhanced configuration 2025-08-12 15:22:42 +08:00
CaptainB 1875368ea8 feat: enhance MCP tool dialog with source selection and dynamic tool options 2025-08-12 11:43:39 +08:00
liqiang-fit2cloud 870e7f271a refactor: change dir permission. 2025-08-12 11:13:51 +08:00
liqiang-fit2cloud b1a70b7b99 Merge remote-tracking branch 'origin/v2' into v2
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-12 10:45:02 +08:00
liqiang-fit2cloud 8183858adf refactor: change dir permission. 2025-08-12 10:44:51 +08:00
CaptainB f1356e9b61 feat: add MCP tool support with new form and dropdown options 2025-08-12 10:41:42 +08:00
zhangzhanwei c468952274 feat: Locales
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
2025-08-11 16:25:52 +08:00
zhangzhanwei 919c4e3f7f feat: Modify the authorization information of resources for users 2025-08-11 15:54:09 +08:00
liqiang-fit2cloud 154fd5e52b refactor: change dir permission. 2025-08-08 18:39:43 +08:00
liqiang-fit2cloud ce52ee3ca7 refactor: change dir permission. 2025-08-08 18:02:10 +08:00
liqiang-fit2cloud ba067c53e2 build: reduce image size. 2025-08-08 17:32:46 +08:00
wxg0103 5b14d62829 fix: correct redirect URL construction in CAS, OAuth2, and OIDC components
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-07 11:35:59 +08:00
shaohuzhang1 2367b8747e
fix: There is a tool node in the application - the tool node has startup parameters - after importing, the tool should be disabled (#3831)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled
2025-08-06 16:38:37 +08:00
wxg0103 8ac5f409e4 refactor: update QR code tab visibility logic based on authentication modes 2025-08-06 16:29:30 +08:00
wxg0103 e84a215114 fix: correct role filtering in user role deletion logic 2025-08-06 15:44:03 +08:00
shaohuzhang1 e923422cae
fix: The user modified the workspace range but did not automatically refresh after returning to the workspace (#3830) 2025-08-06 15:07:19 +08:00
liqiang-fit2cloud b3f7d5ed4f build: exclude some files for typo checking. 2025-08-06 14:44:39 +08:00
wxg0103 7de8afc3a7 refactor: adjust login mode handling to default to LOCAL when not using LDAP 2025-08-06 14:38:20 +08:00
shaohuzhang1 3c885ddf3c
fix: When the slider type step size is set to 0, the verification is triggered, and when it is changed to 1, the verification disappears (#3829) 2025-08-06 14:11:55 +08:00
wxg0103 885b65cbbe refactor: update login mode handling and simplify QR code tab logic
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-08-06 11:44:48 +08:00
zhangzhanwei e4575389eb fix: Resource application chat record get 2025-08-06 11:25:09 +08:00
shaohuzhang1 bd589e50e2
fix: Calling the model using non stream cannot obtain the token (#3826) 2025-08-06 11:00:43 +08:00
shaohuzhang1 ca3815e6fe
fix: Create a blank document name with more than 128 characters, prompt message needs to be translated (#3825) 2025-08-06 10:48:24 +08:00
wxg0103 da9ed39fa9 refactor: enhance permission mapping to include admin roles 2025-08-06 09:51:52 +08:00
shaohuzhang1 ec12ad0c2e
fix: MCP node display nesting issue (#3822)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-08-05 19:23:48 +08:00
wxg0103 f61a567bc3 refactor: streamline permission mapping for system and workspace roles 2025-08-05 19:06:37 +08:00
wangdan-fit2cloud a4971428b3 style: problem style 2025-08-05 18:24:23 +08:00
wxg0103 901b88887d style: clean up whitespace and formatting in KnowledgeSetting.vue 2025-08-05 18:11:40 +08:00
wangdan-fit2cloud 8222cf42fa fix: paragraph problem error 2025-08-05 17:35:53 +08:00
shaohuzhang1 44645734f5
fix: There is a tool node in the application - the tool node has startup parameters - after importing, the tool should be disabled (#3821) 2025-08-05 17:30:36 +08:00
shaohuzhang1 5426e90234
fix: Add application nodes in advanced orchestration, unpublished applications are not filtered out (#3820) 2025-08-05 16:53:51 +08:00
wxg0103 81e9c596b7 style: improve layout and styling of QR code components and login card
--bug=1059979 --user=王孝刚 【应用】应用开启登录认证,企业微信的登录二维码没有左右居中 https://www.tapd.cn/62980211/s/1749294
2025-08-05 16:46:44 +08:00
shaohuzhang1 1d53b768ac
fix: The selected variable of the variable assignment node in advanced orchestration does not echo (#3819) 2025-08-05 16:41:42 +08:00
shaohuzhang1 47c51c9466
fix: Node copied in orchestration, default name incorrect, should be in numerical calculation form of+1, not string form of+1 (#3818) 2025-08-05 16:29:55 +08:00
CaptainB 2337dee02d feat: enhance tool list retrieval with shared folder filtering and structured response
--bug=1060012 --user=刘瑞斌 【应用】高级编排获取的共享工具列表为空 https://www.tapd.cn/62980211/s/1749230
2025-08-05 16:29:32 +08:00
zhangzhanwei c48aa77f2f fix: Application workflow debug use --bug=1059999 --user=张展玮 【资源管理】继承系统管理员角色的用户,在资源管理中调试应用无权限 https://www.tapd.cn/62980211/s/1749113 2025-08-05 15:58:57 +08:00
CaptainB 1a17c7c5df feat: add workspaceId prop for enhanced document management and retrieval
--bug=1059992 --user=刘瑞斌 【资源管理】应用-对话日志修改内容报错,无法获取知识库 https://www.tapd.cn/62980211/s/1749196
--bug=1059994 --user=刘瑞斌 【资源管理】知识库文档分段迁移报错,无法获取知识库 https://www.tapd.cn/62980211/s/1749198
2025-08-05 15:57:04 +08:00
shaohuzhang1 f43fa25f6a
perf: Resource management filters optimization (#3815)
Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-05 15:21:49 +08:00
shaohuzhang1 6ba6ed065e
fix: When the workflow session variable is not added, the dropdown option does not display the session variable attribute (#3816) 2025-08-05 15:17:32 +08:00
CaptainB f668daa902 fix: refactor delete method in DocumentSerializers for improved clarity
--bug=1060005 --user=刘瑞斌 【资源管理】知识库-删除文档报错 https://www.tapd.cn/62980211/s/1749123
2025-08-05 15:08:12 +08:00
shaohuzhang1 9a626efe35
fix: When the reference variable in the workflow is empty, take the value of None (#3814) 2025-08-05 15:07:09 +08:00
wangdan-fit2cloud 319bd37b10
perf: Icon update (#3812) 2025-08-05 14:23:02 +08:00
zhangzhanwei d2978906a6 feat: Shared knowledge problem related permission constant
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-08-05 11:56:04 +08:00
zhangzhanwei 1febd0a957 fix: Problem read permission 2025-08-05 11:49:19 +08:00
shaohuzhang1 3edc68471b
fix: There may be misalignment when extracting Excel spreadsheets using applications (#3809) 2025-08-05 11:21:40 +08:00
wxg0103 fcc61f0ab2 feat: enhance redirect URL construction with query parameters in authentication flow 2025-08-05 11:04:40 +08:00
wangdan-fit2cloud 27262c9478 fix: icon optimize
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-08-04 19:10:56 +08:00
wangdan-fit2cloud f46205bece fix: style 2025-08-04 18:25:47 +08:00
wxg0103 3b51778dcd refactor: update parameter names in application functions for clarity 2025-08-04 18:15:36 +08:00
wxg0103 a1c4aa3733 refactor: update parameter names in application functions for clarity 2025-08-04 18:15:36 +08:00
shaohuzhang1 c1c0c6a5a5
perf: Optimize login page (#3805)
* perf: icon  optimize

* perf: Optimize login page

---------

Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
2025-08-04 18:07:47 +08:00
CaptainB bbf321fc96 fix: improve file list management by limiting to max files and filtering oversized files
--bug=1059967 --user=刘瑞斌 【应用】高级编排上传文件最大数量设置为100,上传101个文件,不显示上传的文件,对话时上传文件为空 https://www.tapd.cn/62980211/s/1748567
2025-08-04 17:28:25 +08:00
liqiang-fit2cloud ab10ac9bc6 build: exclude some files for typo checking. 2025-08-04 17:04:39 +08:00
wxg0103 93b63dd18c feat: add clearable option to 'is_active' search field in user management 2025-08-04 16:17:14 +08:00
wxg0103 eac7a6bbb0 feat: add 'is_active' search option in user management and update search form structure 2025-08-04 16:07:11 +08:00
wangdan-fit2cloud 7dba06ed82 fix: Advanced orchestration, adding applications, filtering oneself 2025-08-04 15:42:36 +08:00
shaohuzhang1 f7623dcfdc
feat: Application list search criteria support querying by status (#3803) 2025-08-04 15:38:20 +08:00
wxg0103 b5fe64d619 feat: add source selection option in user search and improve code formatting 2025-08-04 15:21:12 +08:00
shaohuzhang1 6e1fb1d4ce
fix: [Advanced Orchestration] The content in the specified reply was repeated several times when the Q&A was output. #3754 (#3801) 2025-08-04 14:19:03 +08:00
shaohuzhang1 fe94ca578e
fix: After the application name change - the application name on the demo page has not been updated (#3800) 2025-08-04 14:02:53 +08:00
shaohuzhang1 be8d5fc715
fix: The image displayed by the application cannot be enlarged by clicking #3663 (#3799) 2025-08-04 13:46:32 +08:00
CaptainB a8645b6721 fix: update tool type display logic in ToolResourceIndex.vue for improved clarity
--bug=1059949 --user=刘瑞斌 【资源管理】工具列表,内置工具的类型显示错误 https://www.tapd.cn/62980211/s/1748031
2025-08-04 11:39:13 +08:00
CaptainB d635cc24b4 fix: add validation checks in page and list methods of KnowledgeFolder
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-08-04 11:10:30 +08:00
wxg0103 0e684f2946 chore: update SVG icons in local_icon_svg and modify community file hash
--bug=1059658 --user=王孝刚 【模型】icon 替换 https://www.tapd.cn/62980211/s/1747959
2025-08-04 11:09:50 +08:00
CaptainB 39ac62745e feat: enhance SystemKnowledgeSerializer and related components to support workspace and folder IDs
--bug=1059926 --user=刘瑞斌 【资源管理】知识库文档迁移时,可选择的目标知识库展示了系统所有的知识库 https://www.tapd.cn/62980211/s/1747947
2025-08-04 11:08:44 +08:00
wangdan-fit2cloud cbf7dd00cf fix: Uploading attachments for conversation allows for direct conversation 2025-08-04 11:03:08 +08:00
zhangzhanwei ecd019aa14 fix: Application detail 2025-08-04 10:38:06 +08:00
zhangzhanwei 40866f28d0 fix: Application route
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-08-01 18:56:23 +08:00
zhangzhanwei 6660552618 fix: Problem related 2025-08-01 17:31:45 +08:00
zhangzhanwei d4312ee9ea feat: Resource application permission 2025-08-01 17:26:41 +08:00
shaohuzhang1 83a1ffb891
feat: Support session variables (#3792)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-08-01 17:11:36 +08:00
wangdan-fit2cloud 0e78245bfb perf: Style optimization and some icon updates 2025-08-01 17:05:32 +08:00
wangdan-fit2cloud 27a26f34b3 feat: Optimization of file upload limit quantity 2025-08-01 14:44:31 +08:00
wangdan-fit2cloud b709de30b9 perf: Partial style optimization 2025-08-01 11:41:45 +08:00
zhangzhanwei 5901e7fc02 fix: Problem related permission 2025-08-01 11:02:10 +08:00
wangdan-fit2cloud 1540fcd0de fix: model page‘s icon error and change workflow page‘s model api 2025-07-31 18:20:01 +08:00
shaohuzhang1 efbcec98bc
fix: Opening statement character limit 40960 (#3790) 2025-07-31 16:43:52 +08:00
shaohuzhang1 2de1d817d7
fix: Error response optimization (#3789)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-31 16:17:23 +08:00
zhangzhanwei aee0b251dc fix: Permission constants 2025-07-31 16:07:33 +08:00
CaptainB 4e6d19235b fix: remove unnecessary validation checks for query sets in paragraph handling 2025-07-31 15:41:28 +08:00
CaptainB 7fc0bd2396 fix: simplify validation checks in document and paragraph retrieval methods 2025-07-31 15:37:38 +08:00
wxg0103 3d1ebad70b chore: update commit hashes for community and xpack; modify SQL queries to cast meta as JSON 2025-07-31 15:12:33 +08:00
CaptainB 651b96dbb5 fix: add update_time field to edit_dict for tracking modification time
--bug=1059909 --user=刘瑞斌 【资源管理】工具列表-编辑并保存工具后,工具的更新时间依然展示原来的时间 https://www.tapd.cn/62980211/s/1746435
2025-07-31 14:55:54 +08:00
wangdan-fit2cloud 6dd2e9a6b7 fix: import paragraph scrollbar style(#3680) 2025-07-31 14:51:46 +08:00
zhangzhanwei 356229c6ad feat: Resource application permission 2025-07-31 14:43:49 +08:00
shaohuzhang1 525af67387
fix: Some nodes cannot obtain data after form collection (#3786) 2025-07-31 14:21:38 +08:00
CaptainB 6184058e4d feat: implement charset detection utility in fork.py
--bug=1059829 --user=刘瑞斌 【知识库】web导入知识库中文字符乱码 https://www.tapd.cn/62980211/s/1746162
2025-07-31 11:39:02 +08:00
shaohuzhang1 1742db681d
feat: Details of workflow application (#3785) 2025-07-31 11:22:56 +08:00
wangdan-fit2cloud 021442d586 fix: workflow back button error 2025-07-31 10:44:52 +08:00
zhangzhanwei 30942108bd perf: Router jump 2025-07-31 10:23:45 +08:00
wxg0103 52a98ae9b5 fix: remove unused chatLog variable from ChatHistoryDrawer.vue 2025-07-31 09:17:24 +08:00
wangdan-fit2cloud 86ad2c54c6 feat: applicaiton resource managment
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-30 19:38:02 +08:00
CaptainB 3951853104 fix: update buildx_args output format in build-and-push.yml 2025-07-30 17:48:20 +08:00
wxg0103 9b54fcb048 fix: remove unsupported sync type messages from translations in django.po 2025-07-30 17:34:17 +08:00
shaohuzhang1 d978fd851f
fix: The model parameter setting is, open the model parameters. If there are multiple parameters, open the parameter editing and the content inside will become the first parameter. #3671 (#3779) 2025-07-30 17:16:39 +08:00
wxg0103 549aa62349 refactor: update user search parameters and improve code formatting in chat user components 2025-07-30 17:12:51 +08:00
wxg0103 dd7b2a7bda feat: enhance chat authentication logic and update model handling for chat platform 2025-07-30 16:44:05 +08:00
wxg0103 9f31832b4d fix: clean up code formatting and adjust user model is_active field to null 2025-07-30 16:26:12 +08:00
wxg0103 83a53e61b6 feat: add translations for OIDC, OAuth2, DingTalk, WeCom, and Lark in multiple languages 2025-07-30 16:11:11 +08:00
wxg0103 87eb5a879b fix: update redirect logic for chat user login in dingtalk and wecom QR code components 2025-07-30 16:03:35 +08:00
zhangzhanwei 00a4b09c99 feat: Resource knowledge permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-30 15:50:38 +08:00
wxg0103 1f1a1bbad9 feat: add translations for sync type and configuration error messages in multiple languages 2025-07-30 15:38:12 +08:00
CaptainB 5530b81f8b feat: add chat user and chat user group APIs for system knowledge management 2025-07-30 13:14:20 +08:00
shaohuzhang1 2281202921
fix: The dialogue interface cannot be opened (#3774) 2025-07-30 11:15:40 +08:00
zhangzhanwei 1b23fb4472 fix: Model resource 2025-07-30 10:54:31 +08:00
CaptainB f020ab4b28 feat: refactor getSelectModelList to use workspace_id from data and update model retrieval logic 2025-07-30 10:38:57 +08:00
shaohuzhang1 e28ea0d849
build: Packaging error (#3772) 2025-07-30 10:25:12 +08:00
CaptainB a3a124d581 feat: update permission checks to remove row.id dependency and add workspace_id to knowledge retrieval 2025-07-30 09:56:33 +08:00
wangdan-fit2cloud 03fbba0952 feat: knowledge resource management and model resource management
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-29 18:36:27 +08:00
shaohuzhang1 5022b2a872
fix: The conversation page cannot be opened (#3770) 2025-07-29 18:23:45 +08:00
wxg0103 caa08e136f feat: add nick_name field to user search and update authentication forms 2025-07-29 18:00:24 +08:00
wxg0103 7205c7fda7 fix: set default redirect URLs for CAS, OAuth2, and OIDC configurations 2025-07-29 16:36:19 +08:00
zhangzhanwei b3fa1e559a feat: Resource permission in system-manage 2025-07-29 15:59:17 +08:00
zhangzhanwei 6adc051cad fix: Resource tool permission constants 2025-07-29 15:07:41 +08:00
wxg0103 a62ed23315 fix: correct gettext usage for application publish error message
--bug=1058890 --user=王孝刚 【应用】应用未发布状态下对话,提示语国际化不对 https://www.tapd.cn/62980211/s/1744119
2025-07-29 15:05:09 +08:00
wxg0103 392aaf9d87 feat: add is_active and source fields to user query parameters
--bug=1059690 --user=王孝刚 【用户管理】筛选项加上:状态、用户来源 https://www.tapd.cn/62980211/s/1744107
2025-07-29 14:53:01 +08:00
wxg0103 fbef7232da feat: enhance user search functionality with additional filters for active status and source
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
--bug=1059690 --user=王孝刚 【用户管理】筛选项加上:状态、用户来源 https://www.tapd.cn/62980211/s/1744107
2025-07-29 14:52:28 +08:00
zhangzhanwei 53f83d3292 feat: Resource tool permission 2025-07-29 14:50:21 +08:00
wxg0103 f13dcbcc3c fix: update callback URLs for WeCom, DingTalk, and Lark platforms to use the correct path 2025-07-29 12:25:42 +08:00
wxg0103 aa7af2bcd3 fix: update callback URLs for WeCom, DingTalk, and Lark platforms 2025-07-29 11:43:30 +08:00
zhangzhanwei 139473e77c feat: Front permission 2025-07-29 11:07:47 +08:00
zhangzhanwei c2b626774c fix: Permission label 2025-07-29 11:01:57 +08:00
shaohuzhang1 d33ae01d5a
fix: MCP calling node error #3752 (#3762) 2025-07-29 10:48:30 +08:00
zhangzhanwei 9cc051ded4 feat: Knowledge permission constants 2025-07-29 10:28:29 +08:00
zhangzhanwei cac05c747b feat: Permission constants
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-28 18:26:41 +08:00
wangdan-fit2cloud 23327d7260 perf: Optimize user login 2025-07-28 18:02:19 +08:00
zhangzhanwei f4ef5f227c fix: Resource model permission 2025-07-28 16:12:55 +08:00
zhangzhanwei 7942b12afa feat: Permission constants 2025-07-28 15:56:58 +08:00
CaptainB 899e37b3e4 feat: update permission checks to remove row ID dependency in ToolResourceIndex 2025-07-28 15:19:40 +08:00
CaptainB dc9ae84466 feat: enhance permission checks for delete, switch, edit, export, and debug operations 2025-07-28 14:22:30 +08:00
CaptainB 41cb4fedb1 feat: add application access token and API key management endpoints 2025-07-28 11:58:47 +08:00
wxg0103 60c7f78a90 refactor: update resource permission constants for improved clarity
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-28 10:29:29 +08:00
zhangzhanwei ca070d7466 fix: Model swagger
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-07-25 18:35:58 +08:00
wangdan-fit2cloud bf7d5c2e61 feat: Tool reaource 2025-07-25 18:12:03 +08:00
wxg0103 f744e8b109 feat: add platform authentication methods and improve QR code handling 2025-07-25 17:53:54 +08:00
liqiang-fit2cloud 0eb1cf701e refactor: enable pre_ping explicitly. 2025-07-25 17:19:39 +08:00
shaohuzhang1 65ab0ef170
fix: Interface parameter asker, user cannot be seen in the conversation log #3735 (#3748) 2025-07-25 17:16:05 +08:00
shaohuzhang1 9a706c7ac5
fix: Dialogue prefix (#3746) 2025-07-25 16:38:15 +08:00
wangdan-fit2cloud 9ec60782aa perf: Upgrade the markdown editor 2025-07-25 15:32:01 +08:00
CaptainB 4d18b78d29 fix: update SQL queries to improve similarity calculations and indexing
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-24 16:18:53 +08:00
wangdan-fit2cloud b3a5dc4a1c perf: Login page optimize 2025-07-24 15:46:59 +08:00
CaptainB 6ce1eb7116 feat: add create and drop knowledge index functions for improved database management
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-23 21:42:33 +08:00
liqiang-fit2cloud fc4a7df669 refactor: recycle db connection to avoid "the connection is closed" exception.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-23 16:40:58 +08:00
liqiang-fit2cloud 063920ce59 refactor: recycle db connection to avoid "the connection is closed" exception. 2025-07-23 16:28:38 +08:00
CaptainB 3d08263f79 fix: change logging level for django.server to ERROR for improved error handling 2025-07-23 14:22:57 +08:00
CaptainB 567a7612ed refactor: change log level from debug to info for chat log and access number jobs
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-23 10:26:49 +08:00
zhangzhanwei 3ca8c6ef73 perf: Morefilled system and model
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-22 16:05:48 +08:00
zhangzhanwei f6b271e929 perf: Morefield paragraph tool 2025-07-22 14:19:37 +08:00
liqiang-fit2cloud 42a4ab4e9a refactor: print more logs in start-all.sh. 2025-07-22 11:27:30 +08:00
liqiang-fit2cloud cbb5e69ead refactor: print more logs in start-all.sh. 2025-07-22 11:07:42 +08:00
CaptainB b41b054c49 fix: update LOG_KEEP_DAYS to use CONFIG for configurable log retention 2025-07-22 10:23:14 +08:00
CaptainB 47dd177b7e fix: update CELERY_timezone to use CONFIG.get_time_zone() for improved timezone handling
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-21 18:43:43 +08:00
zhangzhanwei 04f3fc5213 perf: Morefield of document 2025-07-21 18:24:03 +08:00
wangdan-fit2cloud ad90479278 fix: Missing i18n messages in English(#3673)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-21 16:45:06 +08:00
CaptainB 1df333bffc refactor: reorganize post handler and introduce post scheduler handler 2025-07-21 15:52:54 +08:00
liqiang-fit2cloud 18c0be36a6 refactor: disable pylint output log to console. 2025-07-21 15:35:13 +08:00
liqiang-fit2cloud 03f05ced27 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-07-21 15:33:50 +08:00
zhangzhanwei a725783579 feat: Morefiled of folder and knowledge 2025-07-21 15:15:26 +08:00
shaohuzhang1 e85d5b9714
fix: The conversation user in the workflow cannot be passed into the function (#3685) 2025-07-21 14:47:35 +08:00
liqiang-fit2cloud 9a6be423ac Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-07-21 14:10:27 +08:00
CaptainB 2ec98d9c3b fix: update request data handling to use request.data instead of request.query_params 2025-07-21 12:25:17 +08:00
liqiang-fit2cloud fa5434cc79 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-07-21 12:11:54 +08:00
wangdan-fit2cloud 8c88d70911 perf: Clear comments 2025-07-21 11:32:34 +08:00
CaptainB b5d2982812 chore: validate transport types in mcp_servers configuration 2025-07-21 11:23:53 +08:00
liqiang-fit2cloud a4d1a5067a Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-07-21 11:06:48 +08:00
liqiang-fit2cloud aee2f43acd refactor: remove r permission for sandbox user. 2025-07-21 11:06:27 +08:00
liqiang-fit2cloud ecd4d63aee refactor: remove r permission for sandbox user. 2025-07-21 11:03:20 +08:00
shaohuzhang1 073e7e31e1
fix: Professional version opens the application dialogue interface with an error message without authorization #3677 (#3679) 2025-07-21 10:45:06 +08:00
CaptainB a25d7b9aa0 chore: update Redis configuration to use unified REDIS_DB setting 2025-07-21 10:41:23 +08:00
liqiang-fit2cloud 1e14a00754 refactor: add banned keyword. 2025-07-21 10:21:07 +08:00
CaptainB 6f2db6f488 feat: Implement daily log rotation with DailyTimedRotatingFileHandler
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-20 14:16:13 +08:00
maninhill 12f69966b2
chore: Update README.md (#3676)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-19 08:50:24 +08:00
shaohuzhang1 4cf2b74cb8
fix: After enabling application access authentication, closing the public access connection will still display the application login page (#3675)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-18 18:43:36 +08:00
CaptainB 6e16c74a5e refactor: improve logging and status updates in embedding methods
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-07-18 15:21:01 +08:00
zhangzhanwei c363003aed fix: Tool debug
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-18 11:38:18 +08:00
shaohuzhang1 7e78b7fa81
fix: Multiple recall error when the previous node has no data (#3665) 2025-07-18 11:34:20 +08:00
CaptainB 638a09d4f4 chore: redirect access logs to /dev/null in gunicorn and local_model 2025-07-18 10:40:46 +08:00
CaptainB 03ba4df625 fix: update Gunicorn access log file configuration to use stdout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-17 21:43:27 +08:00
CaptainB a86d286a34 feat: add support for HTTP range requests for audio files 2025-07-17 21:12:13 +08:00
wxg0103 95be524066 fix: handle potential undefined role_setting in UserDrawer component 2025-07-17 18:18:47 +08:00
shaohuzhang1 4711527222
fix: The knowledge base results show a source issue #3658 (#3661) 2025-07-17 18:15:50 +08:00
CaptainB 0435e1e494 refactor: use lodash's cloneDeep to prevent mutation of params in onEnd function 2025-07-17 17:25:32 +08:00
CaptainB 7eeb42c9fd refactor: replace Status with State for consistent status handling 2025-07-17 16:59:12 +08:00
CaptainB 19a1b5a788 refactor: enhance paragraph positioning logic in ApplicationChatRecord 2025-07-17 16:59:12 +08:00
CaptainB 9ef4977ada chore: update default docker image tag to v2.0.1-dev in build-and-push.yml 2025-07-17 15:43:03 +08:00
CaptainB 9e80a652c4 refactor: replace try_lock and un_lock with RedisLock for improved locking mechanism 2025-07-17 15:34:11 +08:00
CaptainB 6f6be4c90a chore: update target branch from v2 to v3 in dependabot configuration 2025-07-17 15:27:56 +08:00
liqiang-fit2cloud fe751f5fd0 doc: add some md files. 2025-07-17 14:42:23 +08:00
liqiang-fit2cloud a3862471ac Merge remote-tracking branch 'origin/v2' into v2 2025-07-17 14:28:42 +08:00
liqiang-fit2cloud 9c125a9649 doc: add LICENSE. 2025-07-17 14:28:34 +08:00
baixin ddbafa4afa
Update README_CN.md
Update README_CN
2025-07-17 14:11:49 +08:00
baixin 7ff90917b6
Update README.md
update readme
2025-07-17 14:05:59 +08:00
liqiang-fit2cloud c96de7a5f5 refactor: change log level.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-17 09:55:21 +08:00
liqiang-fit2cloud 59e6fcaed7 doc: update README.md. 2025-07-17 09:44:29 +08:00
shaohuzhang1 c14aa518fb
fix: Community cannot be embedded (#3644) 2025-07-16 21:12:38 +08:00
wangdan-fit2cloud ff810db283 fix: pdf document name issue 2025-07-16 21:04:45 +08:00
CaptainB b85ba190db feat: add compression for file storage and retrieval in knowledge.py 2025-07-16 20:54:55 +08:00
shaohuzhang1 8a9e0abe3b
fix: Unable to play voice after publishing (#3643) 2025-07-16 20:49:13 +08:00
wangdan-fit2cloud d672cf8eac fix: question avatar size
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-16 20:28:53 +08:00
zhangzhanwei 243af4d866 fix: Chat click 2025-07-16 20:19:56 +08:00
shaohuzhang1 925a9b02fa
fix: Dialogue user data debugging has also increased (#3641) 2025-07-16 20:17:20 +08:00
wangdan-fit2cloud b93c5ab80f fix: application page issue 2025-07-16 20:00:06 +08:00
wangdan-fit2cloud f0ce039499 fix: folder edit issue 2025-07-16 19:49:57 +08:00
zhangzhanwei 1ea86202b8 fix: Application debug 2025-07-16 19:10:20 +08:00
shaohuzhang1 b59762ac49
fix: No execution details were called after the application ended (#3639) 2025-07-16 19:09:30 +08:00
wangdan-fit2cloud fa55cdc143 fix: chat issue 2025-07-16 18:48:22 +08:00
shaohuzhang1 ca6630f258
fix: Application export misalignment (#3638) 2025-07-16 18:44:51 +08:00
zhangzhanwei ec8f33df83 fix: Knowledge document problem 2025-07-16 18:41:55 +08:00
wxg0103 8231ae66e4 refactor: update license validation logic to ensure proper function calls 2025-07-16 18:23:13 +08:00
shaohuzhang1 173cf52584
fix: The startup parameters of the application import tool were not imported (#3636) 2025-07-16 18:22:57 +08:00
wxg0103 778b706776 fix: update license validation logic in profile and user role update functions 2025-07-16 18:03:33 +08:00
shaohuzhang1 c7a9a4d4bd
fix: Floating window image cannot be displayed (#3634)
* fix: After modifying the voice playback settings in the application, save the unpublished settings, and the conversation page should display the settings before modification

* fix: Floating window image cannot be displayed
2025-07-16 17:55:24 +08:00
wangdan-fit2cloud c249f7501f perf: workflow default value 2025-07-16 17:48:16 +08:00
wxg0103 c817df393f refactor: improve default global variable retrieval logic for better clarity 2025-07-16 17:44:46 +08:00
teukkk 91f884b8a3 feat: workspaceDropdown tag 2025-07-16 17:37:55 +08:00
shaohuzhang1 faebf60478
fix: Third party access without conversation user data (#3632) 2025-07-16 17:20:56 +08:00
CaptainB 8adca34c88 refactor: change log level from info to debug for clean_debug_file_lock 2025-07-16 17:20:22 +08:00
wxg0103 8d28ac27d2 refactor: improve default global variable retrieval logic for better clarity 2025-07-16 17:16:53 +08:00
CaptainB e7f61994ec feat: add validation to prevent usage of 'stdio' in MCP servers 2025-07-16 16:51:30 +08:00
zhangzhanwei f648457ba5 fix: Slogan 2025-07-16 16:49:55 +08:00
shaohuzhang1 69f004359b
fix: Application debugging will add new users (#3630) 2025-07-16 16:47:32 +08:00
CaptainB f385bb3aec refactor: rename validation method to follow naming conventions 2025-07-16 16:42:26 +08:00
teukkk 4715e4d84e fix: vueDraggable disabled 2025-07-16 16:28:37 +08:00
CaptainB 948ec2fde6 refactor: centralize scheduler initialization and improve logging in job files 2025-07-16 16:25:23 +08:00
liqiang-fit2cloud caf89e39a7 Merge remote-tracking branch 'origin/v2' into v2 2025-07-16 16:24:50 +08:00
liqiang-fit2cloud e982bb0ca1 feat: add MAXKB_SANDBOX_PYTHON_BANNED_KEYWORDS env to ban keywords in tool content. 2025-07-16 16:24:41 +08:00
CaptainB b1144d5ee9 refactor: centralize scheduler initialization and improve logging in job files 2025-07-16 16:23:55 +08:00
wangdan-fit2cloud 2b89fc05d1 perf: clear console 2025-07-16 16:09:22 +08:00
wangdan-fit2cloud 2c606b9190 fix: console bug 2025-07-16 16:04:35 +08:00
shaohuzhang1 2febd83a68
fix: Application apikey call failed (#3629) 2025-07-16 15:52:13 +08:00
wangdan-fit2cloud 15cb1f4d35 fix: Change third party logo 2025-07-16 15:41:25 +08:00
shaohuzhang1 f91afd593b
fix: Dialogue user does not display username (#3628) 2025-07-16 15:35:33 +08:00
wxg0103 0fc4a59e96 fix: remove unused route import in password.vue 2025-07-16 15:17:23 +08:00
zhangzhanwei d643e7e683 feat: Api key sorted by time 2025-07-16 15:03:57 +08:00
wangdan-fit2cloud dd3e671b50 fix: Traditional Chinese 2025-07-16 14:39:15 +08:00
wangdan-fit2cloud d4506d7036 fix: style 2025-07-16 14:24:44 +08:00
shaohuzhang1 d76c85ca3b
fix: Interface parameters disappear after dialogue password authentication (#3626) 2025-07-16 14:10:11 +08:00
liqiang-fit2cloud 232e90fd12 refactor: change log level. 2025-07-16 14:09:07 +08:00
wxg0103 97061073c1 fix: reorder OTHER permission constant in permission_constants.py 2025-07-16 14:03:03 +08:00
wangdan-fit2cloud 69ff7f9af4 fix: Embedding mode issue fix 2025-07-16 13:51:10 +08:00
zhangzhanwei 2fbeb4300f fix: Paragraph card 2025-07-16 13:45:50 +08:00
wxg0103 e5397af848 feat: enhance file handling in serializers and models for improved upload functionality
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-16 11:37:12 +08:00
teukkk c4d37a8790 fix: authorizedWorkspaceDialog save 2025-07-16 11:30:03 +08:00
teukkk 8869cca9de fix: closeExecutionDetail 2025-07-16 11:19:41 +08:00
zhangzhanwei ab14cf2e9d feat: Paragraph edit permission 2025-07-16 11:19:18 +08:00
liqiang-fit2cloud 526b4081bc refactor: update fatal message. 2025-07-16 10:50:03 +08:00
CaptainB bc879441d2 fix: update langgraph version to 0.5.3 in pyproject.toml 2025-07-16 10:44:37 +08:00
liqiang-fit2cloud dc170db6a1 docs: update README_CN.md 2025-07-16 10:29:36 +08:00
zhangzhanwei b044554559 fix: Knowledge document paragraph permission 2025-07-16 10:27:38 +08:00
shaohuzhang1 e4c1c39972
fix: Startup error (#3622) 2025-07-16 10:15:45 +08:00
wxg0103 c035dc5f39 fix: remove empty lines from text before text-to-speech conversion 2025-07-16 10:12:49 +08:00
liqiang-fit2cloud bd8700477f fix: wrong PG_VERSION path. 2025-07-16 09:26:34 +08:00
shaohuzhang1 43c7d1c3c4
fix: User input parameters do not take effect (#3620)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-15 21:50:00 +08:00
shaohuzhang1 42a7b1040a
fix: Dialogue interface parameters are missing (#3618) 2025-07-15 21:13:08 +08:00
zhangzhanwei 7317d5510d fix: Application api key 2025-07-15 20:56:13 +08:00
wangdan-fit2cloud 5cb21a69e5 fix: clear history 2025-07-15 20:48:09 +08:00
zhangzhanwei bf657aced0 fix: Workspace share knowledge hit test button visilibity 2025-07-15 20:23:56 +08:00
wangdan-fit2cloud 5cb0b3018f fix: pdf 2025-07-15 19:57:21 +08:00
wangdan-fit2cloud c1a403b583 fix: description
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-15 19:27:06 +08:00
shaohuzhang1 902a97c0f8
fix: Unable to display when refreshing the page (#3615) 2025-07-15 19:24:09 +08:00
wxg0103 79087a34d1 feat: enhance authentication handling in XPackLimitDrawer.vue 2025-07-15 19:20:50 +08:00
wangdan-fit2cloud b4569fc88d fix: tree style 2025-07-15 18:42:16 +08:00
shaohuzhang1 df9245a5a4
feat: Access num reset job (#3614) 2025-07-15 18:35:00 +08:00
wxg0103 5c1f105cab feat: update resource management permissions and localization strings 2025-07-15 18:22:42 +08:00
teukkk eae2b3e944 style: scrollbar for authorizedWorkspaceDialog 2025-07-15 18:13:16 +08:00
wxg0103 89dcac64e6 feat: add is_show parameter to Permission class to control frontend visibility 2025-07-15 18:05:38 +08:00
shaohuzhang1 dd2fbb5c98
fix: Scheduled file scheduled deletion (#3613) 2025-07-15 18:02:25 +08:00
wxg0103 41a0b1adca fix: add sync messages for user synchronization feedback in chat-user.ts and SyncUsersDialog.vue 2025-07-15 17:50:45 +08:00
CaptainB 816825d5de fix: remove unnecessary db_index from content field in models
--bug=1058812 --user=刘瑞斌 【知识库】多选问题批量关联分段,向量数据没有关联,导致向量检索结果为空 https://www.tapd.cn/62980211/s/1732046
2025-07-15 17:48:21 +08:00
zhangzhanwei 922ecb983c fix: Knowledge document problem related permission 2025-07-15 17:28:01 +08:00
shaohuzhang1 158bd2f43b
fix: rsa_key cache setting (#3610) 2025-07-15 17:21:18 +08:00
wangdan-fit2cloud 2ead8b3ed2 fix: folder bugs 2025-07-15 17:16:42 +08:00
CaptainB 949c6d5ce1 fix: remove unnecessary db_index from content field in models 2025-07-15 16:59:00 +08:00
zhangzhanwei 5df3f6552e fix: Hit test share 2025-07-15 16:52:41 +08:00
shaohuzhang1 d0eb28d5fa
fix: The conversation page cannot be opened after three parties enter and refresh (#3608) 2025-07-15 16:39:04 +08:00
teukkk 48c59b59a8 fix: click paragraph card 2025-07-15 16:33:04 +08:00
zhangzhanwei 371ee61c24 fix: Workspace share knowledge problem 2025-07-15 16:32:45 +08:00
liqiang-fit2cloud fbbe1b4fc3 docs: Update README.md 2025-07-15 16:32:23 +08:00
liqiang-fit2cloud 3b05746a14 docs: Update README.md 2025-07-15 16:29:39 +08:00
shaohuzhang1 d2560c664c
fix: Simple application full-text search cannot retrieve data (#3606) 2025-07-15 16:26:53 +08:00
wangdan-fit2cloud 5d99224f04 perf: paragraph style 2025-07-15 16:14:02 +08:00
shaohuzhang1 a67b39c87e
fix: reranker prefix (#3605) 2025-07-15 16:00:22 +08:00
zhangzhanwei 8e5ff3b1f4 fix: Application import 2025-07-15 15:37:54 +08:00
wangdan-fit2cloud 8a6bac396b fix: exercution detail 2025-07-15 15:22:19 +08:00
CaptainB b352e495a1 fix: update knowledge_id reference in problem mapping queries
--bug=1058790 --user=刘瑞斌 【知识库】导出知识库没导出关联问题 https://www.tapd.cn/62980211/s/1731826
2025-07-15 15:20:39 +08:00
teukkk d1d9f2404d fix: chat drop prevent 2025-07-15 15:05:32 +08:00
zhangzhanwei 0434a18905 feat: Clear chat log 2025-07-15 15:03:57 +08:00
CaptainB ce213d78af feat: add scoped styles for audio element in MdPreview component
--bug=1058490 --user=刘瑞斌 【应用管理】查看应用对话日志-显示回复语音,部分按键被遮盖 https://www.tapd.cn/62980211/s/1731804
2025-07-15 15:01:45 +08:00
shaohuzhang1 28b97cd2dd
fix: Access can only be granted after OpenAPI authentication (#3601) 2025-07-15 14:51:50 +08:00
zhangzhanwei ad44d4d6b2 Historical conversation batch delete 2025-07-15 14:49:26 +08:00
wangdan-fit2cloud 6ca6c5b6d3 fix: application add knowledge 2025-07-15 14:43:34 +08:00
CaptainB 390faf2bf5 fix: prevent overlapping speech synthesis playback
--bug=1058747 --user=刘瑞斌 【应用】应用开启语音播放自动播放,使用移动端提问后没有自动播放 https://www.tapd.cn/62980211/s/1731646
2025-07-15 14:28:23 +08:00
teukkk 1b94f16e2a style: ellipsis 2025-07-15 14:22:23 +08:00
CaptainB dc960d1628 fix: correct select_one parameter default value in edit method of KnowledgeSerializer
--bug=1058784 --user=刘瑞斌 【知识库】编辑知识库,保存失败 https://www.tapd.cn/62980211/s/1731590
2025-07-15 14:01:39 +08:00
shaohuzhang1 c2f52d0759
fix: Access can only be granted after OpenAPI authentication (#3599) 2025-07-15 13:49:33 +08:00
CaptainB 2520461544 fix: trim whitespace from document name in export functions
--bug=1058737 --user=刘瑞斌 【共享资源】web知识库文档中导出excel文档,导出默认文档名称优化 https://www.tapd.cn/62980211/s/1731548
2025-07-15 13:46:38 +08:00
CaptainB 26df300105 chore: remove diskcache2 dependency from pyproject.toml 2025-07-15 12:56:02 +08:00
CaptainB 05409b8f90 fix: update error message for non-existent files in document handling 2025-07-15 12:20:32 +08:00
shaohuzhang1 55985a2460
fix: Simple application dialogue not handled as published (#3598) 2025-07-15 12:13:22 +08:00
shaohuzhang1 82cbe08cc3
fix: Simple application dialogue not handled as published (#3597) 2025-07-15 12:05:56 +08:00
CaptainB 21c8f6ffbf fix: add self check to resume speech synthesis in ChatOperationButton
--bug=1058777 --user=刘瑞斌 【应用】开启语音自动播放,浏览器播放,暂停第一次对话的播放后,进行第二次对话,自动播放会先继续播放上一次对话 https://www.tapd.cn/62980211/s/1731474
2025-07-15 12:01:49 +08:00
CaptainB 95263d147b fix: remove unnecessary condition in play/pause logic for audio management
--bug=1058773 --user=刘瑞斌 【应用】语音播放开启自动播放,问答时没有流式播放 https://www.tapd.cn/62980211/s/1731458
2025-07-15 11:46:58 +08:00
wxg0103 243745dc07 feat: update email templates and translations for improved clarity and consistency 2025-07-15 11:42:36 +08:00
wxg0103 9cce06b9f1 fix: update logout behavior to redirect to login page and clean up formatting in ChatHistoryDrawer.vue and ResetPasswordDrawer.vue
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-15 11:32:36 +08:00
CaptainB ee8412f34d feat: update getSpeechToTextAPI to include id parameter
--bug=1058746 --user=刘瑞斌 【应用】应用语音输入开启自动发送,对话页面发送语音报错 https://www.tapd.cn/62980211/s/1731337
2025-07-15 11:13:08 +08:00
wxg0103 5a8c7a0e00 fix: improve formatting and readability in XPackLimitDrawer.vue 2025-07-15 11:04:44 +08:00
CaptainB 11b7672bf4 fix: correct method from del to put for batch_delete in document.ts
--bug=1058753 --user=刘瑞斌 【共享资源】知识库-批量删除文档失败 https://www.tapd.cn/62980211/s/1731311
2025-07-15 11:03:48 +08:00
CaptainB 7ee7a51200 feat: enhance edit method to support select_one parameter in KnowledgeSerializer
--bug=1058726 --user=刘瑞斌 【共享知识库】编辑非本人创建的共享知识库报错 https://www.tapd.cn/62980211/s/1731246
2025-07-15 10:56:59 +08:00
wxg0103 88fd875a23 fix: clean up formatting and improve readability in index.vue 2025-07-15 10:25:30 +08:00
zhangzhanwei 350095a822 fix: Hit test visibility 2025-07-15 10:04:51 +08:00
wxg0103 86675e9ec3 fix: replace LogoIcon with el-avatar for improved icon rendering in index.vue and NodeContent.vue 2025-07-15 09:49:38 +08:00
wxg0103 bd1f75a4ae refactor: streamline SQL queries in list_application.sql, list_application_user.sql, and list_application_user_ee.sql 2025-07-15 09:49:21 +08:00
wxg0103 12dbed5f7c fix: replace icon image with AppIcon component in index.vue 2025-07-15 09:25:33 +08:00
wxg0103 cef7075382 fix: update image size format and expand available options in tti.py 2025-07-15 09:23:50 +08:00
zhangzhanwei a7fd1ac650 fix: Locales
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-14 20:20:22 +08:00
shaohuzhang1 2490e85bc5
build: ui marked (#3593) 2025-07-14 20:11:02 +08:00
CaptainB 67859e9873 feat: add ChatUser, UserGroup, and authorization models to initial migration 2025-07-14 19:54:18 +08:00
zhangzhanwei a7afdb769b fix: Chat user model 2025-07-14 19:37:17 +08:00
shaohuzhang1 3cc272c5e0
fix: chat user (#3591) 2025-07-14 19:27:31 +08:00
wangdan-fit2cloud bf1942e0f9 fix: slogan
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-14 18:45:14 +08:00
shaohuzhang1 ca073fd0d6
fix: The conversation user is not authorized to use (#3590) 2025-07-14 18:44:37 +08:00
zhangzhanwei d8254f9e45 refactor: Chat user model 2025-07-14 18:43:57 +08:00
shaohuzhang1 340ca6c436
fix: The conversation user is not authorized to use (#3588) 2025-07-14 18:24:46 +08:00
wangdan-fit2cloud a22a16eea0 fix: slogan 2025-07-14 18:03:08 +08:00
wxg0103 b3698b30ca feat: add authentication fields to ApplicationAccessToken and update related serializers 2025-07-14 18:02:32 +08:00
CaptainB 939da5b94b feat: update getDownloadSourceFile to include document_name parameter for file export
--bug=1058717 --user=刘瑞斌 【共享资源】知识库-下载原文档-报错 https://www.tapd.cn/62980211/s/1730722
2025-07-14 17:59:15 +08:00
CaptainB 9fc20ca53f fix: update knowledge-id references in ParagraphDialog.vue for consistency
--bug=1058706 --user=刘瑞斌 【知识库】分段问题 6 个 https://www.tapd.cn/62980211/s/1730660
2025-07-14 17:46:41 +08:00
zhangzhanwei 0356dfed1f feat: Operation log 2025-07-14 17:41:18 +08:00
wangdan-fit2cloud 930f9b083a fix: change markdown version 2025-07-14 17:34:23 +08:00
CaptainB ce7afda73c fix: correct index calculation in deleteHandle function in ParagraphList.vue
--bug=1058707 --user=刘瑞斌 【知识库】上传附件里的文档,在分段预览页面删除分段没有反应 https://www.tapd.cn/62980211/s/1730574
2025-07-14 17:22:23 +08:00
shaohuzhang1 fdc9f9eb0b
fix: The conversation user is not authorized to use (#3583) 2025-07-14 17:11:54 +08:00
CaptainB 3f1c3bc68f fix: wrap model_change logic in nextTick for improved reactivity
--bug=1058686 --user=刘瑞斌 【应用编排】在图片生成节点切换模型,会带上一个模型的参数 https://www.tapd.cn/62980211/s/1730547
2025-07-14 17:04:17 +08:00
zhangzhanwei df9b7f208b feat: Simple application execution details 2025-07-14 16:57:09 +08:00
teukkk 097cabbd04 style: collapse button for chatHistoryDrawer 2025-07-14 16:36:20 +08:00
wxg0103 1ebfc5882d refactor: reorganize permission constants for document operations 2025-07-14 16:34:26 +08:00
wxg0103 58c617691b fix: increase width of module column in permission configuration table 2025-07-14 16:34:04 +08:00
wxg0103 ea199e23f1 refactor: reorganize permission constants for MODEL and TOOL to remove duplicates 2025-07-14 16:29:38 +08:00
wxg0103 b53034727f fix: update permission operate type from READ to DOWNLOAD for document access 2025-07-14 16:17:29 +08:00
shaohuzhang1 074375478d
fix: The conversation user is not authorized to use (#3581) 2025-07-14 16:13:53 +08:00
wangdan-fit2cloud 958924e488 fix: execution details 2025-07-14 16:11:52 +08:00
CaptainB 48959a1e77 feat: add optional folder_id to tool import functionality 2025-07-14 16:06:26 +08:00
teukkk 117f882521 feat: paragraph movePosition 2025-07-14 15:54:15 +08:00
CaptainB 77af823879 refactor: replace FileLock with utility functions for locking mechanism 2025-07-14 15:49:09 +08:00
wxg0103 921b9e0d7e style: format code for improved readability and consistency 2025-07-14 15:33:08 +08:00
wxg0103 65d2045751 refactor: enhance role_setting validation in user role assignment logic 2025-07-14 14:39:21 +08:00
wangdan-fit2cloud f554205f87 fix: expired tip 2025-07-14 14:34:54 +08:00
shaohuzhang1 b299ef0c53
fix: Page optimization when the application is unavailable (#3580) 2025-07-14 14:09:31 +08:00
CaptainB ea56fd6212 feat: add db_index to various fields for improved query performance 2025-07-14 11:54:19 +08:00
shaohuzhang1 07b19fe90e
fix: Chat ui prefix (#3579) 2025-07-14 11:07:53 +08:00
wxg0103 92fba08185 fix: handle potential None values for user in model serialization 2025-07-14 11:07:10 +08:00
wxg0103 bb4ad680fc feat: enhance password regex for improved security and clarity 2025-07-14 10:59:32 +08:00
zhangzhanwei 86da8918f5 fix: Locales 2025-07-14 10:53:49 +08:00
CaptainB 1ac7fc4669 refactor: Update user foreign key constraints and add new fields across multiple models
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-14 10:52:08 +08:00
wxg0103 f0357e5944 feat: enhance user role management by passing user_id to relevant methods 2025-07-14 10:49:47 +08:00
wangdan-fit2cloud e618b37309 fix: tip 2025-07-14 10:10:20 +08:00
wxg0103 368c175f62 feat: implement fromNowDate function for time difference calculation
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-13 15:30:11 +08:00
zhangzhanwei 1a792dd2e7 feat: Locales
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-12 21:03:30 +08:00
shaohuzhang1 34842e4ae4
feat: application chat api (#3574) 2025-07-12 17:54:37 +08:00
zhangzhanwei 4ffd80f184 fix: Resource chat user of common user 2025-07-12 17:45:10 +08:00
zhangzhanwei 07ee09c50f fix: Imported tool create
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-12 16:30:51 +08:00
wangdan-fit2cloud be4f0ffb6b perf: pdf 2025-07-12 15:01:52 +08:00
wangdan-fit2cloud 34e84602ff fix: embed height 2025-07-12 14:33:32 +08:00
wangdan-fit2cloud a3ae33bf7c fix: change workspace 2025-07-12 13:22:23 +08:00
wxg0103 3d36c3fa2d feat: add DocHeadersMiddleware to middleware list for document access handling 2025-07-12 11:44:05 +08:00
wxg0103 224fe26f28 feat: add DocHeadersMiddleware to handle document access and redirect unauthorized users 2025-07-12 11:41:50 +08:00
wxg0103 178064f42c refactor: improve workspace ID handling by adding check for current workspace permissions 2025-07-12 11:27:42 +08:00
CaptainB 58db4ed901 fix: update audio playback status to PLAY_INT when resuming speech synthesis
--bug=1058601 --user=刘瑞斌 【应用】浏览器播放-点击暂停&继续播放-连续两次相同操作-第二次未继续播放,而是重新播放了 https://www.tapd.cn/62980211/s/1729699
2025-07-12 11:07:19 +08:00
CaptainB 41ad2eeef2 fix: ensure ttsModelChange executes after DOM updates using nextTick
--bug=1058556 --user=刘瑞斌 【应用】基本信息节点开启语音播放,调试模式下切换模型,点击保存提问后使用语音播放失败 https://www.tapd.cn/62980211/s/1729683
2025-07-12 10:48:01 +08:00
wxg0103 2d734d0aaa refactor: enhance chat record processing and update translations for user-related fields 2025-07-12 10:30:47 +08:00
wxg0103 1374ed4171 refactor: update chat record processing to include chat count updates 2025-07-12 09:50:57 +08:00
wxg0103 a0e2403e77 refactor: clean up formatting and whitespace in chat-log.ts and EditMarkDialog.vue 2025-07-12 09:50:20 +08:00
shaohuzhang1 4c9d024b67
fix: After entering the password for the public access link, the parameters carried by the URL address are missing (#3570)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-11 22:36:43 +08:00
shaohuzhang1 827c06c03f
fix: Clicking on the web Q&A of the knowledge source did not redirect to the corresponding link (#3569) 2025-07-11 22:25:05 +08:00
shaohuzhang1 1a2a02b808
fix: Importing an application that references tools from the tool store will create tools from the tool store in the new workspace (#3568) 2025-07-11 22:13:54 +08:00
shaohuzhang1 d8c35fffd7
fix: The limit on the number of conversations in the application is invalid (#3567) 2025-07-11 22:02:42 +08:00
shaohuzhang1 592ae54e82
fix: Application import (#3566) 2025-07-11 21:45:08 +08:00
wangdan-fit2cloud 109e8507f1 fix: build error 2025-07-11 21:11:20 +08:00
wxg0103 0f4ebc5981 refactor: update roleTypeMap type definition for improved clarity 2025-07-11 20:45:23 +08:00
wxg0103 2bda87b5a7 refactor: clean up formatting and whitespace in index.vue 2025-07-11 20:01:35 +08:00
wxg0103 d781797555 refactor: remove encryption from sensitive fields in auth_config_serializer and related modules 2025-07-11 19:47:32 +08:00
wxg0103 28e89ca6ec refactor: replace encryption function with new encrypt method for sensitive data handling 2025-07-11 19:43:53 +08:00
wangdan-fit2cloud fb92a07d62 fix: style 2025-07-11 19:32:57 +08:00
wangdan-fit2cloud aa43967c08 perf: style 2025-07-11 19:23:11 +08:00
zhangzhanwei ff48a75830 fix: Page jump 403 without permission 2025-07-11 19:05:37 +08:00
wangdan-fit2cloud cd88d9d099 fix: router 2025-07-11 18:57:53 +08:00
wxg0103 2cbd8af6ad refactor: clean up formatting and whitespace in ForgotPassword.vue and routes.ts 2025-07-11 18:49:00 +08:00
wxg0103 d7a3b7fd3f feat: enhance password reset functionality with email verification and validation 2025-07-11 18:47:27 +08:00
wangdan-fit2cloud f5166523de fix: type 2025-07-11 18:37:07 +08:00
wangdan-fit2cloud 6d97faed60 fix: workflow tool 2025-07-11 18:37:07 +08:00
CaptainB bf1062ff04 fix: improve error handling in valid_reference_value function 2025-07-11 18:00:47 +08:00
CaptainB 7ec7984b9f fix: handle JSON parsing for string values in reference fields 2025-07-11 17:44:20 +08:00
shaohuzhang1 570bcfbaf2
fix: Crossing does not take effect (#3561) 2025-07-11 17:37:54 +08:00
CaptainB 31f87119b6 fix: improve document deletion process and ensure related files are removed
--bug=1058582 --user=刘瑞斌 【知识库】知识库的文档删除报错了 https://www.tapd.cn/62980211/s/1729344
2025-07-11 17:30:26 +08:00
wxg0103 02afb6a0bc refactor: update API KEY translations and improve formatting in permission constants 2025-07-11 17:24:38 +08:00
CaptainB 6369b4fb45 fix: improve text handling and playback conditions in ChatOperationButton
--bug=1058408 --user=刘瑞斌 【应用管理】移动端自动播放没有声音,浏览器可正常播放 https://www.tapd.cn/62980211/s/1729308
2025-07-11 17:18:12 +08:00
wangdan-fit2cloud b89ee3d174 fix: icon 2025-07-11 17:12:04 +08:00
wangdan-fit2cloud 91eb873312 fix: change workspace 2025-07-11 17:12:04 +08:00
wangdan-fit2cloud 63c91138ed fix: style 2025-07-11 17:12:04 +08:00
wangdan-fit2cloud 10b8bd67a2 fix: source 2025-07-11 17:12:04 +08:00
wxg0103 4a36f78468 refactor: update password requirements in Chinese translations to include uppercase letters 2025-07-11 16:54:32 +08:00
wxg0103 723aaf30c3 refactor: clean up whitespace and formatting in index.vue 2025-07-11 16:52:25 +08:00
wxg0103 caa03dc489 refactor: add workspace management permission handling in user and permission API 2025-07-11 16:26:57 +08:00
teukkk 07a049dddc style: remove the splitter
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-11 15:46:55 +08:00
wangdan-fit2cloud a178986d9b fix: theme 2025-07-11 15:20:57 +08:00
wxg0103 2783d7dcde refactor: add 'show_exec' field to application access token response 2025-07-11 15:13:11 +08:00
CaptainB cdd146dc58 feat: add negative prompt handling in image generation
--bug=1058523 --user=刘瑞斌 【应用】图片生成节点的执行详情中没有显示负向提示词 https://www.tapd.cn/62980211/s/1729010
2025-07-11 15:11:18 +08:00
wxg0103 414769f42d refactor: update default password configuration key and improve model field formatting 2025-07-11 15:05:51 +08:00
shaohuzhang1 c4df5cea5f
fix: The uploaded file image in the conversation is not displayed (#3559) 2025-07-11 14:45:23 +08:00
wxg0103 99d94abe85 refactor: improve image URL handling and clean up unused code in base_image_generate_node.py and tti.py 2025-07-11 14:44:04 +08:00
wxg0103 ebb475c19a refactor: update default password configuration key and improve model field formatting 2025-07-11 14:12:26 +08:00
zhangzhanwei 1e20526819 fix: Workspace manager resource authorization permission 2025-07-11 11:33:15 +08:00
CaptainB c43e1fea50 refactor: improve filename extraction logic in content disposition handling 2025-07-11 11:19:35 +08:00
shaohuzhang1 210e09681f
feat: Apikey call supports cross domain and application whitelist (#3556) 2025-07-11 11:15:21 +08:00
teukkk c3ecddcd1b refactor: dropdownMenu 2025-07-11 10:50:34 +08:00
dependabot[bot] 2b74b8415f build(deps): bump the python-dependencies group with 9 updates
Updates the requirements on [langchain-google-genai](https://github.com/langchain-ai/langchain-google), langchain-mcp-adapters, [langchain-ollama](https://github.com/langchain-ai/langchain), [langgraph](https://github.com/langchain-ai/langgraph), zhipuai, [volcengine-python-sdk](https://github.com/volcengine/volcengine-python-sdk), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python) and [dashscope](https://dashscope.aliyun.com/) to permit the latest version.

Updates `langchain-google-genai` to 2.1.7
- [Release notes](https://github.com/langchain-ai/langchain-google/releases)
- [Commits](https://github.com/langchain-ai/langchain-google/compare/libs/genai/v2.1.6...libs/genai/v2.1.7)

Updates `langchain-mcp-adapters` to 0.1.9

Updates `langchain-ollama` to 0.3.4
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-ollama==0.3.3...langchain-ollama==0.3.4)

Updates `langgraph` to 0.5.2
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.5.1...0.5.2)

Updates `zhipuai` to 2.1.5.20250708

Updates `volcengine-python-sdk` to 4.0.5
- [Release notes](https://github.com/volcengine/volcengine-python-sdk/releases)
- [Commits](https://github.com/volcengine/volcengine-python-sdk/compare/4.0.4...4.0.5)

Updates `boto3` to 1.39.4
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.39.3...1.39.4)

Updates `tencentcloud-sdk-python` to 3.0.1420
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1415...3.0.1420)

Updates `dashscope` to 1.23.8

---
updated-dependencies:
- dependency-name: langchain-google-genai
  dependency-version: 2.1.7
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.1.9
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-ollama
  dependency-version: 0.3.4
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.5.2
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: zhipuai
  dependency-version: 2.1.5.20250708
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: volcengine-python-sdk
  dependency-version: 4.0.5
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.39.4
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1420
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: dashscope
  dependency-version: 1.23.8
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-11 10:40:13 +08:00
CaptainB 8c705b03b3 chore: update Dockerfile to use build commands for ui and chat 2025-07-11 10:11:24 +08:00
wangdan-fit2cloud 4437361eed feat: style
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-10 22:37:48 +08:00
shaohuzhang1 f83336df8c
fix: Set the path of the entrance icon file (#3554) 2025-07-10 22:32:01 +08:00
CaptainB a35ddad7f3 fix: handle JSON response error in exportFile function 2025-07-10 21:06:37 +08:00
shaohuzhang1 bc350c2eb2
fix: Tool permission settings (#3553) 2025-07-10 20:50:22 +08:00
zhangzhanwei d2ce1ba276 fix: Role tag visibility of community 2025-07-10 19:53:04 +08:00
shaohuzhang1 c370e99304
feat: Support openai dialogue (#3551) 2025-07-10 19:16:47 +08:00
CaptainB 691d7ceaa5 fix: correct tag rendering and permission check logic in index.vue
--bug=1057921 --user=刘瑞斌 【资源授权】专业版和社区版、企业版授权工具勾选了文件夹,保存后,文件夹自动取消勾选,只勾选了工具 https://www.tapd.cn/62980211/s/1728387
2025-07-10 18:56:35 +08:00
zhangzhanwei a2726a9367 feat: Workspace shared knowledge permission 2025-07-10 18:28:34 +08:00
wangdan-fit2cloud 3324d4ab35 feat: 404 page 2025-07-10 17:59:33 +08:00
wxg0103 d94972bc9c refactor: enhance role management by adding user-specific role filtering and permissions checks 2025-07-10 17:49:07 +08:00
CaptainB 17e1cbcf48 refactor: optimize batch_sync method to include knowledge_id and workspace_id
--bug=1057859 --user=刘瑞斌 【知识库】正在向量化/生成问题中的文档,点击同步文档后没有取消当前文档的向量化/生成问题任务,重新进行同步+向量化/生成问题 https://www.tapd.cn/62980211/s/1728222
2025-07-10 17:34:55 +08:00
liqiang-fit2cloud 803b49e891 build: change image tag. 2025-07-10 17:34:33 +08:00
wangdan-fit2cloud f926de4f91 fix: user language 2025-07-10 17:10:43 +08:00
CaptainB 12feaac958 feat: add check for inactive tool libraries
--bug=1058425 --user=刘瑞斌 【工具】应用中引用的工具被禁用后,对话时依然可以调用工具 https://www.tapd.cn/62980211/s/1728140
2025-07-10 17:01:17 +08:00
CaptainB 0bcf7e311c feat: update paragraph processing to include status updates for embedding tasks
--bug=1058487 --user=刘瑞斌 【知识库】在文档中添加分段,没有执行向量化操作 https://www.tapd.cn/62980211/s/1728041
2025-07-10 16:53:14 +08:00
shaohuzhang1 4f4565f85b
fix: Shared workspace permission control error (#3548) 2025-07-10 16:45:13 +08:00
CaptainB 4d87e01682 chore: adjust paragraph positions for document consistency 2025-07-10 16:34:41 +08:00
wxg0103 0b48880f9e refactor: clean up formatting and improve code readability in index.vue 2025-07-10 16:15:15 +08:00
CaptainB e6600a4b6b chore: update dependencies in pyproject.toml 2025-07-10 15:52:18 +08:00
wxg0103 64f61a3beb refactor: update cache handling in user.py to improve timeout management 2025-07-10 15:36:27 +08:00
CaptainB 8f5c68dcbc chore: add volcengine-python-sdk version 4.0.4 with ark extras 2025-07-10 15:30:49 +08:00
CaptainB 4c9756839a chore: normalize with_filter parameter to boolean in split handle files
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
--bug=1057879 --user=刘瑞斌 【知识库】高级分段中自动清洗功能未生效 https://www.tapd.cn/62980211/s/1727744
2025-07-10 15:06:19 +08:00
wxg0103 fe78de5d3c feat: add email templates for verification codes in English, Chinese, and Traditional Chinese 2025-07-10 15:02:10 +08:00
CaptainB 28a909e226 fix: optimize data loading in ParagraphList component 2025-07-10 14:55:07 +08:00
wxg0103 79537cade9 refactor: update user field in application and knowledge models to allow null values and set null on delete 2025-07-10 14:49:44 +08:00
CaptainB 7329c72802 feat: optimize paragraph list handling with pagination and local state management
--bug=1057685 --user=刘瑞斌 【知识库】上传一个txt文档,智能分段,页面会崩溃 https://www.tapd.cn/62980211/s/1727688
2025-07-10 14:47:21 +08:00
wxg0103 d26872aefb refactor: clean up access token retrieval logic and remove unused authentication watcher 2025-07-10 14:32:20 +08:00
zhangzhanwei e697ddafbc feat: Locales 2025-07-10 14:20:54 +08:00
CaptainB 9534247713 fix: extract content from image meta before uploading file 2025-07-10 13:57:28 +08:00
zhangzhanwei c78c2b39fe fix: Model params permission 2025-07-10 13:49:31 +08:00
zhangzhanwei f1e8ba6e2d fix: Model permission while setting knowledge or application 2025-07-10 13:44:06 +08:00
CaptainB ed5cc3a0fa fix: update file handling in base_document_extract_node.py to use image metadata
--bug=1058385 --user=刘瑞斌 【应用】文档内容提取节点提取文档失败 https://www.tapd.cn/62980211/s/1727581
2025-07-10 13:04:48 +08:00
shaohuzhang1 9d2fd05604
fix: Token auth (#3543) 2025-07-10 12:07:33 +08:00
CaptainB 4f31977d7d fix: update label for tool name in ToolResourceIndex.vue
--bug=1058468 --user=刘瑞斌 【资源管理】-工具种的搜索字段名显示成模型名称啦 https://www.tapd.cn/62980211/s/1727518
2025-07-10 11:28:22 +08:00
CaptainB 6773be4fe3 fix: improve speech synthesis handling in ChatOperationButton
--bug=1058147 --user=刘瑞斌 【应用】简易应用-语音播放-浏览器播放-暂停播放后,再点击播放,无响应 https://www.tapd.cn/62980211/s/1727446
2025-07-10 11:15:01 +08:00
CaptainB b2b144af7c fix: correct API method for speech-to-text functionality
--bug=1058103 --user=刘瑞斌 【应用】简易应用-语音识别模型-调试预览页-语音识别失败且停止按钮显示异常 https://www.tapd.cn/62980211/s/1727412
2025-07-10 10:57:06 +08:00
wxg0103 399e1dc6d4 fix: correct syntax error in checkbox label rendering in AuthorizedWorkspaceDialog.vue 2025-07-10 10:52:20 +08:00
liqiang-fit2cloud 6e426426c3 build: change action. 2025-07-10 10:15:43 +08:00
liqiang-fit2cloud b24f4c9e44 build: change run-name. 2025-07-10 09:56:38 +08:00
shaohuzhang1 1611bc7f75
fix: The original document download file name is incorrect (#3542)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-09 22:32:40 +08:00
shaohuzhang1 7c47f4d0b3
fix: Embed icon cannot be displayed (#3541) 2025-07-09 22:12:58 +08:00
shaohuzhang1 f8de009344
fix: Advanced arranged form collection node that does not display JSON type parameters (#3540) 2025-07-09 22:02:33 +08:00
shaohuzhang1 3b33078555
fix: Workflow knowledge base retrieval node recall error (#3539) 2025-07-09 21:46:44 +08:00
shaohuzhang1 3450ef78a4
fix: Application import and export (#3538) 2025-07-09 21:34:41 +08:00
wangdan-fit2cloud 857f988992 fix: style 2025-07-09 20:56:36 +08:00
wxg0103 0316afa299 refactor: enhance HTML tag removal in text processing to exclude audio, video, and image tags 2025-07-09 20:34:47 +08:00
zhangzhanwei d0722dc048 feat: Remove the community version role button display 2025-07-09 20:30:12 +08:00
zhangzhanwei bddc3cfd53 feat: Locales 2025-07-09 20:03:06 +08:00
wxg0103 265840017c refactor: update icon URL handling and clean up permission checks in application workflow 2025-07-09 19:44:35 +08:00
wxg0103 580adc5a88 refactor: enhance document and knowledge deletion logic to remove associated files 2025-07-09 19:09:34 +08:00
zhangzhanwei 19b7ae24c9 fix: Button permission while creating model 2025-07-09 18:50:58 +08:00
wxg0103 1703923f58 refactor: update default password configuration key to uppercase in user.py 2025-07-09 18:38:57 +08:00
liqiang-fit2cloud a43bde9a01 fix: remove PATH env. 2025-07-09 18:11:36 +08:00
wxg0103 16088975fa refactor: enhance text-to-speech processing by splitting content into chunks and merging audio segments 2025-07-09 18:08:41 +08:00
teukkk 06e759a320 fix: chatUser authorization 2025-07-09 18:02:37 +08:00
CaptainB 3eb5a49e63 chore: update query filters to use case-insensitive containment for name and description
--bug=1058435 --user=刘瑞斌 【工具】工具名称搜索不支持忽略大小写 https://www.tapd.cn/62980211/s/1726980
2025-07-09 17:50:00 +08:00
zhangzhanwei 5d8e64cbb2 fix: Chat user permission of common user 2025-07-09 17:42:56 +08:00
wangdan-fit2cloud 078bb41fc5 feat: style 2025-07-09 16:27:44 +08:00
zhangzhanwei 14eea7df42 fix: common user use of shared model params 2025-07-09 16:22:45 +08:00
shaohuzhang1 c4293c34d1
fix: ai chat node mcp (#3531) 2025-07-09 16:14:44 +08:00
zhangzhanwei 2ba043e801 fix: different setting pages of simple_work_flow application 2025-07-09 16:13:28 +08:00
wxg0103 eceb8f8375 refactor: simplify optional parameters and update image generation base URL 2025-07-09 15:45:49 +08:00
teukkk a5cd50fdf2 fix: jump to the applicationChatUser 2025-07-09 15:28:14 +08:00
CaptainB e0118f1ce9 chore: remove redundant pickle import in tool_code.py 2025-07-09 15:01:19 +08:00
shaohuzhang1 693ed6004a
fix: MCP node execution failed (#3528) 2025-07-09 14:59:55 +08:00
teukkk b9aa36ed1e fix: read permission 2025-07-09 14:37:07 +08:00
CaptainB 8e8726cd9d chore: remove diskcache2 from pip install in Dockerfile
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-09 14:23:46 +08:00
wxg0103 6c27fe68fe refactor: simplify cache timeout handling in authentication modules 2025-07-09 14:18:03 +08:00
CaptainB dc04d46518 refactor: replace diskcache with pickle for result handling and organize sandbox directories 2025-07-09 14:14:23 +08:00
CaptainB 4da75ac3e0 refactor: replace FunctionExecutor with ToolExecutor in base_tool_lib_node and base_tool_node 2025-07-09 12:48:19 +08:00
shaohuzhang1 7ff65aef76
fix: Application import and export (#3525) 2025-07-09 12:35:49 +08:00
CaptainB 5258bd79d5 refactor: implement debounced async linting in CodemirrorEditor
--bug=1057664 --user=刘瑞斌 【工具】创建工具,工具内容输入特定的内容页面会崩溃 https://www.tapd.cn/62980211/s/1726594
2025-07-09 12:08:55 +08:00
CaptainB 8625dd543a refactor: implement debounced async linting in CodemirrorEditor
--bug=1057664 --user=刘瑞斌 【工具】创建工具,工具内容输入特定的内容页面会崩溃 https://www.tapd.cn/62980211/s/1726594
2025-07-09 11:49:44 +08:00
liqiang-fit2cloud 217e3ce58d fix: wrong group. 2025-07-09 11:43:38 +08:00
CaptainB f0903ac309 refactor: enhance ToolTreeSerializer query parameters 2025-07-09 11:16:59 +08:00
shaohuzhang1 6411f32a3d
fix: The type of resource authorization is incorrect (#3524) 2025-07-09 11:03:19 +08:00
CaptainB 4eda4a0d1b feat: add scope parameter to ToolTreeSerializer and update get_tools method 2025-07-09 10:59:12 +08:00
teukkk ee967606cf fix: deleteButtonDisabled 2025-07-09 10:55:24 +08:00
CaptainB 6a87ccd908 feat: add convert_uuid_to_str function for UUID serialization in document metadata
--bug=1058357 --user=刘瑞斌 【知识库】通用知识库-上传QA问答对csv和excel文档失败 https://www.tapd.cn/62980211/s/1726470
2025-07-09 10:47:56 +08:00
shaohuzhang1 ec2ddedf93
fix: The sub application cannot use the current node (#3523) 2025-07-09 10:46:57 +08:00
shaohuzhang1 cff1f6c80b
fix: The sub application cannot have a conversation (#3522) 2025-07-09 10:36:59 +08:00
zhangzhanwei 3b4702e533 fix: knowledge document paragraph read permission 2025-07-09 10:25:12 +08:00
liqiang-fit2cloud 87045603ff build: update Dockerfiles. 2025-07-09 09:59:59 +08:00
wangdan-fit2cloud 2196d82060 perf: perf
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-09 03:08:06 +08:00
wangdan-fit2cloud 543210bc64 perf: perf 2025-07-09 02:58:16 +08:00
wangdan-fit2cloud bc85b91196 style: chat style 2025-07-09 01:32:45 +08:00
CaptainB 41131d57e1 fix: update button permission check in KnowledgeSetting.vue 2025-07-08 22:02:44 +08:00
shaohuzhang1 1482d8674b
feat: Folder button permission (#3520)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Co-authored-by: zhangzhanwei <zhanwei.zhang@fit2cloud.com>
2025-07-08 21:03:38 +08:00
shaohuzhang1 49d40bb480
fix: Application access restrictions (#3519) 2025-07-08 21:01:32 +08:00
wangdan-fit2cloud edca190a06 feat: chat 2025-07-08 20:51:41 +08:00
shaohuzhang1 6866ff03b3
fix: Tools cannot be called in the workflow (#3516) 2025-07-08 20:14:33 +08:00
wxg0103 dc51cc1f2a refactor: update Dockerfile version and improve code formatting in PermissionConfiguration.vue 2025-07-08 20:00:30 +08:00
liqiang-fit2cloud 9fb5ef4f80 build: add new tokenizer. 2025-07-08 19:37:46 +08:00
liqiang-fit2cloud a98cde9912 build: add new tokenizer. 2025-07-08 19:22:16 +08:00
wxg0103 573ec2b706 refactor: remove unused ModelInfo entry for dall-e-2 in openai_model_provider.py 2025-07-08 19:05:53 +08:00
wxg0103 dc4cdec8a1 feat: add install_model_token script for downloading and installing BERT tokenizer 2025-07-08 18:57:55 +08:00
shaohuzhang1 c23e18d461
fix: Cannot add in advanced orchestration application workflow (#3515) 2025-07-08 18:39:02 +08:00
shaohuzhang1 f370840e8b
fix: The form node cannot be used (#3514) 2025-07-08 17:56:11 +08:00
shaohuzhang1 c7d1ba6a73
fix: The conversation file cannot be displayed when uploading other files (#3513) 2025-07-08 17:44:54 +08:00
shaohuzhang1 31147c0f6e
fix: AI conversation file upload image cannot be loaded (#3512) 2025-07-08 17:30:32 +08:00
zhangzhanwei 0bd648578e fix: Feishu knowledge document button visibility 2025-07-08 17:13:24 +08:00
wangdan-fit2cloud 92df83771e feat: share api 2025-07-08 17:11:49 +08:00
wxg0103 521fff2818 refactor: add is_cache_model method to various model classes to standardize cache behavior 2025-07-08 17:11:31 +08:00
shaohuzhang1 fce2f50a01
fix: Apply MCP node acquisition tool (#3510) 2025-07-08 17:02:02 +08:00
CaptainB f04de2328a feat: add username field to model serializer and rename nick_name field 2025-07-08 16:57:39 +08:00
CaptainB 334883c2b2 feat: add username field to model serializer and rename nick_name field 2025-07-08 16:47:05 +08:00
wxg0103 99a6de0bcf refactor: enhance model list retrieval parameters to exclude 'share' provider 2025-07-08 16:44:54 +08:00
teukkk 81d9cc3e3b fix: style during password verification 2025-07-08 16:40:59 +08:00
wxg0103 57b12a20bc refactor: simplify parameter handling in model list retrieval 2025-07-08 16:40:47 +08:00
shaohuzhang1 f8249cd601
fix: The number of conversations has not been updated (#3509) 2025-07-08 16:35:54 +08:00
wangdan-fit2cloud 246123c506 fix: language 2025-07-08 16:18:29 +08:00
wangdan-fit2cloud c2767addd2 fix: icon style 2025-07-08 16:18:29 +08:00
wxg0103 b396d95c6f refactor: replace default cache with user-specific cache in ChatManage class 2025-07-08 16:17:34 +08:00
wxg0103 b8cf3fb561 refactor: simplify parameter handling in model list retrieval 2025-07-08 16:16:38 +08:00
CaptainB 4be308078b refactor: remove redundant validation logic from tool serializer
--bug=1058282 --user=刘瑞斌 【工具】在工具模块,添加工具商店中的mysql查询工具,报错:Tool id does not exist https://www.tapd.cn/62980211/s/1725592
2025-07-08 16:15:56 +08:00
zhangzhanwei b6cf80d6ef fix: Workspace shared knowledge button visibility 2025-07-08 15:56:52 +08:00
shaohuzhang1 f627daf231
fix: Password authentication (#3507) 2025-07-08 15:49:55 +08:00
liqiang-fit2cloud c99993795d build: remove clear disk step. 2025-07-08 15:27:13 +08:00
liqiang-fit2cloud 8274dcb985 build: remove clear disk step. 2025-07-08 15:23:36 +08:00
liqiang-fit2cloud 7bd1e48465 build: upgrade postgres to 17.5. 2025-07-08 15:22:09 +08:00
liqiang-fit2cloud a942090f30 build: clear image. 2025-07-08 15:13:09 +08:00
wxg0103 a27c09586e refactor: streamline permission checks in model handler for improved readability 2025-07-08 15:03:49 +08:00
wxg0103 e346137a48 refactor: clean up template and script formatting for improved readability 2025-07-08 14:49:13 +08:00
CaptainB 8f00184122 refactor: improve embedding handling and ensure float conversion for embeddings
--bug=1058254 --user=刘瑞斌 【知识库】企业版-ldap用户创建通用知识库-创建的空白文档中无法添加分段 https://www.tapd.cn/62980211/s/1725378
2025-07-08 14:19:20 +08:00
shaohuzhang1 90abe70e2e
fix: Resource authorization dirty data (#3506)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-08 13:44:08 +08:00
CaptainB 8465ac67f0 feat: add workspace validation to tool ID checks in serializers 2025-07-08 12:47:53 +08:00
CaptainB 8aa2c1437c feat: add workspace validation for knowledge id across serializers 2025-07-08 12:47:53 +08:00
wxg0103 337461b683 refactor: update application setting serializer to set default favicon and improve user resource permission handling 2025-07-08 11:47:17 +08:00
wangdan-fit2cloud 4143d1f2c5 fix: style 2025-07-08 11:39:53 +08:00
shaohuzhang1 1c364c22cf
fix: Resource automatic authorization type error (#3505) 2025-07-08 10:56:24 +08:00
shaohuzhang1 b40c76d3f3
fix: PDF Preview (#3504) 2025-07-08 10:52:27 +08:00
wangdan-fit2cloud 754c309b52 feat: rescource style 2025-07-08 10:48:05 +08:00
wxg0103 5ba00faf82 refactor: remove unnecessary tobytes() calls when retrieving file content
--bug=1058211 --user=王孝刚 【应用】高级编排-应用对话,图片理解、语音转文本模型执行报错 https://www.tapd.cn/62980211/s/1725144
2025-07-08 10:47:14 +08:00
zhangzhanwei 1f1d4721eb fix: Tool permission of two common user role 2025-07-08 10:40:54 +08:00
liqiang-fit2cloud 30dc77650a build: expose redis port. 2025-07-08 09:10:46 +08:00
shaohuzhang1 7f7704042e
feat: PDF Preview (#3502)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-07 22:58:23 +08:00
shaohuzhang1 b52c972ac0
feat: Dialogue displays knowledge sources (#3501) 2025-07-07 21:42:17 +08:00
wangdan-fit2cloud bfdbc74611 fix: i8n
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-07 21:21:03 +08:00
wangdan-fit2cloud 66807217c1 fix: bugs 2025-07-07 21:05:05 +08:00
zhangzhanwei 1c18b99429 fix: Split permission in document import dialogue 2025-07-07 20:57:51 +08:00
teukkk 4aef0f9d21 fix: workspaceDropdownSearch 2025-07-07 19:12:44 +08:00
wangdan-fit2cloud b6c7fe8b88 fix: disabled 2025-07-07 18:58:03 +08:00
wxg0103 85194599c8 refactor: update workspace_ids assignment logic for user roles in UserDrawer 2025-07-07 18:51:05 +08:00
CaptainB c8650030fb refactor: replace WorkspaceUserResourcePermission with UserResourcePermissionSerializer for user authorization 2025-07-07 18:37:47 +08:00
wxg0103 010a7e6d3b refactor: update user deletion confirmation messages for clarity 2025-07-07 18:15:48 +08:00
wangdan-fit2cloud 4d90a5c280 fix: i18n 2025-07-07 18:02:04 +08:00
wangdan-fit2cloud fabef7df57 fix: defaultSlogan 2025-07-07 17:53:41 +08:00
wangdan-fit2cloud 3601b7e8ac feat: video 2025-07-07 17:43:51 +08:00
CaptainB ad58a86f8e feat: enhance data filtering in PermissionSetting component with recursive support
--bug=1057808 --user=刘瑞斌 【资源授权】资源授权界面成员、资源搜索功能无效 https://www.tapd.cn/62980211/s/1724794
--bug=1057547 --user=刘瑞斌 【资源授权】社区&专业&企业版-资源授权-知识库/应用搜索框功能未生效 https://www.tapd.cn/62980211/s/1724805
2025-07-07 17:43:43 +08:00
teukkk 9172afc476 refactor: chatHistoryDrawer 2025-07-07 17:40:06 +08:00
zhangzhanwei f6b36b7801 fix: Update visibility handling after user profile retrieval and enhance permission checks in dropdown items 2025-07-07 17:36:18 +08:00
shaohuzhang1 1bb2a1ae12
fix: Simple application without dialogue logs (#3497) 2025-07-07 17:33:11 +08:00
CaptainB 348e588428 refactor: unify workspace ID retrieval in authorization API calls
--bug=1058173 --user=刘瑞斌 【资源授权】工作空间管理员进入资源授权查看提示没有权限,工作空间显示为空 https://www.tapd.cn/62980211/s/1724774
2025-07-07 17:28:27 +08:00
zhangzhanwei 6e012e6469 fix: Model permission of workspace manager 2025-07-07 17:27:44 +08:00
wangdan-fit2cloud a772714814 fix: i18n 2025-07-07 17:17:02 +08:00
CaptainB 114c2985c0 fix: improve workspace ID assignment and use const for lastIndex
--bug=1057324 --user=刘瑞斌 【资源授权】企业版-进入资源授权页面显示工作空间-默认应该显示用户所在的工作空间 https://www.tapd.cn/62980211/s/1724719
2025-07-07 17:04:46 +08:00
wangdan-fit2cloud da8a12cae7 fix: error 2025-07-07 16:59:24 +08:00
wangdan-fit2cloud 2d4e660c66 fix: style 2025-07-07 16:21:54 +08:00
shaohuzhang1 6effb8f0fb
feat: Application chat (#3494) 2025-07-07 16:08:37 +08:00
CaptainB 50e93e490a fix: ensure valid class is checked before validation in document processing 2025-07-07 16:04:16 +08:00
wangdan-fit2cloud 570c891ad2 fix: scrollbar 2025-07-07 15:05:57 +08:00
liqiang-fit2cloud 8ee575b32e refactor: disable access log. 2025-07-07 15:04:35 +08:00
CaptainB 67f719747c fix: enhance meta validation to check for empty dictionary
--bug=1058076 --user=刘瑞斌 【知识库】飞书知识库-文档列表操作列-设置命中处理方式为“直接回答” 报异常 https://www.tapd.cn/62980211/s/1724448
2025-07-07 14:43:35 +08:00
zhangzhanwei 880697bf35 fix: Add tool from tool store 2025-07-07 14:35:32 +08:00
wangdan-fit2cloud 73ab7214eb feat: create application template 2025-07-07 14:25:00 +08:00
CaptainB d8132fa9bf feat: add filename decoding from Content-Disposition header in exportFile function 2025-07-07 14:18:27 +08:00
CaptainB bed9c500f1 feat: update source_type and source_id defaults in initial migration 2025-07-07 12:54:17 +08:00
CaptainB ccd4bdd888 fix: remove unnecessary colon from delete confirmation title
--bug=1058125 --user=刘瑞斌 【工具】删除工具二次提示多了个冒号 https://www.tapd.cn/62980211/s/1724338
2025-07-07 12:40:53 +08:00
wxg0103 181173e2a5 refactor: remove redundant user exclusion logic for improved clarity 2025-07-07 12:07:48 +08:00
zhangzhanwei 4d064f6a37 fix: Model list permission while create knowledge or application 2025-07-07 11:39:04 +08:00
CaptainB 25d395d74a feat: switch Celery broker to Redis with Sentinel support 2025-07-07 11:24:37 +08:00
liqiang-fit2cloud 78a0a0bd50 refactor: update redis.conf. 2025-07-07 10:33:00 +08:00
CaptainB 13596ed7e8 refactor: streamline auth_resource method for improved readability and maintainability
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-07-05 18:06:00 +08:00
shaohuzhang1 e7a30903ba
feat: application upload file (#3487)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-04 19:52:45 +08:00
teukkk 0c874bd2d5 style: ellipsis 2025-07-04 18:44:31 +08:00
wxg0103 3722027357 refactor: replace user edition checks with getEditionName method for improved readability 2025-07-04 18:43:45 +08:00
wangdan-fit2cloud fa842b0d13 feat: copy application 2025-07-04 18:37:19 +08:00
CaptainB ef51afb96e refactor: filter folder query set by create_user for improved consistency 2025-07-04 18:31:57 +08:00
teukkk e7dda56b9f feat: openParagraphDocument 2025-07-04 18:21:26 +08:00
wxg0103 a097d23299 refactor: add show_exec field to application access token response 2025-07-04 18:17:26 +08:00
wxg0103 ce1884ec60 refactor: add application_id and workspace_id fields to chat record serializer 2025-07-04 18:17:26 +08:00
wangdan-fit2cloud 9f25619fae fix: style 2025-07-04 18:12:39 +08:00
wangdan-fit2cloud 580c6ac641 feat: 2025-07-04 18:12:38 +08:00
CaptainB 9ae64d871c refactor: enhance avatar upload functionality to support shared and resource management contexts
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-04 17:51:58 +08:00
wxg0103 168fb2e9a8 refactor: update translation for "Think:" in django.po to "思考内容: " 2025-07-04 17:46:27 +08:00
teukkk 3ba172652a fix: left collapse 2025-07-04 17:43:54 +08:00
zhangzhanwei 722776623d fix: Locales 2025-07-04 17:40:20 +08:00
wxg0103 66bddc8ed3 refactor: add translation for "Hit-Test" in django.po 2025-07-04 17:07:12 +08:00
wangdan-fit2cloud 005a6229fb feat: execution detail 2025-07-04 16:34:15 +08:00
wxg0103 519e0dc60b refactor: add source attribute to name field in DocumentEditInstanceSerializer for improved clarity 2025-07-04 16:31:22 +08:00
wxg0103 e939b47604 refactor: update model type in getSelectModel function from 'LLM' to 'STT' 2025-07-04 16:28:35 +08:00
CaptainB 1c4fae42be refactor: update filter logic to use nick_name instead of username for member filtering
--bug=1057962 --user=刘瑞斌 【资源授权】社区版、专业版、企业版资源授权-工具,模糊搜索成员失败 https://www.tapd.cn/62980211/s/1723760
2025-07-04 16:17:56 +08:00
CaptainB cb40d62162 refactor: allow loading of truncated images and increase max pixel limit in common_handle.py
--bug=1057749 --user=刘瑞斌 【知识库】qa问答对文档中带图片,导入后图片未显示 https://www.tapd.cn/62980211/s/1723700
2025-07-04 15:53:37 +08:00
CaptainB d7b4f90798 refactor: update parameter initialization in getList functions for improved clarity
--bug=1058075 --user=刘瑞斌 【知识库】社区版、企业版、专业版搜索框切换完搜索字段后点击知识库文件夹提示必须是一个有效的uuid https://www.tapd.cn/62980211/s/1723617
2025-07-04 15:43:24 +08:00
teukkk ad19518108 refactor: chat embed 2025-07-04 15:29:01 +08:00
zhangzhanwei 146d4e2624 fix: Model permission 2025-07-04 15:19:52 +08:00
wxg0103 e4a8047a05 refactor: update user field in Tool and ToolFolder models to allow null values and set on delete 2025-07-04 15:04:29 +08:00
liqiang-fit2cloud 8842319805 fix: fix sandbox_path. 2025-07-04 14:53:01 +08:00
CaptainB 8f851aab61 refactor: add meta field to knowledge user SQL queries
--bug=1058066 --user=刘瑞斌 [知识库]企业&专业版-普通用户查看飞书知识库的设置信息,账号信息显示空白 https://www.tapd.cn/62980211/s/1723533
2025-07-04 14:50:55 +08:00
zhangzhanwei 35ee6eee02 fix: Switch language and repassword permission of common user 2025-07-04 14:46:51 +08:00
zhangzhanwei d114b0013a fix: Extends common user tool permission 2025-07-04 14:32:15 +08:00
dependabot[bot] 1231cad2cc build(deps): bump the python-dependencies group with 4 updates
Updates the requirements on [langchain-anthropic](https://github.com/langchain-ai/langchain), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python) and [pymupdf](https://github.com/pymupdf/pymupdf) to permit the latest version.

Updates `langchain-anthropic` to 0.3.17
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-anthropic==0.3.16...langchain-anthropic==0.3.17)

Updates `boto3` to 1.39.3
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.39.2...1.39.3)

Updates `tencentcloud-sdk-python` to 3.0.1415
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1414...3.0.1415)

Updates `pymupdf` to 1.26.3
- [Release notes](https://github.com/pymupdf/pymupdf/releases)
- [Changelog](https://github.com/pymupdf/PyMuPDF/blob/main/changes.txt)
- [Commits](https://github.com/pymupdf/pymupdf/compare/1.24.9...1.26.3)

---
updated-dependencies:
- dependency-name: langchain-anthropic
  dependency-version: 0.3.17
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.39.3
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1415
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pymupdf
  dependency-version: 1.26.3
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-04 14:14:24 +08:00
wxg0103 bc0b1fb209 refactor: improve formatting and consistency in index.vue 2025-07-04 14:09:36 +08:00
zhangzhanwei ea085a3832 fix: Extends workspace manager system permission 2025-07-04 14:00:25 +08:00
wxg0103 a7f55e6c00 refactor: update translation for "Image size" to improve clarity 2025-07-04 13:57:56 +08:00
CaptainB 4214043674 refactor: update CreateKnowledgeDialog to refresh user profile after knowledge creation 2025-07-04 13:55:30 +08:00
CaptainB f3e5f26caf refactor: enhance JSON serialization with custom serializer for datetime and Decimal types 2025-07-04 13:19:09 +08:00
CaptainB 0ef5ccc4c2 refactor: add filterable attribute to create_user search fields for improved usability 2025-07-04 12:59:05 +08:00
CaptainB 57c4f74501 refactor: add filterable attribute to create_user search fields for improved usability 2025-07-04 12:56:55 +08:00
CaptainB 6bd5b9af6a refactor: update icon URL handling in ApplicationResourceIndex.vue 2025-07-04 12:53:36 +08:00
shaohuzhang1 628e7cdfed
feat: application node (#3480) 2025-07-04 12:08:24 +08:00
shaohuzhang1 e21d53b746
feat: Simple application version (#3479) 2025-07-04 11:42:31 +08:00
CaptainB 77d90e5b46 refactor: update poetry version to 2.0.0 in Dockerfile 2025-07-04 11:35:11 +08:00
wangdan-fit2cloud 45444bb256 feat: chat 2025-07-04 11:26:24 +08:00
wxg0103 be759701cc feat: add application management API and update ApplicationResourceIndex.vue 2025-07-04 11:21:05 +08:00
dependabot[bot] 46b7e5c38f build(deps): bump the python-dependencies group with 13 updates
---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.4
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.27
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-community
  dependency-version: 0.3.27
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-google-genai
  dependency-version: 2.1.6
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.1.8
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.5.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: zhipuai
  dependency-version: 2.1.5.20250701
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.39.2
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1414
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: xinference-client
  dependency-version: 1.7.1.post1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: anthropic
  dependency-version: 0.57.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: sentence-transformers
  dependency-version: 5.0.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pypdf
  dependency-version: 5.7.0
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-04 11:18:00 +08:00
CaptainB 9c7eb22c61 refactor: improve error message for non-existent files in document handling
--bug=1057925 --user=刘瑞斌 【知识库】知识库快速创建空白文档-添加段落和内容-随后下载源文档-下载文件提示异常 https://www.tapd.cn/62980211/s/1723202
2025-07-04 11:08:20 +08:00
CaptainB cb28cfd427 refactor: update user option label to use nick_name in Application and Model Resource Index 2025-07-04 10:55:35 +08:00
CaptainB d58a2239e3 refactor: update user options to use nick_name instead of username 2025-07-04 10:51:58 +08:00
CaptainB 5f2bb37626 refactor: update workspace_ids handling in API requests for consistency 2025-07-04 10:44:37 +08:00
zhangzhanwei 60e3005aa9 fix: Tool permission by extend workspace manager 2025-07-04 10:41:45 +08:00
wxg0103 82779d1719 refactor: clean up formatting and improve code readability in ModelResourceIndex.vue 2025-07-04 10:36:04 +08:00
wxg0103 ba3a2153e0 refactor: simplify data handling in ApplicationChatRecordAddKnowledgeSerializer 2025-07-04 10:13:40 +08:00
wxg0103 bf9918250c refactor: conditionally load shared tools for EE users in DropdownMenu 2025-07-04 09:50:12 +08:00
wxg0103 85afde5e61 refactor: update role constants to include ADMIN in permission checks
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-04 09:15:53 +08:00
wxg0103 7d7f085e3a refactor: update role constants to include ADMIN in permission checks 2025-07-04 09:13:29 +08:00
zhangzhanwei a0b71de188 Document enter permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-03 20:48:07 +08:00
CaptainB d54184cf71 refactor: update icon source handling in PermissionSetting component 2025-07-03 20:44:48 +08:00
zhangzhanwei dd621b59b9 Application model use 2025-07-03 20:23:24 +08:00
CaptainB a3c5cf452c refactor: add TypeScript type annotations and update ESLint rules 2025-07-03 20:18:06 +08:00
wangdan-fit2cloud 6dd1e68efc feat: bugs 2025-07-03 20:12:47 +08:00
CaptainB 08695cea0c refactor: update query parameter handling in workspace retrieval 2025-07-03 20:05:30 +08:00
CaptainB b9a3cae4b4 refactor: update icon handling to use resetUrl function for improved URL management 2025-07-03 19:55:13 +08:00
wangdan-fit2cloud 7b1a52beff feat: chat 2025-07-03 19:52:29 +08:00
wangdan-fit2cloud fb98259881 feat: chat 2025-07-03 19:52:29 +08:00
CaptainB d40294d5a4 refactor: update avatar dialog submission logic to remove hardcoded icon path 2025-07-03 19:51:43 +08:00
zhangzhanwei 7dc20732d5 fix: Application model use 2025-07-03 19:51:34 +08:00
teukkk 0b06e20527 refactor: toolTree and applicationTree 2025-07-03 19:36:06 +08:00
wangdan-fit2cloud 0b049ada9c feat: chat 2025-07-03 19:23:02 +08:00
wxg0103 b2e4d2dc20 feat: add chat background setting to application settings 2025-07-03 19:20:35 +08:00
CaptainB fe008e055f refactor: update avatar dialog submission logic to remove hardcoded icon path 2025-07-03 19:15:00 +08:00
wangdan-fit2cloud 3f60135144 feat: display 2025-07-03 19:06:31 +08:00
zhangzhanwei cf8df8a1f7 feat: Pricing button permission 2025-07-03 19:01:32 +08:00
liqiang-fit2cloud 6f04b99aef refactor: fix HF_HOME. 2025-07-03 18:53:47 +08:00
wxg0103 22bc1931c8 fix: improve chat user filtering and update input maxlength 2025-07-03 18:33:35 +08:00
wxg0103 9d1549fc76 feat: add application resource API with pagination and filtering 2025-07-03 18:26:31 +08:00
zhangzhanwei 97269d5445 fix: System common user permission by role 2025-07-03 18:21:57 +08:00
wangdan-fit2cloud d93b47d6f5 feat: pricing 2025-07-03 18:16:10 +08:00
CaptainB a67820bc48 refactor: add deletion of ApplicationKnowledgeMapping entries when knowledge is deleted
--bug=1058030 --user=刘瑞斌 【知识库】知识库已关联应用-删除报错 https://www.tapd.cn/62980211/s/1722902
2025-07-03 18:10:22 +08:00
zhangzhanwei 1ef0146389 feat: Application conversation 2025-07-03 17:40:28 +08:00
wangdan-fit2cloud e61e4eb937 fix: folder 2025-07-03 17:29:59 +08:00
wxg0103 1d35700d2a refactor: enhance model retrieval logic and update optional parameters 2025-07-03 17:28:19 +08:00
CaptainB f186b25afe refactor: streamline permission handling and remove unused cache logic in tool management 2025-07-03 17:16:16 +08:00
CaptainB c8d901ba4d refactor: use consistent tool ID generation and add automatic permission assignment for tool creators 2025-07-03 17:11:41 +08:00
CaptainB 7e3589a81a refactor: add integrity check for folder tree structure in get_folder_tree method
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-03 17:01:59 +08:00
wangdan-fit2cloud 43c7350415 feat: folder 2025-07-03 16:30:37 +08:00
wxg0103 8f1b0e0da5 fix: improve chat user filtering and update input maxlength 2025-07-03 16:18:16 +08:00
zhangzhanwei 23b835fa19 fix: Application community permission 2025-07-03 15:38:52 +08:00
shaohuzhang1 c2256a5305
fix: Community user permissions (#3465) 2025-07-03 15:30:28 +08:00
CaptainB e0075c3dd5 refactor: update default icon path in tool models and related logic 2025-07-03 15:20:48 +08:00
liqiang-fit2cloud bd8424ae8b Merge remote-tracking branch 'origin/v2' into v2 2025-07-03 15:15:47 +08:00
liqiang-fit2cloud df6adb1cd2 build: update redis.conf. 2025-07-03 15:15:34 +08:00
wangdan-fit2cloud a4d4707845 feat: bugs 2025-07-03 15:12:19 +08:00
wangdan-fit2cloud f545a51397 fix: lark sync 2025-07-03 15:12:18 +08:00
shaohuzhang1 df49c5ba5c
fix: Automatic authorization for resource creation (#3464) 2025-07-03 14:46:55 +08:00
shaohuzhang1 0b27836ccb
fix: Chat prefix (#3463) 2025-07-03 14:34:41 +08:00
CaptainB 54cd93d927 feat: add getAllMemberList function to retrieve all users
--bug=1057955 --user=刘瑞斌 【共享资源】创建者显示为进入系统管理前工作空间存在的用户,但应该显示全量,因为系统管理不区分工作空间 https://www.tapd.cn/62980211/s/1722579
2025-07-03 13:50:48 +08:00
shaohuzhang1 66699ef497
fix: Application embed (#3462) 2025-07-03 12:26:20 +08:00
wxg0103 ce17833b0a fix: update workspace_ids assignment for user roles in UserDrawer 2025-07-03 12:03:58 +08:00
wxg0103 e1df14b16d refactor: update role constants to use names instead of values 2025-07-03 12:03:37 +08:00
CaptainB 1639d4b31c feat: enhance file upload with source_id and source_type metadata 2025-07-03 11:58:43 +08:00
wangdan-fit2cloud 32f9becb7c fix: copy 2025-07-03 11:45:07 +08:00
zhangzhanwei cc40b5c275 fix: Workspace manager model permission 2025-07-03 11:43:54 +08:00
CaptainB 79dc3e4909 feat: add source_id and source_type fields to FileSerializer and update related components 2025-07-03 11:40:02 +08:00
wxg0103 50cc851f4f fix: change user role to a list for compatibility with role relations 2025-07-03 10:39:40 +08:00
CaptainB 1064e8bc63 refactor: update icon paths for internal tools in SQL definitions 2025-07-03 10:16:09 +08:00
wxg0103 4c3b2b6040 fix: update translations 2025-07-03 09:54:38 +08:00
wxg0103 557f82af7c fix: update translations and correct workspace API import path 2025-07-03 09:27:18 +08:00
wangdan-fit2cloud 47368a5f99 fix: bugs
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-02 22:48:33 +08:00
CaptainB aa901c7fc7 fix: update file URL paths to use relative references 2025-07-02 22:45:11 +08:00
shaohuzhang1 da0be4b0ce
fix: URL 404 (#3460) 2025-07-02 21:49:55 +08:00
shaohuzhang1 9166528504
feat: File URL adaptation (#3459) 2025-07-02 21:02:45 +08:00
wangdan-fit2cloud 471ac59f29 fix: execution 2025-07-02 20:44:20 +08:00
wangdan-fit2cloud 0ee4b7fae2 fix: execution 2025-07-02 19:26:51 +08:00
zhangzhanwei f01bf625ef feat: System common user permission to knowledge application tool model by resource authorization 2025-07-02 19:07:42 +08:00
CaptainB 33a88be6d3 refactor: conditionally render create folder option based on apiType
--bug=1057896 --user=刘瑞斌 【共享资源】工具-创建文件夹导致页面刷新显示暂无数据 https://www.tapd.cn/62980211/s/1722199
2025-07-02 18:48:08 +08:00
wangdan-fit2cloud 9912b85df0 feat: user login 2025-07-02 18:43:14 +08:00
wxg0103 75f75f0111 refactor: improve code formatting and update API call for workspace list 2025-07-02 18:38:41 +08:00
CaptainB b011cd7d26 feat: add tool creation with automatic permissions and cache refresh
--bug=1057901 --user=刘瑞斌 【资源授权】社区版从工具商店添加工具失败 https://www.tapd.cn/62980211/s/1722159
2025-07-02 18:15:45 +08:00
wxg0103 873d4af46b fix: update callback URLs to include MaxKB prefix 2025-07-02 18:11:00 +08:00
CaptainB 5ab5ab71a5 feat: add functionality to add internal shared tools with API integration 2025-07-02 17:50:58 +08:00
wangdan-fit2cloud 32dd4b41b6 feat: user input 2025-07-02 17:48:05 +08:00
shaohuzhang1 464890abc5
fix: vite config (#3457) 2025-07-02 16:58:51 +08:00
shaohuzhang1 ef15d819cf
fix: Related knowledge base (#3456) 2025-07-02 16:54:22 +08:00
CaptainB da0d633121 refactor: update user option label to use nick_name and fetch member list on mount 2025-07-02 16:51:35 +08:00
zhangzhanwei 3b4b658934 feat: System common user permission by resource authorization 2025-07-02 16:44:22 +08:00
CaptainB b5efa495bf refactor: update user options to use nick_name and load members from workspace
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-02 16:30:27 +08:00
CaptainB 621cd37385 refactor: add create_user field to knowledge query and update filtering logic 2025-07-02 16:22:51 +08:00
CaptainB 8d52166307 refactor: add create_user field to tool serialization and update related logic
--bug=1057413 --user=刘瑞斌 【工具】搜索项选择创建者,创建者列表为空 https://www.tapd.cn/62980211/s/1721870
2025-07-02 16:12:35 +08:00
shaohuzhang1 6473f27cae
fix: ui bugs (#3454) 2025-07-02 16:01:22 +08:00
CaptainB aff1ab7d1b refactor: add create_user field to tool serialization and update related logic
--bug=1057413 --user=刘瑞斌 【工具】搜索项选择创建者,创建者列表为空 https://www.tapd.cn/62980211/s/1721870
2025-07-02 15:58:48 +08:00
shaohuzhang1 191e62f96d
fix: role user permission (#3453) 2025-07-02 14:58:02 +08:00
wangdan-fit2cloud 25125ca571 fix: application 2025-07-02 14:32:08 +08:00
wxg0103 a98f20e5b9 refactor: add django_apscheduler to installed apps 2025-07-02 14:30:08 +08:00
CaptainB ac4bf303f4 refactor: update SQL queries to include embedding_model_id and adjust filters for knowledge_id 2025-07-02 14:28:03 +08:00
CaptainB a34c089b73 refactor: enhance knowledge retrieval logic for workspace management and x-pack EE 2025-07-02 14:28:03 +08:00
shaohuzhang1 e8418f6f5c
fix: role user permission (#3452) 2025-07-02 14:26:57 +08:00
zhangzhanwei 8b40762218 fix: Application permission 2025-07-02 14:19:11 +08:00
wangdan-fit2cloud 7abfebe927 fix: url 2025-07-02 14:10:24 +08:00
wangdan-fit2cloud 081ca691d8 fix: perf 2025-07-02 14:10:24 +08:00
CaptainB 315fdd5f9c refactor: add file count and size limits to form data in KnowledgeSetting
--bug=1057871 --user=刘瑞斌 【知识库】通用知识库设置中限制上传文档大小功能保存后未生效 https://www.tapd.cn/62980211/s/1721614
2025-07-02 14:05:27 +08:00
CaptainB de1ec6addb refactor: improve model data serialization and update user field names 2025-07-02 14:00:04 +08:00
CaptainB 179b8b51d8 refactor: update openMoveToDialog function to use structured object for parameters 2025-07-02 13:52:35 +08:00
CaptainB d8c7d248d6 refactor: standardize component reference naming in ToolListContainer 2025-07-02 13:40:42 +08:00
CaptainB 5ac0b2be3d refactor: simplify cache timeout handling in user token management 2025-07-02 12:43:50 +08:00
CaptainB 6068530cdd refactor: update locking mechanism to use a consistent key format and set default timeout 2025-07-02 12:36:43 +08:00
CaptainB 0ad38e2540 refactor: improve document status update logic and enhance post handler functionality 2025-07-02 11:44:45 +08:00
zhanweizhang7 b71a854d7c
feat: Shared knowledge access permission (#3450) 2025-07-02 11:35:14 +08:00
teukkk 6110bf314a style: tagGroup width 2025-07-02 11:15:29 +08:00
CaptainB 1a06264930 refactor: update prefix usage in knowledge API call
--bug=1057818 --user=刘瑞斌 [知识库]企业版/专业版-知识库详情页-设置-修改任意信息,保存后页面404 https://www.tapd.cn/62980211/s/1721489
2025-07-02 11:01:32 +08:00
CaptainB 868b4b6eab refactor: include workspace_id in document query return values
--bug=1057837 --user=刘瑞斌 【知识库】、压缩包文件中存在视频和图片,只能分段上传后提示信息存在问题 https://www.tapd.cn/62980211/s/1721454
2025-07-02 11:01:32 +08:00
wxg0103 e794874d82 fix: license add version 2025-07-02 10:52:39 +08:00
CaptainB bdba4bc34c refactor: improve knowledge editing logic to prevent name duplication
--bug=1057801 --user=刘瑞斌 【知识库】不同文件夹下创建相同名称的知识库成功,当切换知识库向量模型时会提示知识库名称重复 https://www.tapd.cn/62980211/s/1721429
2025-07-02 10:38:23 +08:00
wxg0103 de68eef276 fix: ui error 2025-07-02 10:29:20 +08:00
CaptainB 9541b27d76 refactor: enhance deletion process by removing associated permissions for knowledge, model, and tool 2025-07-02 10:06:05 +08:00
wxg0103 58dde6629b refactor: workspace api 2025-07-02 09:56:42 +08:00
wxg0103 0e339701da refactor: user role 2025-07-02 09:43:34 +08:00
CaptainB baa9828950 fix: update image paths in documentation for consistency
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-01 22:01:08 +08:00
wangdan-fit2cloud c5155666c5 fix: sync 2025-07-01 21:40:33 +08:00
wangdan-fit2cloud c7214a6e56 feat: workflow 2025-07-01 21:22:21 +08:00
wangdan-fit2cloud 3e3c40de76 fix: api 2025-07-01 20:52:00 +08:00
wangdan-fit2cloud 1f8cffb189 fix: build 2025-07-01 20:33:01 +08:00
wangdan-fit2cloud 10eac10404 feat: chat user 2025-07-01 20:33:01 +08:00
wangdan-fit2cloud 746fbe8705 feat: application 2025-07-01 20:33:01 +08:00
shaohuzhang1 3f6faa7592
feat: dynamic URL (#3448) 2025-07-01 20:10:47 +08:00
teukkk f59cc9425e fix: userManage tagGroup 2025-07-01 19:56:26 +08:00
wxg0103 487e7eda6f refactor: user role 2025-07-01 19:53:53 +08:00
zhangzhanwei 28411e5c92 feat: Shared knowledge chat user api 2025-07-01 19:46:51 +08:00
wxg0103 411a0446b3 refactor: user role 2025-07-01 19:23:53 +08:00
wxg0103 d7421ec27b refactor: forgot password 2025-07-01 19:07:48 +08:00
wxg0103 9f4e480102 refactor: chat user api 2025-07-01 18:23:31 +08:00
wxg0103 816bf19d86 refactor: role 2025-07-01 18:22:56 +08:00
zhangzhanwei a4143eed23 feat: hit test permission 2025-07-01 18:12:31 +08:00
CaptainB 8c0361bbc2 refactor: update API endpoint paths to include admin prefix 2025-07-01 18:08:12 +08:00
CaptainB f9a8b9c270 refactor: update dynamic URL handling in tool serialization 2025-07-01 18:00:47 +08:00
wxg0103 63c836da04 refactor: chat user api 2025-07-01 17:38:14 +08:00
wxg0103 f73721c73e refactor: workspace permission 2025-07-01 17:37:50 +08:00
CaptainB d5bfe98c23 refactor: update tool icon paths for consistency 2025-07-01 17:14:46 +08:00
teukkk 15574bd38d fix: workspaceFormItem rules 2025-07-01 16:38:17 +08:00
teukkk 6cfb2a248b fix: rename 2025-07-01 16:38:17 +08:00
liqiang-fit2cloud 9b00ebd95a build: update env. 2025-07-01 16:34:37 +08:00
CaptainB a58ee19fab refactor: update default admin path to include leading slash 2025-07-01 16:31:07 +08:00
wangdan-fit2cloud 2dc3d91a6c feat: node 2025-07-01 16:26:51 +08:00
CaptainB cecd3f90c6 refactor: remove unused logging import and enhance knowledge base query 2025-07-01 16:07:43 +08:00
liqiang-fit2cloud 295eb88947 build: update sh files. 2025-07-01 16:01:49 +08:00
CaptainB cc06d07016 refactor: enhance document download function with additional parameter and add new MIME types 2025-07-01 15:59:08 +08:00
shaohuzhang1 2ad5883aef
feat: dynamic URL (#3444)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-07-01 15:43:00 +08:00
CaptainB 9b89e8f75c refactor: enhance file parsing by saving source files and linking document IDs 2025-07-01 15:24:07 +08:00
wxg0103 38c3dcae7e fix: field error message 2025-07-01 15:15:38 +08:00
wxg0103 75fd815e31 refactor: chat user 2025-07-01 14:32:29 +08:00
wangdan-fit2cloud 9f6cde37c3 fix: bugs 2025-07-01 14:28:53 +08:00
CaptainB b0b269f3d4 refactor: extend KnowledgeModelSerializer fields to include file size and count limits
--bug=1057593 --user=刘瑞斌 【共享资源】共享知识库设置界面,向量模型为空,不回显 https://www.tapd.cn/62980211/s/1720862
2025-07-01 14:21:10 +08:00
CaptainB 089915f488 refactor: improve error logging for image reading and enhance image handling logic
--bug=1057749 --user=刘瑞斌 【知识库】qa问答对文档中带图片,导入后图片未显示 https://www.tapd.cn/62980211/s/1720856
2025-07-01 14:17:10 +08:00
CaptainB 407fe83582 refactor: streamline folder deletion process and enhance permission checks 2025-07-01 13:21:04 +08:00
CaptainB b1dd321e28 refactor: add user_id to folder operations for permission checks 2025-07-01 12:54:55 +08:00
CaptainB ad5c8122d3 refactor: remove unnecessary condition for workspace management in knowledge.py and update SQL query in list_knowledge_user.sql 2025-07-01 11:58:44 +08:00
CaptainB e724ffbebd refactor: simplify query set handling in tool.py and list_tool_user.sql 2025-07-01 11:57:42 +08:00
wxg0103 fedf1ef6fc refactor: ui 2025-07-01 11:40:32 +08:00
wxg0103 62233b34c4 refactor: ui 2025-07-01 11:35:25 +08:00
wxg0103 5dc51836ef refactor: chat 2025-07-01 11:14:28 +08:00
CaptainB 2cf01dd12c refactor: remove license validation message for community version knowledge bases 2025-07-01 11:08:07 +08:00
liqiang-fit2cloud 94847bb8f0 Merge remote-tracking branch 'origin/v2' into v2 2025-07-01 10:45:09 +08:00
liqiang-fit2cloud 636c219979 feat: add MAXKB_ADMIN_PATH env. 2025-07-01 10:44:42 +08:00
CaptainB ea5fae09c4 refactor: remove license validation message for community version knowledge bases 2025-07-01 10:44:26 +08:00
shaohuzhang1 07937fcaf5
fix: chat url (#3441) 2025-07-01 10:28:26 +08:00
liqiang-fit2cloud f0ef375010 Merge remote-tracking branch 'origin/v2' into v2 2025-07-01 10:24:58 +08:00
liqiang-fit2cloud d655028f9e feat: add MAXKB_ADMIN_PATH env. 2025-07-01 10:24:49 +08:00
shaohuzhang1 56932b3afd
fix: Debugging dialogue error (#3440) 2025-07-01 10:15:01 +08:00
liqiang-fit2cloud bc87101bc8 feat: add MAXKB_SANDBOX_PYTHON_PACKAGE_PATHS env. 2025-07-01 10:09:54 +08:00
liqiang-fit2cloud 4c04be7be7 feat: add MAXKB_SANDBOX_PYTHON_PACKAGE_PATHS env. 2025-07-01 10:06:46 +08:00
CaptainB 482fbf4003 fix: update Redis host comment and increase default session timeout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-30 22:18:14 +08:00
shaohuzhang1 05f4eb532e
fix: search knowledge (#3439) 2025-06-30 21:47:54 +08:00
wangdan-fit2cloud b89b950c0d feat: move to 2025-06-30 21:06:30 +08:00
shaohuzhang1 219ea75244
feat: Knowledge base search based on authorized users (#3438) 2025-06-30 20:58:30 +08:00
zhangzhanwei 71a5de4e21 fix: Model card permission 2025-06-30 19:58:36 +08:00
CaptainB 52b044608c fix: update refreshMigrateParagraph to handle single data selection and improve success message handling
--bug=1057688 --user=刘瑞斌 【知识库】文档内分段迁移失败,console有报错 https://www.tapd.cn/62980211/s/1720613
2025-06-30 19:38:28 +08:00
teukkk 3205f14dfb fix: form submit prevent 2025-06-30 19:31:18 +08:00
shaohuzhang1 bd75a3d5bc
perf: cas auth (#3436) 2025-06-30 18:34:59 +08:00
CaptainB 305cdea34b refactor: remove SOCKET_TIMEOUT from Redis configuration 2025-06-30 18:25:14 +08:00
zhangzhanwei 60a0c6039e feat: Knowledge chat user permission 2025-06-30 18:23:44 +08:00
CaptainB b2667998a4 refactor: remove incompatible CONNECTION_POOL_KWARGS from Redis config 2025-06-30 18:19:54 +08:00
CaptainB a6f0081c94 feat: enhance Redis Sentinel configuration to support dynamic sentinel settings 2025-06-30 18:17:30 +08:00
teukkk e5d26301c7 refactor: dropdownMenu 2025-06-30 18:09:07 +08:00
teukkk 3e4aac3557 feat: openKnowledgeSource for chat 2025-06-30 18:09:07 +08:00
shaohuzhang1 d8a9c9ccdd
feat: Application text to speech and speech to text functions (#3433) 2025-06-30 18:03:11 +08:00
wxg0103 2aa86ebfaa refactor: model params 2025-06-30 18:02:30 +08:00
wxg0103 7e80b951ac refactor: model params 2025-06-30 17:47:31 +08:00
wxg0103 da3c945b56 refactor: model 2025-06-30 17:42:48 +08:00
wangdan-fit2cloud c27995c172 feat: limit 2025-06-30 17:22:37 +08:00
wxg0103 e6f9238005 refactor: i18n 2025-06-30 16:39:33 +08:00
wangdan-fit2cloud 18eff85215 fix: typo 2025-06-30 16:33:49 +08:00
wangdan-fit2cloud a16375781b feat: tip 2025-06-30 15:44:49 +08:00
zhangzhanwei 87415e96c8 fix: Avatar permission 2025-06-30 15:24:55 +08:00
shaohuzhang1 2c0a8afd5f
fix: add extends role (#3430)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-30 15:05:53 +08:00
CaptainB 71ad83a267 feat: update Redis Sentinel configuration to use SENTINEL_SENTINELS 2025-06-30 14:54:28 +08:00
wxg0103 f53db818d7 refactor: oauth2 callback 2025-06-30 14:49:50 +08:00
zhangzhanwei 3cf6dde72b fix: Resource authorization permission 2025-06-30 13:40:06 +08:00
CaptainB 91f68781fe feat: add Redis Sentinel support to cache settings 2025-06-30 13:27:21 +08:00
CaptainB 0f1d57f0cb feat: enhance error logging for file processing in CSV, XLS, and DOC handlers 2025-06-30 12:49:50 +08:00
CaptainB 82a2203be6 fix: handle string type for limit and improve error logging in pdf_split_handle
--bug=1057493 --user=刘瑞斌 【知识库】上传文档,使用高级分段报错 https://www.tapd.cn/62980211/s/1720110
2025-06-30 12:47:47 +08:00
CaptainB 049c0e0bb0 refactor: improve readability of model data retrieval in model_serializer 2025-06-30 12:29:51 +08:00
shaohuzhang1 91e2dd7ea6
feat: add extends role (#3428) 2025-06-30 11:50:59 +08:00
wangdan-fit2cloud 4cb694fa65 feat: knowledge setting 2025-06-30 11:37:41 +08:00
wxg0103 1107b70a4a refactor: model 2025-06-30 11:16:55 +08:00
shaohuzhang1 8e29562e30
feat: Knowledge chat user permission (#3426) 2025-06-30 11:08:30 +08:00
CaptainB 64efc05c41 fix: update loadSharedApi type from 'knowledge' to 'document'
--bug=1057666 --user=刘瑞斌 【知识库】生成关联问题报错 https://www.tapd.cn/62980211/s/1720016
2025-06-30 11:01:22 +08:00
CaptainB cc692ffbe1 feat: update permission constants to include ResourcePermission
--bug=1057659 --user=刘瑞斌 【共享资源】企业版-创建共享工具失败 https://www.tapd.cn/62980211/s/1720006
2025-06-30 10:53:58 +08:00
zhangzhanwei a66cdc02d5 fix: System manage permission 2025-06-30 10:51:45 +08:00
shaohuzhang1 f5ee7b5c25
feat: user resource permission (#3424) 2025-06-30 10:47:28 +08:00
CaptainB 74b76d9914 feat: prevent editing of shared tools in ToolListContainer
--bug=1057658 --user=刘瑞斌 【共享资源】工作空间用户可以编辑当前工作空间的共享工具 https://www.tapd.cn/62980211/s/1719993
2025-06-30 10:44:49 +08:00
teukkk e8d29e2cef style: role member table 2025-06-30 10:27:39 +08:00
wxg0103 8e89658b04 refactor: user manage 2025-06-30 10:12:45 +08:00
wxg0103 e85aee434c refactor: resource model add create_time update_time 2025-06-30 09:47:58 +08:00
CaptainB 7862c17b21 refactor: remove debug print statement for session timeout in UserToken class
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-06-28 19:44:19 +08:00
CaptainB 1dc6d6e8ba feat: add session timeout configuration to Config class 2025-06-28 19:43:40 +08:00
shaohuzhang1 d4d7bdde41
feat: user resource permission ui (#3423)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-27 22:38:00 +08:00
shaohuzhang1 c5bdada6dc
feat: user resource permission (#3422) 2025-06-27 22:22:52 +08:00
zhangzhanwei 873a9a953f feat: System route permission 2025-06-27 21:17:31 +08:00
teukkk 4a737556a9 refactor: executionDetailContent
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-27 20:27:18 +08:00
CaptainB a1abf33fa2 fix: correct new position calculation in drag-and-drop functionality 2025-06-27 19:12:33 +08:00
teukkk 78bfee7c53 fix: merge table rows of members 2025-06-27 19:06:47 +08:00
CaptainB 327b6cc563 refactor: adjust paragraph position indexing to start from 1 2025-06-27 19:01:05 +08:00
shaohuzhang1 4b4691d689
feat: Chat record details (#3418) 2025-06-27 18:54:05 +08:00
CaptainB 22d86f046a refactor: adjust paragraph positions during migration for consistency 2025-06-27 18:40:52 +08:00
wxg0103 65545a8f15 refactor: ui 2025-06-27 18:36:32 +08:00
wangdan-fit2cloud 1e26032e55 perf: perf 2025-06-27 18:17:27 +08:00
wangdan-fit2cloud 8a827b4294 perf: perf 2025-06-27 18:13:31 +08:00
wangdan-fit2cloud e1841c6189 feat: resource-authorization 2025-06-27 18:13:31 +08:00
zhangzhanwei 6c6aa20ff6 feat: New tool and model permission 2025-06-27 18:00:26 +08:00
CaptainB cd25bcf074 refactor: adjust paragraph position handling to insert new paragraphs at the top
--bug=1057642 --user=刘瑞斌 【知识库】文档中添加分段,最后添加的没显示在最上面 https://www.tapd.cn/62980211/s/1719802
2025-06-27 17:59:09 +08:00
shaohuzhang1 276378a9ae
feat: application workflow (#3415) 2025-06-27 17:35:01 +08:00
wxg0103 8468d08eea refactor: Model display creator
--bug=1057605 --user=王孝刚 【模型】模型创建者未显示 https://www.tapd.cn/62980211/s/1719783
2025-06-27 17:32:03 +08:00
liqiang-fit2cloud 9bd490c7ea build: update actions. 2025-06-27 17:20:33 +08:00
wxg0103 a7cbba161c refactor: xfembedding model 2025-06-27 16:34:22 +08:00
CaptainB db58ed8aba fix: allow null and blank values for status and order_by fields in document queries
--bug=1057473 --user=刘瑞斌 【知识库】文档列表通过列表字段筛选文档不生效 https://www.tapd.cn/62980211/s/1719702
2025-06-27 16:28:11 +08:00
wxg0103 efa2335b8d refactor: role setting 2025-06-27 16:13:56 +08:00
zhangzhanwei 62cb3704cf feat: System setting permission 2025-06-27 15:11:57 +08:00
wxg0103 644247b1cb refactor: permission 2025-06-27 15:03:43 +08:00
wxg0103 8f70bacc02 refactor: sql 2025-06-27 14:40:22 +08:00
wxg0103 c1e01e005b feat: role setting 2025-06-27 14:38:32 +08:00
wxg0103 e25544e032 feat: role setting 2025-06-27 14:37:16 +08:00
wxg0103 c5c06254b7 feat: role setting 2025-06-27 14:29:44 +08:00
wangdan-fit2cloud 36e715d319 feat: resource model 2025-06-27 14:26:11 +08:00
zhangzhanwei 8e6ca99ef6 feat: System chat user group permission 2025-06-27 13:39:32 +08:00
CaptainB d251d2bff4 feat: update model loading function and improve dialog opening logic
--bug=1057476 --user=刘瑞斌 【知识库】分段生成问题报错 https://www.tapd.cn/62980211/s/1719522
2025-06-27 13:17:35 +08:00
wxg0103 d0e447774f refactor: model
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-27 11:54:27 +08:00
wangdan-fit2cloud cc20e20f61 feat: bugs 2025-06-27 11:39:05 +08:00
dependabot[bot] 0eeb79a977 build(deps): bump the python-dependencies group with 11 updates
Updates the requirements on [python-dotenv](https://github.com/theskumar/python-dotenv), [langchain-openai](https://github.com/langchain-ai/langchain), [langchain-anthropic](https://github.com/langchain-ai/langchain), [langchain-community](https://github.com/langchain-ai/langchain), [langgraph](https://github.com/langchain-ai/langgraph), zhipuai, [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [anthropic](https://github.com/anthropics/anthropic-sdk-python), [dashscope](https://dashscope.aliyun.com/) and [pypdf](https://github.com/py-pdf/pypdf) to permit the latest version.

Updates `python-dotenv` to 1.1.1
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v1.1.0...v1.1.1)

Updates `langchain-openai` to 0.3.25
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.24...langchain-openai==0.3.25)

Updates `langchain-anthropic` to 0.3.16
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-anthropic==0.3.15...langchain-anthropic==0.3.16)

Updates `langchain-community` to 0.3.26
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain==0.3.25...langchain==0.3.26)

Updates `langgraph` to 0.4.10
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.4.8...0.4.10)

Updates `zhipuai` to 2.1.5.20250626

Updates `boto3` to 1.38.44
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.39...1.38.44)

Updates `tencentcloud-sdk-python` to 3.0.1410
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1405...3.0.1410)

Updates `anthropic` to 0.55.0
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.54.0...v0.55.0)

Updates `dashscope` to 1.23.6

Updates `pypdf` to 5.6.1
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/5.6.0...5.6.1)

---
updated-dependencies:
- dependency-name: python-dotenv
  dependency-version: 1.1.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.25
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-anthropic
  dependency-version: 0.3.16
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-community
  dependency-version: 0.3.26
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.10
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: zhipuai
  dependency-version: 2.1.5.20250626
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.44
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1410
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: anthropic
  dependency-version: 0.55.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: dashscope
  dependency-version: 1.23.6
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pypdf
  dependency-version: 5.6.1
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-27 11:33:40 +08:00
CaptainB 8bc776af2b feat: update folder_id retrieval to use workspace ID in knowledge list loading
--bug=1057585 --user=刘瑞斌 【知识库】文档 、文档分段 迁移报错,知识库下拉框无数据 https://www.tapd.cn/62980211/s/1719493
2025-06-27 11:26:14 +08:00
zhangzhanwei 86ee4598ee feat: System chat user permission 2025-06-27 11:25:19 +08:00
wxg0103 594ca6cd89 refactor: model 2025-06-27 11:18:02 +08:00
CaptainB 173f7e8321 fix: ensure limit parameter is an integer in split_model initialization
--bug=1057597 --user=刘瑞斌 【知识库】通用知识库高级分段生成预览为空 https://www.tapd.cn/62980211/s/1719490
2025-06-27 11:06:55 +08:00
wangdan-fit2cloud d2f6d34a18 fix: bugs 2025-06-27 10:59:58 +08:00
wangdan-fit2cloud fdb3bc19c1 fix: fix 2025-06-27 10:49:02 +08:00
wangdan-fit2cloud 89cf0ca41a feat: application 2025-06-27 10:30:06 +08:00
shaohuzhang1 c95a49c972
fix: application related knowledge (#3407)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-26 22:38:32 +08:00
shaohuzhang1 3447da58bd
fix: application related knowledge (#3406) 2025-06-26 22:31:12 +08:00
wangdan-fit2cloud ac545f9122 fix: bugs 2025-06-26 22:11:56 +08:00
wangdan-fit2cloud f3fff4a26e feat: resource 2025-06-26 21:33:09 +08:00
wangdan-fit2cloud d90805acbb fix: bugs 2025-06-26 21:13:52 +08:00
zhangzhanwei 530928af38 fix: System router permission 2025-06-26 21:03:10 +08:00
wangdan-fit2cloud d626601672 feat: common 2025-06-26 20:25:33 +08:00
CaptainB c2c1d4eeb9 feat: make folder_id optional in KnowledgeSerializer query
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
--bug=1057489 --user=刘瑞斌 【知识库】-文档迁移功能报错,无法选择文件夹和目标知识库 https://www.tapd.cn/62980211/s/1719276
2025-06-26 20:13:56 +08:00
wxg0103 20010ee227 refactor: model 2025-06-26 20:06:26 +08:00
wxg0103 e1c37636d6 refactor: resource model list 2025-06-26 19:54:28 +08:00
wxg0103 3bab501f08 refactor: i18n 2025-06-26 19:53:56 +08:00
zhangzhanwei 3f1a60f388 fix: Shared resource permission 2025-06-26 19:45:16 +08:00
CaptainB 0c2a17ed56 feat: update get_query_set method to accept workspace_manage and is_x_pack_ee parameters 2025-06-26 19:43:45 +08:00
wxg0103 75df321783 refactor: model list 2025-06-26 19:08:23 +08:00
CaptainB 8fc074fecb feat: enhance tool query logic and add user-specific SQL files for improved access control 2025-06-26 19:06:58 +08:00
CaptainB 8b960b96a1 feat: implement automatic authorization and cache refresh for new tool creation 2025-06-26 19:06:58 +08:00
teukkk 094386a613 feat: mobile chat left menu 2025-06-26 18:52:50 +08:00
zhangzhanwei 06095ad94f feat: System role permission 2025-06-26 18:39:03 +08:00
shaohuzhang1 f13a29a611
fix: model share (#3402) 2025-06-26 18:18:19 +08:00
shaohuzhang1 15bfe239a4
fix: route (#3401) 2025-06-26 18:05:30 +08:00
CaptainB 974f61d2d9 feat: update document and paragraph status default to use get_default_status function 2025-06-26 17:48:18 +08:00
shaohuzhang1 8ce3a44ef8
fix: list shard model (#3399) 2025-06-26 17:40:37 +08:00
wangdan-fit2cloud cf674ec981 feat: bugs 2025-06-26 17:36:45 +08:00
wxg0103 e8f80094ce refactor: model 2025-06-26 17:26:50 +08:00
CaptainB d49f448a5f fix: correct image path replacement logic in zip_split_handle 2025-06-26 17:02:34 +08:00
wangdan-fit2cloud 6b167d7830 fix: bugs 2025-06-26 17:00:19 +08:00
wxg0103 0886459bad refactor: Add log records for image understanding
--bug=1057568 --user=王孝刚 【模型管理】阿里云百炼视觉模型输入错误的基础模型可正常创建 https://www.tapd.cn/62980211/s/1719185
2025-06-26 16:58:18 +08:00
CaptainB 37ac79dc5a feat: import File model in zip_split_handle for enhanced functionality
--bug=1057478 --user=刘瑞斌 【知识库】通用知识库上传ZIP文件,分段失败 https://www.tapd.cn/62980211/s/1719181
2025-06-26 16:56:28 +08:00
wangdan-fit2cloud 91dbe1907c feat: workspace 2025-06-26 16:36:15 +08:00
dataeaseShu 7a7d353433 fix(system): bug fix 2025-06-26 16:29:23 +08:00
CaptainB e24a2001c5 feat: refine regex patterns in text_split_handle for improved comment detection
--bug=1057526 --user=刘瑞斌 【知识库】markdown文件导入知识库,分段详情中代码块展示异常 https://www.tapd.cn/62980211/s/1719131
2025-06-26 16:23:32 +08:00
CaptainB 56fe631ed6 feat: update knowledge export methods to use knowledge_id for filtering documents and paragraphs
--bug=1057505 --user=刘瑞斌 【知识库】导出知识库是空白的 https://www.tapd.cn/62980211/s/1719080
2025-06-26 15:55:37 +08:00
CaptainB dfa66c1d23 feat: adjust position handling in paragraph serializer to ensure integer type
--bug=1057467 --user=刘瑞斌 【知识库】企业版-知识库文档中添加分段失败 https://www.tapd.cn/62980211/s/1719011
2025-06-26 15:15:50 +08:00
zhangzhanwei abcf96a29c feat: System usermanage permission 2025-06-26 14:35:47 +08:00
wangdan-fit2cloud 683b0bcf18 feat: role 2025-06-26 14:33:23 +08:00
CaptainB bf4e98b7fc feat: update label for tool name in ToolListContainer component
--bug=1057412 --user=刘瑞斌 【工具】工具搜索字段名称错误,写成了模型名称 https://www.tapd.cn/62980211/s/1718965
2025-06-26 14:28:17 +08:00
dataeaseShu 137fc01c76
fix(paragraph): bug fix (#3396) 2025-06-26 14:22:20 +08:00
shaohuzhang1 ce5850b6d4
feat: tool model resource permission (#3395) 2025-06-26 14:20:57 +08:00
wxg0103 ac7e39fb18 refactor: model 2025-06-26 14:15:08 +08:00
zhangzhanwei b08a1088a2 fix: System workspace permission 2025-06-26 14:13:16 +08:00
CaptainB ad72517ebe feat: add validation for folder name uniqueness and parent folder assignment
--bug=1057431 --user=刘瑞斌 【工具】文件夹编辑,可以修改名称与同级文件夹重名 https://www.tapd.cn/62980211/s/1718940
2025-06-26 14:06:30 +08:00
CaptainB 4320270857 feat: update workspace authorization models to use workspace_id instead of workspace 2025-06-26 12:29:26 +08:00
wxg0103 183d6c74d5 refactor: knowledge model
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-26 11:40:57 +08:00
wxg0103 f463786710 fix: PASSWORD_REGEX 2025-06-26 10:44:19 +08:00
zhangzhanwei dd63b853d0 feat: Document download permission 2025-06-26 10:28:12 +08:00
wangdan-fit2cloud b5bbf9d0bb feat: layout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-25 21:58:14 +08:00
shaohuzhang1 ea7b8547be
fix: user permission (#3390) 2025-06-25 20:37:27 +08:00
wangdan-fit2cloud c00cf22900 fix: bugs 2025-06-25 19:58:57 +08:00
teukkk 4c66fa998f refactor: chat left menu avatar
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-25 19:22:17 +08:00
CaptainB bdba507090 feat: reduce maximum description length in CreateFolderDialog to improve user input validation
--bug=1057414 --user=刘瑞斌 【工具】文件夹描述=256,保存时报错 https://www.tapd.cn/62980211/s/1718745
2025-06-25 19:12:42 +08:00
zhangzhanwei bac0f79c93 feat: Application router permission 2025-06-25 19:10:54 +08:00
wangdan-fit2cloud f6c5d6d9b7 feat: bugs 2025-06-25 18:57:14 +08:00
CaptainB 67bb79079f feat: update logging configuration for improved log level management and format 2025-06-25 18:48:10 +08:00
wxg0103 f9452830d3 fix: nick_name limit 20 2025-06-25 18:44:17 +08:00
wxg0103 c4bf19c92b refactor: user manage add filter 2025-06-25 18:39:19 +08:00
wxg0103 a26c4320dd refactor: user filter 2025-06-25 18:38:50 +08:00
shaohuzhang1 6cdd8ffe39
feat: add download operate permission (#3388) 2025-06-25 17:57:55 +08:00
teukkk 4a38b2563b fix: add user 2025-06-25 17:49:04 +08:00
wxg0103 86e87e554e fix: User management does not display roles
--bug=1057486 --user=王孝刚 【用户管理】企业版-用户管理列表-未显示角色字段 https://www.tapd.cn/62980211/s/1718526
2025-06-25 17:40:18 +08:00
CaptainB 40fcc5bcb9 refactor: replace logging calls with maxkb_logger for consistency 2025-06-25 17:37:09 +08:00
wxg0103 3a2294e53b fix: chat user change error 2025-06-25 17:30:12 +08:00
zhangzhanwei c3ee492176 feat: Application permission 2025-06-25 17:20:11 +08:00
CaptainB a73e0b10f9 refactor: replace logging with maxkb_logger for consistent logging across modules 2025-06-25 17:00:18 +08:00
wangdan-fit2cloud 6724f6e9d1 feat: api 2025-06-25 16:59:54 +08:00
shaohuzhang1 4a90127a92
fix: Application workspace restrictions (#3385) 2025-06-25 16:56:10 +08:00
teukkk d252a2546e feat: chat left menu avatar 2025-06-25 16:50:45 +08:00
CaptainB fe8f87834d refactor: replace logging with maxkb_logger for consistent logging across modules 2025-06-25 16:46:50 +08:00
wxg0103 fe066aea68 fix: Modify password verification regular expression
--bug=1057464 --user=王孝刚 【对话用户】用户-修改密码-修改密码为「Abc123」,修改成功了-与密码规则不符 https://www.tapd.cn/62980211/s/1718453
2025-06-25 16:29:06 +08:00
CaptainB 3aa0847506 refactor: replace print statements with logging for improved error tracking 2025-06-25 16:18:19 +08:00
wxg0103 13dc156a58 fix: model save failed message error
--bug=1057469 --user=王孝刚 【模型】 删除模型提示信息和需求不符 https://www.tapd.cn/62980211/s/1718440
2025-06-25 16:11:04 +08:00
liqiang-fit2cloud 0e3ae6a8f8 feat: add MAXKB_LOG_LEVEL env. 2025-06-25 16:05:02 +08:00
wxg0103 b06d5685f2 refactor: i18n 2025-06-25 15:15:21 +08:00
CaptainB f1e6b5adec fix: update FileSerializer operation to use data dictionary for file ID 2025-06-25 15:10:01 +08:00
CaptainB 7f09a22518 feat: enhance copyTool function to load tool data asynchronously
--bug=1057318 --user=刘瑞斌 【工具】复制工具,工具内容没有复制到新的工具中 https://www.tapd.cn/62980211/s/1718332
2025-06-25 15:10:01 +08:00
shaohuzhang1 d1fe600d80
fix: auto route (#3384) 2025-06-25 15:07:12 +08:00
wangdan-fit2cloud 33a2a683e1 feat: download document 2025-06-25 15:02:18 +08:00
shaohuzhang1 68f26d63d7
fix: Model data processing (#3383) 2025-06-25 14:52:06 +08:00
CaptainB 8f62257fee chore: improve URL formatting and readability in urls.py 2025-06-25 14:51:47 +08:00
wxg0103 2f9052279a fix: VolcanicEngine tts error 2025-06-25 14:47:08 +08:00
wxg0103 9f684dadd2 refactor: add aliyun llm example
--bug=1057451 --user=王孝刚 【模型】-阿里百炼的基础模型中增加千问3的模型,保持和v1相同 https://www.tapd.cn/62980211/s/1718320
2025-06-25 14:34:29 +08:00
wxg0103 44c318e8c8 fix: VolcanicEngine stt error
--bug=1057449 --user=王孝刚 【模型】添加火山语音识别模型失败 https://www.tapd.cn/62980211/s/1718297
2025-06-25 14:28:31 +08:00
wangdan-fit2cloud 69e8537d9c fix: bugs 2025-06-25 14:12:47 +08:00
shaohuzhang1 c990ad7215
feat: permission route (#3381) 2025-06-25 13:52:38 +08:00
wangdan-fit2cloud 46fb1b1b4e feat: shared 2025-06-25 12:55:51 +08:00
CaptainB 2570114edf feat: add icon attribute to internal tool data structure 2025-06-25 12:41:18 +08:00
wangdan-fit2cloud 6ce02abc33 feat: model 2025-06-25 12:32:57 +08:00
CaptainB 83e9a8ce98 feat: add folder_id support in knowledge and tool modules 2025-06-25 12:17:06 +08:00
wxg0103 66ab7fdf34 refactor: default embedding model edit workspace_id 2025-06-25 11:42:56 +08:00
CaptainB 87a141f5cc fix: update condition to check for empty init_params in ToolApi response 2025-06-25 11:42:04 +08:00
wangdan-fit2cloud 12e8242365 feat: shared
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-25 11:19:43 +08:00
zhangzhanwei 2364bd275a feat: Shared knowledge permission 2025-06-25 11:18:52 +08:00
CaptainB 73ee9bf602 fix: replace get_byte() with get_bytes() for consistency in file handling 2025-06-25 10:55:48 +08:00
CaptainB 758f424000 fix: replace get_byte() with get_bytes() for consistency in file handling 2025-06-25 10:54:36 +08:00
wxg0103 93530e0a9b fix: shared model edit error 2025-06-25 10:52:43 +08:00
wangdan-fit2cloud 656c035b53 fix: resource-management 2025-06-25 10:47:00 +08:00
wangdan-fit2cloud cd145b68d8 fix: model 2025-06-25 10:36:39 +08:00
liqiang-fit2cloud e16524d574 build: reuse v1.0.1 image. 2025-06-25 10:29:49 +08:00
wangdan-fit2cloud 1c96897d01 feat: shared
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-24 22:12:26 +08:00
shaohuzhang1 bba7a60789
feat: route permission (#3379) 2025-06-24 21:46:02 +08:00
shaohuzhang1 be6dd24b4b
feat: route permission(#3378) 2025-06-24 21:16:43 +08:00
liqiang-fit2cloud 65959c8caf build: reuse v1.0.1 image. 2025-06-24 19:57:09 +08:00
liqiang-fit2cloud 86489f4b25 build: reuse v1.0.1 image. 2025-06-24 19:56:13 +08:00
liqiang-fit2cloud 1daf84e954 build: reuse v1.0.1 image. 2025-06-24 19:46:38 +08:00
liqiang-fit2cloud 90249257c6 Merge remote-tracking branch 'origin/v2' into v2 2025-06-24 19:41:54 +08:00
liqiang-fit2cloud 9ddee4e70f build: reuse v1.0.1 image. 2025-06-24 19:41:44 +08:00
wangdan-fit2cloud 70f8abe4db feat: knowledge 2025-06-24 19:36:52 +08:00
liqiang-fit2cloud 30c4849ae4 build: reuse v1.0.1 image. 2025-06-24 19:35:49 +08:00
wxg0103 f248697794 refactor: ui warning message 2025-06-24 19:14:22 +08:00
wangdan-fit2cloud 0daa4e0091 feat: knowledge
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-24 18:52:29 +08:00
shaohuzhang1 fc6b087d75
fix: User delete resource delete policy (#3376) 2025-06-24 18:46:20 +08:00
liqiang-fit2cloud 1bbc693618 Merge remote-tracking branch 'origin/v2' into v2 2025-06-24 18:45:05 +08:00
liqiang-fit2cloud 5a1acc1a2b build: update dockerfiles. 2025-06-24 18:44:55 +08:00
wangdan-fit2cloud 7210e5d1d5 feat: knowledg 2025-06-24 18:44:45 +08:00
liqiang-fit2cloud 0d06343dc3 Merge remote-tracking branch 'origin/v2' into v2 2025-06-24 18:23:39 +08:00
liqiang-fit2cloud 0fd171ff2f build: update dockerfiles. 2025-06-24 18:23:30 +08:00
wxg0103 ef8c555108 refactor: ui 2025-06-24 18:21:20 +08:00
liqiang-fit2cloud 263872d5a3 Merge remote-tracking branch 'origin/v2' into v2 2025-06-24 18:20:54 +08:00
liqiang-fit2cloud 01e89eed30 build: update dockerfiles. 2025-06-24 18:20:45 +08:00
teukkk 0c54f5ba34 refactor: chat left menu 2025-06-24 18:18:39 +08:00
zhangzhanwei 089b6900ed feat: Shared model permission 2025-06-24 18:16:32 +08:00
liqiang-fit2cloud db2eaf4681 build: update dockerfiles. 2025-06-24 18:11:33 +08:00
shaohuzhang1 31c92fb492
fix: Application user delete policy (#3375) 2025-06-24 17:56:20 +08:00
CaptainB d0f70ab466 feat: add workspace_id field to Create serializer
--bug=1057315 --user=刘瑞斌 【文件夹】-非默认工作空间,在根目录下创建文件夹失败 https://www.tapd.cn/62980211/s/1717846
2025-06-24 17:52:57 +08:00
wangdan-fit2cloud 1dab1ebc47 feat: model 2025-06-24 17:45:02 +08:00
shaohuzhang1 275ec80701
feat: chat record (#3374) 2025-06-24 17:44:59 +08:00
zhangzhanwei d51ef49f54 fix: knowledge router permission 2025-06-24 17:44:18 +08:00
liqiang-fit2cloud 9c866b1907 build: update dockerfiles. 2025-06-24 17:38:02 +08:00
liqiang-fit2cloud 324a1b54c6 build: update dockerfiles. 2025-06-24 17:24:25 +08:00
liqiang-fit2cloud da0d4199af build: update dockerfiles. 2025-06-24 17:19:13 +08:00
zhangzhanwei 85ebd22c21 feat: Share tool permission 2025-06-24 17:17:31 +08:00
liqiang-fit2cloud a85cf51f42 build: update dockerfiles. 2025-06-24 17:03:34 +08:00
liqiang-fit2cloud b646163a62 Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2 2025-06-24 17:02:10 +08:00
liqiang-fit2cloud 343d66d6d8 build: update dockerfiles. 2025-06-24 17:01:49 +08:00
shaohuzhang1 01a423235f
fix: route ui (#3371) 2025-06-24 17:00:50 +08:00
liqiang-fit2cloud 2fe953092f build: update dockerfiles. 2025-06-24 16:59:26 +08:00
liqiang-fit2cloud 0a60b87800 build: update dockerfiles. 2025-06-24 16:58:12 +08:00
liqiang-fit2cloud 996ebea316 build: update dockerfiles. 2025-06-24 16:57:00 +08:00
wangdan-fit2cloud bb0ad0a27b feat: tool 2025-06-24 16:55:41 +08:00
CaptainB 77295d2c13 feat: update Dockerfile to adjust permissions for Python binaries and restrict access to certain files
--bug=1057357 --user=刘瑞斌 【工具】工具执行沙箱的权限没有做限制 https://www.tapd.cn/62980211/s/1717636
2025-06-24 16:21:10 +08:00
liqiang-fit2cloud 359f9c546d build: remove useless files. 2025-06-24 16:13:59 +08:00
CaptainB 8d5c3e6068 feat: refresh cache for permission list on knowledge save 2025-06-24 16:11:39 +08:00
liqiang-fit2cloud 214499372c build: remove useless files. 2025-06-24 15:53:34 +08:00
liqiang-fit2cloud 277142c6f0 build: remove useless files. 2025-06-24 15:50:25 +08:00
CaptainB 4747dc6c75 feat: update image paths in detail documentation for various functions 2025-06-24 15:47:56 +08:00
zhangzhanwei 58a44b315e feat: Knowledge problem permission 2025-06-24 15:41:25 +08:00
wxg0103 c253e8b696 refactor: remove print 2025-06-24 15:30:42 +08:00
zhangzhanwei 69e60b5800 feat: Knowledge permission list 2025-06-24 15:21:41 +08:00
liqiang-fit2cloud 66bb8f605d refactor: change logfile name. 2025-06-24 15:13:15 +08:00
shaohuzhang1 e98ecf4c2f
fix: application knowledge list (#3368) 2025-06-24 15:11:08 +08:00
wxg0103 e7c0d8eaf1 refactor: optimize prompt information
--bug=1057384 --user=王孝刚 【对话用户】用户组添加成员,按钮应该是添加,提示信息也应该是添加成功 https://www.tapd.cn/62980211/s/1717521
2025-06-24 15:10:17 +08:00
wangdan-fit2cloud f4410b25ce fix: fix 2025-06-24 15:08:52 +08:00
wangdan-fit2cloud a89f28a2ae fix: fix 2025-06-24 15:08:22 +08:00
shaohuzhang1 6dfcc5e54d
fix: application knowledge list (#3367) 2025-06-24 15:01:43 +08:00
wangdan-fit2cloud db7b267326 feat: tool 2025-06-24 14:59:55 +08:00
wangdan-fit2cloud 11fa3c4814 feat: tool 2025-06-24 14:51:29 +08:00
CaptainB 2ab57802f4 feat: update sys.path to exclude multiple directories in tool_code.py 2025-06-24 14:45:05 +08:00
shaohuzhang1 28efdb49f7
fix: resource permission (#3366) 2025-06-24 14:09:57 +08:00
CaptainB d459beb1a0 feat: update Python package paths in tool_code.py and Dockerfile 2025-06-24 14:08:18 +08:00
shaohuzhang1 af6f88a616
fix: application knowledge list (#3365) 2025-06-24 13:45:36 +08:00
CaptainB 3a91562289 feat: refactor tool_code.py to use sys.executable and update Dockerfile for diskcache2 installation 2025-06-24 13:35:02 +08:00
CaptainB 4a6d8c9067 feat: enhance condition check for tool initialization parameters in index.vue 2025-06-24 11:17:27 +08:00
shaohuzhang1 1a5db6b5ea
fix: user role (#3362) 2025-06-24 11:14:51 +08:00
wxg0103 a8127efd86 refactor: add valid 2025-06-24 11:09:19 +08:00
teukkk 50245bc723 refactor: toolStore 2025-06-24 10:49:01 +08:00
CaptainB f1f8229d33 feat: update Dockerfile to improve Python virtual environment setup and install diskcache2 2025-06-24 10:40:22 +08:00
shaohuzhang1 869812d87b
fix: application list (#3359)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-24 10:29:37 +08:00
CaptainB 4001d0cded feat: update copyTool function to fetch tool data asynchronously 2025-06-24 10:13:41 +08:00
shaohuzhang1 7f9caca5c7
feat: historical conversation (#3358)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-23 21:28:10 +08:00
zhangzhanwei fd6b9c00f6 feat: Permission list 2025-06-23 21:03:39 +08:00
zhangzhanwei 22e3bc1aa4 feat: Model permission 2025-06-23 20:43:39 +08:00
shaohuzhang1 dca48d1388
feat: Chat vote (#3355) 2025-06-23 20:19:32 +08:00
CaptainB 01ed7045e0 feat: update Dockerfile to set up Python virtual environment and adjust memory settings for builds 2025-06-23 19:42:28 +08:00
wangdan-fit2cloud 05f1bbbde6 feat: resource-authorization 2025-06-23 19:37:48 +08:00
wxg0103 eeb101d150 refactor: i18n 2025-06-23 19:04:38 +08:00
shaohuzhang1 6d1bbd9db7
fix: resource permission (#3354) 2025-06-23 18:17:34 +08:00
wxg0103 abf8c6a62e refactor: delete workspace add warning message 2025-06-23 18:14:31 +08:00
wxg0103 0b64e92a33 fix: remove workspace message error
--bug=1057308 --user=王孝刚 【工作空间】删除有工具的工作空间-应该不允许删除 https://www.tapd.cn/62980211/s/1717164
2025-06-23 18:11:15 +08:00
zhangzhanwei 2468717809 feat: Tool permission 2025-06-23 17:58:27 +08:00
wangdan-fit2cloud add71a4bc2 fix: resource_permission 2025-06-23 17:54:28 +08:00
zhangzhanwei 0f8fe31e52 feat: Tool permission
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-23 17:45:53 +08:00
wxg0103 92fd481aff refactor: shared model 2025-06-23 17:22:07 +08:00
zhangzhanwei 716b073b80 fix: System APIKEY permission 2025-06-23 17:18:20 +08:00
shaohuzhang1 4a722575df
fix: knowledge list (#3349) 2025-06-23 17:08:13 +08:00
wxg0103 516c8ea9d2 refactor: shared model 2025-06-23 17:06:19 +08:00
teukkk b2465b28dc refactor: toolStoreDialog 2025-06-23 16:55:00 +08:00
shaohuzhang1 b971a2c15f
fix: knowledge list (#3348) 2025-06-23 16:54:48 +08:00
wxg0103 37a2041d8d refactor: shared model 2025-06-23 16:43:08 +08:00
wangdan-fit2cloud 2c20733957 fix: redirect 2025-06-23 16:09:58 +08:00
shaohuzhang1 f84aa3ec6c
feat: permission split (#3347) 2025-06-23 15:52:03 +08:00
wangdan-fit2cloud c0979e2363 fix: bug 2025-06-23 15:44:06 +08:00
shaohuzhang1 f32f158876
fix: application permission label (#3345) 2025-06-23 13:46:50 +08:00
shaohuzhang1 a00860528a
fix: application query (#3344) 2025-06-23 12:09:44 +08:00
CaptainB bb109d65cf feat: update permission checks to include workspace-specific roles for knowledge document operations 2025-06-23 11:47:46 +08:00
teukkk 4ae803e7c5 style: permission setting 2025-06-23 11:25:19 +08:00
CaptainB 3e9c3c0602 feat: update UUID generation to use uuid7 for improved uniqueness across models 2025-06-23 11:19:20 +08:00
CaptainB 1a60d8c972 feat: add dependency for system_manage in initial migration and update subproject commit hashes 2025-06-23 10:57:54 +08:00
wxg0103 7e67fbc592 refactor: add model initial sql 2025-06-23 10:35:42 +08:00
shaohuzhang1 06e910b630
feat: application publish (#3342) 2025-06-23 10:35:21 +08:00
CaptainB b496a2b2c5 feat: update migration files and add new models for application settings and chat functionality 2025-06-23 10:25:45 +08:00
CaptainB 47a3489a0a fix: add LOG_DIR import and update log directory paths
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-06-21 22:42:46 +08:00
CaptainB 23b47f24e7 fix: add folder_id to ToolSerializer initialization 2025-06-21 15:06:13 +08:00
CaptainB 0e79d2eb37 fix: correct method from del to put in delMulDocument function 2025-06-21 14:43:28 +08:00
CaptainB c598a1586e fix: specify application.id in permission query 2025-06-21 12:48:30 +08:00
wangdan-fit2cloud cb60220cb8 feat: shared 2025-06-21 11:22:40 +08:00
wangdan-fit2cloud 65a65de03e feat: theme
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-21 03:55:48 +08:00
wangdan-fit2cloud 190d25857f feat: shared workspace 2025-06-21 03:18:47 +08:00
shaohuzhang1 9c73c8dea0
fix: Complete application permissions (#3339)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-20 22:40:48 +08:00
shaohuzhang1 145e96594f
fix: Complete application permissions (#3338) 2025-06-20 22:31:41 +08:00
dataeaseShu 181848d219
fix(authorization): knowledge (#3336) 2025-06-20 21:13:31 +08:00
zhangzhanwei 1468bc2056 feat: WorkspaceManager permission 2025-06-20 21:11:08 +08:00
teukkk 0bed184a2c refactor: toolStoreDialog 2025-06-20 19:31:58 +08:00
CaptainB f77dd47403 feat: remove unnecessary edit permission checks from dropdown items 2025-06-20 18:55:29 +08:00
wangdan-fit2cloud 687fd6cb84 feat: resource-authorization 2025-06-20 18:11:56 +08:00
teukkk 1287da6ed0 feat: toolStoreDialog 2025-06-20 18:04:00 +08:00
CaptainB 9777c92e34 feat: add automatic permission assignment for knowledge creators 2025-06-20 17:50:49 +08:00
shaohuzhang1 f303fc4594
feat: workspace manage role (#3335) 2025-06-20 17:26:47 +08:00
zhangzhanwei 2336f381c1 fix: Common user permission 2025-06-20 17:22:05 +08:00
CaptainB 717c204d22 fix: update template_id assignment in tool creation logic 2025-06-20 17:16:44 +08:00
shaohuzhang1 35d86c6484
feat: workspace manage role (#3333) 2025-06-20 17:15:55 +08:00
wangdan-fit2cloud 7f1f9ccd3b feat: system 2025-06-20 17:13:56 +08:00
wxg0103 66606bcaec refactor: add application access 2025-06-20 17:13:01 +08:00
CaptainB ee5c199449 fix: update ModelCard.vue to use 'model' instead of 'scope.row' in authorized workspace dialog 2025-06-20 17:08:02 +08:00
liqiang-fit2cloud 0c8a80897b fix: remove REDIS env from sandbox. 2025-06-20 16:29:04 +08:00
wxg0103 c46c631d52 refactor: i18n 2025-06-20 15:52:21 +08:00
wxg0103 21bee7daeb refactor: add operation log 2025-06-20 15:44:22 +08:00
CaptainB 4c41a40438 feat: add user role permissions to workspace operations 2025-06-20 15:24:39 +08:00
CaptainB c8a5048c7c feat: add user role permissions to workspace operations 2025-06-20 15:17:36 +08:00
shaohuzhang1 961e67e98d
fix: resource permission group list (#3331)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-20 14:35:58 +08:00
shaohuzhang1 5e67c0b40a
fix: resource permission group list (#3330) 2025-06-20 14:26:15 +08:00
wxg0103 1f5587eeeb fix: workspace add member 2025-06-20 14:23:25 +08:00
wxg0103 9f0b0c1247 refactor: workspace ui 2025-06-20 14:20:18 +08:00
CaptainB 83e9b45e79 feat: handle None case for knowledge_dict in knowledge.py 2025-06-20 14:01:13 +08:00
zhangzhanwei 327d34ae1e fix: Knowledge create permission 2025-06-20 13:43:03 +08:00
shaohuzhang1 a39010bc4a
fix: resource auth (#3327) 2025-06-20 13:36:28 +08:00
CaptainB 01a25efe1c feat: standardize label field values in tool SQL insert statements 2025-06-20 13:24:29 +08:00
CaptainB 9a89565931 feat: update community file with new hash value 2025-06-20 12:46:46 +08:00
CaptainB f646a5caad fix: update icon paths for various tools in internal_tool.sql 2025-06-20 12:24:23 +08:00
shaohuzhang1 a9d106ddd4
fix: Resource authorization modify (#3326)
Co-authored-by: zhangzhanwei <zhanwei.zhang@fit2cloud.com>
2025-06-20 12:00:39 +08:00
CaptainB 63abffec3c feat: add label field to tool serializer and SQL queries 2025-06-20 11:57:55 +08:00
CaptainB e13bd094fa feat: add label field to tool model and update SQL insert statements 2025-06-20 11:52:51 +08:00
dependabot[bot] f54c873c20 build(deps): bump the python-dependencies group with 7 updates
Updates the requirements on [django-redis](https://github.com/jazzband/django-redis), [langchain-openai](https://github.com/langchain-ai/langchain), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [dashscope](https://dashscope.aliyun.com/), [python-docx](https://github.com/python-openxml/python-docx) and [django-apscheduler](https://github.com/jcass77/django-apscheduler) to permit the latest version.

Updates `django-redis` to 6.0.0
- [Release notes](https://github.com/jazzband/django-redis/releases)
- [Changelog](https://github.com/jazzband/django-redis/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jazzband/django-redis/compare/5.4.0...6.0.0)

Updates `langchain-openai` to 0.3.24
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.23...langchain-openai==0.3.24)

Updates `boto3` to 1.38.39
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.36...1.38.39)

Updates `tencentcloud-sdk-python` to 3.0.1405
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1402...3.0.1405)

Updates `dashscope` to 1.23.5

Updates `python-docx` to 1.2.0
- [Changelog](https://github.com/python-openxml/python-docx/blob/master/HISTORY.rst)
- [Commits](https://github.com/python-openxml/python-docx/compare/v1.1.2...v1.2.0)

Updates `django-apscheduler` to 0.7.0
- [Release notes](https://github.com/jcass77/django-apscheduler/releases)
- [Changelog](https://github.com/jcass77/django-apscheduler/blob/develop/docs/changelog.md)
- [Commits](https://github.com/jcass77/django-apscheduler/compare/v0.6.2...v0.7.0)

---
updated-dependencies:
- dependency-name: django-redis
  dependency-version: 6.0.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.24
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.39
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1405
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: dashscope
  dependency-version: 1.23.5
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: python-docx
  dependency-version: 1.2.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: django-apscheduler
  dependency-version: 0.7.0
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-20 11:39:08 +08:00
wangdan-fit2cloud c38906530d fix: icon 2025-06-20 11:13:42 +08:00
wxg0103 6c12acd5d4 refactor: ce 404 2025-06-20 11:08:05 +08:00
wxg0103 d2ec6d558b fix: model add workspace_id 2025-06-20 10:40:51 +08:00
shaohuzhang1 4af876f6a8
fix: permission (#3325) 2025-06-20 10:17:09 +08:00
shaohuzhang1 f40e625ee1
fix: workspace (#3320)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-19 21:43:57 +08:00
wangdan-fit2cloud 7acdd887bf feat: document 2025-06-19 21:33:37 +08:00
CaptainB 73df001e41 fix: change scope parameter from 'WORKSPACE' to 'SHARED' in getList function 2025-06-19 20:38:16 +08:00
wangdan-fit2cloud 72d9833038 feat: paragraph 2025-06-19 20:33:25 +08:00
shaohuzhang1 ba078a9aab
fix: user role (#3319) 2025-06-19 20:29:28 +08:00
shaohuzhang1 ec66640616
feat: Button Permission by workspace role (#3317)
Co-authored-by: zhangzhanwei <zhanwei.zhang@fit2cloud.com>
2025-06-19 20:07:40 +08:00
shaohuzhang1 4e170c6ed7
feat: chat password auth (#3318) 2025-06-19 20:02:52 +08:00
CaptainB 7aa73e7110 fix: make folder_id parameter optional in document.py 2025-06-19 19:45:26 +08:00
CaptainB 2c3eb20592 fix: make folder_id parameter optional in document.py 2025-06-19 19:42:29 +08:00
CaptainB 80b3be46fd fix: add template_id to tool and tool_folder queries in list_tool.sql 2025-06-19 19:39:16 +08:00
CaptainB 35b30c2009 fix: add template_id to tool and tool_folder queries in list_tool.sql 2025-06-19 19:22:31 +08:00
CaptainB c9bdb9ca8a fix: add scope column to tool and folder queries in list_tool.sql 2025-06-19 19:15:46 +08:00
CaptainB 4e87048053 fix: add tool_type field to Tool serializer in tool.py 2025-06-19 19:08:38 +08:00
wangdan-fit2cloud b656d05036 feat: breadcrumb 2025-06-19 18:55:24 +08:00
wangdan-fit2cloud 37c9ef3087 fix: document 2025-06-19 18:55:24 +08:00
CaptainB a6b8cc4a31 fix: add scope parameter to tool serializer in tool.py 2025-06-19 18:38:12 +08:00
CaptainB 317db5ae18 fix: add scope parameter to tool serializer in tool.py 2025-06-19 18:33:43 +08:00
wxg0103 fd73ede7c8 refactor: license ui 2025-06-19 17:50:03 +08:00
CaptainB 5237f8b5fc fix: enhance folder movement validation to prevent exceeding depth limit 2025-06-19 17:45:29 +08:00
wangdan-fit2cloud 004f78c2ba feat: folder 2025-06-19 17:25:57 +08:00
wangdan-fit2cloud 2e15552853 feat: folder 2025-06-19 17:25:57 +08:00
shaohuzhang1 e02d417af9
feat: application assess (#3312) 2025-06-19 17:25:46 +08:00
wxg0103 046e1c72d6 refactor: default group no delete 2025-06-19 16:35:36 +08:00
CaptainB 52ba4d6342 refactor: update model instance retrieval to use workspace_id and enhance document syncing with image linking 2025-06-19 16:20:15 +08:00
teukkk 1e6fabf6c4 fix: add members under the workspace 2025-06-19 16:00:20 +08:00
dataeaseShu c9c2cc8f4c fix(resource management): bug fix 2025-06-19 15:53:08 +08:00
wxg0103 dbfbcdd0b6 refactor: model 2025-06-19 15:50:02 +08:00
wxg0103 c4642a3595 refactor: user 2025-06-19 15:26:29 +08:00
shaohuzhang1 598b72fd12
fix: chat bugs (#3308) 2025-06-19 14:53:24 +08:00
wangdan-fit2cloud 03ec0f3fdf feat: application 2025-06-19 14:39:49 +08:00
wxg0103 af61494779 refactor: user 2025-06-19 14:37:59 +08:00
CaptainB 9891c96e54 fix: correct folder_id path in delete function in folder.ts 2025-06-19 14:37:21 +08:00
teukkk 59e4710a42 refactor: user manage 2025-06-19 14:06:17 +08:00
CaptainB 6d9068c378 fix: validate folder_id in list method and use request.user.id for user_id
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-19 13:23:58 +08:00
CaptainB 11739f1649 fix: set default folder_id to 'default' in getList and add scope to Lark knowledge creation 2025-06-19 12:32:02 +08:00
CaptainB b14c870fd7 refactor: rename embedding to embedding_model_id in BaseForm.vue 2025-06-19 12:16:49 +08:00
wangdan-fit2cloud 698f23c716 feat: application 2025-06-19 11:48:18 +08:00
dataeaseShu 2eff491f15 feat(folder): tree 2025-06-19 11:23:47 +08:00
dataeaseShu db4c10cc56 feat(resource): manage 2025-06-19 11:05:18 +08:00
wxg0103 f8f17ed652 refactor: add license_is_valid 2025-06-19 10:21:00 +08:00
wangdan-fit2cloud 28f315fc3c fix: bug
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-18 21:41:02 +08:00
wangdan-fit2cloud 85138e4e2b feat: document 2025-06-18 21:41:02 +08:00
CaptainB 45908b91ff refactor: update dataset_id to knowledge_id in zip_split_handle.py and tools.py 2025-06-18 21:28:33 +08:00
CaptainB c0b770f41e refactor: update dataset_id to knowledge_id in zip_split_handle.py and tools.py 2025-06-18 21:15:53 +08:00
CaptainB 7dc3cb98ef refactor: comment out RunSQL migration for internal_tool.sql in initial migration
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-18 20:53:40 +08:00
CaptainB ef9e80f900 feat: add batch_cancel_task endpoint to document routes in urls.py 2025-06-18 20:50:46 +08:00
CaptainB ede1e3d645 refactor: update workspace reference to use workspace_name in index.vue, shared_knowledge.py, and shared_tool.py 2025-06-18 20:50:46 +08:00
wxg0103 acd0adaf3c refactor: model nick_name 2025-06-18 20:46:36 +08:00
wxg0103 3af2dc7f7c refactor: model nick_name 2025-06-18 20:44:49 +08:00
wangdan-fit2cloud 516c88a510 feat: document 2025-06-18 20:35:12 +08:00
dataeaseShu 34448a2623 feat(workspace): bug fix 2025-06-18 20:29:52 +08:00
dataeaseShu fdedcc1ee8 feat(resource): manage 2025-06-18 20:29:16 +08:00
zhangzhanwei 8048e73741 feat: Button Permission 2025-06-18 20:27:31 +08:00
shaohuzhang1 d9bd35e664
fix: ui (#3302) 2025-06-18 20:27:26 +08:00
wxg0103 4e5285ce23 refactor: permission 2025-06-18 20:21:25 +08:00
wxg0103 395f3f91ec refactor: i18n 2025-06-18 20:17:01 +08:00
teukkk d0af58d866 fix: bug 2025-06-18 20:04:23 +08:00
wxg0103 9ec3a72352 refactor: i18n 2025-06-18 20:00:44 +08:00
CaptainB 4a58954567 feat: add new SQL queries for embedding and keyword searches 2025-06-18 19:48:20 +08:00
teukkk a7ec04eb8b feat: tagGroup 2025-06-18 19:28:27 +08:00
CaptainB c2081c66e9 refactor: add proxy configuration for /schema in vite.config.ts 2025-06-18 19:25:27 +08:00
wxg0103 9ac2710b24 refactor: permission 2025-06-18 19:21:27 +08:00
CaptainB 89023d14fe refactor: update embedding model ID references in knowledge.py and dataset_lark_serializer.py 2025-06-18 18:46:41 +08:00
CaptainB 63d8906639 refactor: update user reference to use nick_name in index.vue and shared_tool.py 2025-06-18 18:44:48 +08:00
CaptainB 0c881be76d refactor: update user reference to use nick_name in index.vue and shared_tool.py 2025-06-18 18:34:37 +08:00
CaptainB f161082be5 refactor: add chat build step to Dockerfile 2025-06-18 18:18:24 +08:00
shaohuzhang1 dbbd2f95af
fix: model permission (#3300) 2025-06-18 18:16:05 +08:00
CaptainB b9304f0fda refactor: improve SQL queries to include user nicknames and enhance readability 2025-06-18 18:15:16 +08:00
shaohuzhang1 13c5833d42
fix: model permission (#3299) 2025-06-18 18:09:50 +08:00
teukkk 7207e20246 fix: bug 2025-06-18 17:58:04 +08:00
shaohuzhang1 c793f429de
fix: model permission (#3298) 2025-06-18 17:55:31 +08:00
CaptainB c1ca6eafe6 refactor: enhance workspace authorization handling in shared knowledge, model, and tool 2025-06-18 17:54:00 +08:00
teukkk 0af7da36a1 feat: chat user operation 2025-06-18 17:43:41 +08:00
wxg0103 4975c4b2bf refactor: permission 2025-06-18 17:25:24 +08:00
CaptainB d0be683443 refactor: update folder_id and scope in getList function 2025-06-18 17:10:37 +08:00
shaohuzhang1 f7a0ee6184
fix: permission role (#3295) 2025-06-18 17:07:38 +08:00
wangdan-fit2cloud c17dfeda28 fix: workspace 2025-06-18 16:59:11 +08:00
shaohuzhang1 acb00e92d8
fix: permission role (#3294) 2025-06-18 16:49:17 +08:00
CaptainB 9068c1fca0 refactor: simplify serializer field definitions in tool.py 2025-06-18 16:43:08 +08:00
CaptainB 689314f881 fix: update prop name for embedding model in BaseForm.vue 2025-06-18 16:32:23 +08:00
CaptainB ff0cd18521 fix: update prop name for embedding model in BaseForm.vue 2025-06-18 16:32:06 +08:00
wxg0103 ee1ca6fb23 refactor: permission 2025-06-18 16:12:54 +08:00
CaptainB e6c2e4fb13 feat: enhance knowledge retrieval with JSON metadata support 2025-06-18 16:10:24 +08:00
wxg0103 3498d799cf refactor: permission 2025-06-18 16:06:18 +08:00
CaptainB e0cf134bcc fix: rename embedding property to embedding_model_id for consistency 2025-06-18 15:43:48 +08:00
CaptainB 45508b08a3 fix: update file extension from .fx to .tool in export functionality 2025-06-18 15:28:07 +08:00
CaptainB f4e15d76a0 feat: add is_active field to tool and tool_folder queries 2025-06-18 15:22:05 +08:00
CaptainB 707094359b feat: add icon field to tool and tool_folder queries 2025-06-18 15:13:22 +08:00
zhangzhanwei 4eb594598c feat: Permission update 2025-06-18 15:10:01 +08:00
CaptainB c056cd85ac fix: allow null values for tool edit request fields 2025-06-18 15:09:16 +08:00
wangdan-fit2cloud 39d8d5aab2 feat: tool 2025-06-18 14:27:15 +08:00
wxg0103 b16d1d68dc refactor: user 2025-06-18 14:01:43 +08:00
shaohuzhang1 4205dc902f
fix: permission (#3292) 2025-06-18 13:33:49 +08:00
shaohuzhang1 fb4880f3f4
fix: redis db (#3291)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-18 12:24:26 +08:00
shaohuzhang1 5e9a7583a3
fix: ui 404 (#3290) 2025-06-18 12:14:40 +08:00
wxg0103 dca1df59fc refactor: license 2025-06-18 11:31:36 +08:00
shaohuzhang1 a08dd98ffb
fix: permission (#3289) 2025-06-18 11:26:21 +08:00
wangdan-fit2cloud de22ffabc1 feat: folder
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-18 02:10:36 +08:00
wangdan-fit2cloud 449aa63f85 feat: permission 2025-06-17 20:37:17 +08:00
wangdan-fit2cloud 3360c49f4c feat: api 2025-06-17 20:36:47 +08:00
shaohuzhang1 35433b4752
feat: chat auth (#3285) 2025-06-17 20:26:20 +08:00
CaptainB fbc37edf3c fix: include workspace_id in batch save for document processing
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-17 20:20:35 +08:00
teukkk f1d9bfa648 refactor: chat user 2025-06-17 20:18:24 +08:00
shaohuzhang1 d0ba49456f
fix: chat user token (#3284) 2025-06-17 20:08:39 +08:00
wxg0103 0badeb8cef refactor: user group 2025-06-17 19:49:59 +08:00
teukkk fef23579ac refactor: chat user 2025-06-17 19:37:43 +08:00
wxg0103 f2f6f82240 refactor: user group 2025-06-17 19:13:42 +08:00
CaptainB 62d0089c9e fix: change HTTP methods from GET to PUT for document synchronization endpoints 2025-06-17 19:00:30 +08:00
wangdan-fit2cloud 037431487d feat: set workspace_id 2025-06-17 18:39:21 +08:00
wangdan-fit2cloud 89ad56744b feat: lark knowledge 2025-06-17 18:39:21 +08:00
shaohuzhang1 19e8e76386
feat: Permission manage (#3283) 2025-06-17 18:34:06 +08:00
CaptainB 0d36704f63 fix: correct position parameter usage in adjust_position method 2025-06-17 18:31:11 +08:00
teukkk 6c48e803fa feat: createGroupUserDialog 2025-06-17 18:02:05 +08:00
wangdan-fit2cloud 2e24409e5b feat: document 2025-06-17 17:46:17 +08:00
wangdan-fit2cloud 9c284366ff feat: system 2025-06-17 17:46:17 +08:00
wangdan-fit2cloud bdedf49a71 feat: system 2025-06-17 17:46:17 +08:00
wangdan-fit2cloud 3aa804f666 fix: update paragraph ordering and adjust position during bulk creation 2025-06-17 17:46:17 +08:00
CaptainB 9221c7c93a fix: remove default model reference from embedding_model and add export paths for templates 2025-06-17 17:20:00 +08:00
wxg0103 9e7f6fc7a7 refactor: chat ui 2025-06-17 17:08:38 +08:00
shaohuzhang1 2998b2fc2d
fix: chat request (#3281) 2025-06-17 16:50:34 +08:00
teukkk 63b783c8f5 feat: systemChatUserGroup 2025-06-17 16:47:21 +08:00
wxg0103 e4a8f371ab refactor: chat ui 2025-06-17 16:31:07 +08:00
wxg0103 4ba5fa324a refactor: chat ui 2025-06-17 16:18:41 +08:00
shaohuzhang1 845ba0707e
fix: chat route (#3280) 2025-06-17 15:33:15 +08:00
shaohuzhang1 a93d7ca6d7
feat: chat captcha (#3279) 2025-06-17 15:01:59 +08:00
CaptainB 9ab90a7b21 fix: update ToolCreateRequest to ToolEditRequest for validation in edit method 2025-06-17 15:00:41 +08:00
dataeaseShu 555091aa5d fix(paragraph): bug fix 2025-06-17 14:56:09 +08:00
shaohuzhang1 695773df7d
fix: user role (#3278) 2025-06-17 14:47:17 +08:00
CaptainB 3c39c508cf fix: set paragraph positions based on maximum existing position 2025-06-17 14:21:11 +08:00
CaptainB 93daee5bc7 fix: remove required label from workspace_id in Pylint serializer 2025-06-17 14:07:56 +08:00
shaohuzhang1 315ee4bc3e
fix: chat route (#3276) 2025-06-17 13:50:03 +08:00
CaptainB 119f678224 fix: update paragraph ordering and adjust position during bulk creation 2025-06-17 13:23:34 +08:00
shaohuzhang1 00e486c3fe
feat: chat message ui (#3275)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-17 11:58:35 +08:00
wangdan-fit2cloud 6fc0558f63 feat: tool 2025-06-17 11:08:56 +08:00
dataeaseShu edee4bae48 fix(knowledge): bug fix 2025-06-17 10:43:56 +08:00
teukkk d86ad90e31 feat: applicationChatUser 2025-06-17 10:30:59 +08:00
dataeaseShu a892f3075f fix(knowledge document): bug fix 2025-06-17 10:25:29 +08:00
wangdan-fit2cloud d6a301c184 fix: fit
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-16 21:15:35 +08:00
wxg0103 863e08120a refactor: model 2025-06-16 21:04:46 +08:00
wangdan-fit2cloud 8f3efea077 fix: fit 2025-06-16 20:51:13 +08:00
wangdan-fit2cloud 19d15da910 fix: bug 2025-06-16 20:46:56 +08:00
wxg0103 63eefa3ffa refactor: model 2025-06-16 20:46:04 +08:00
wangdan-fit2cloud 721f9384ce fix: bug 2025-06-16 20:33:38 +08:00
wangdan-fit2cloud fcba4c376f fix: bug 2025-06-16 20:20:52 +08:00
CaptainB 77a824235f fix: correct embedding_model_id references in SQL and Vue files 2025-06-16 20:16:23 +08:00
wangdan-fit2cloud 310fd12e87 feat: Permission 2025-06-16 19:58:15 +08:00
wxg0103 1b5d0f78ef refactor: ui
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-16 19:40:51 +08:00
CaptainB 4fba596591 fix: add local model configuration to Dockerfile 2025-06-16 19:18:42 +08:00
wangdan-fit2cloud 189564de21 feat: api 2025-06-16 19:02:08 +08:00
zhangzhanwei cbc552f971 feat: Locations 2025-06-16 18:51:04 +08:00
shaohuzhang1 11dfcd4d60
feat: ui hasPermission (#3270) 2025-06-16 18:23:46 +08:00
wangdan-fit2cloud 3540ad8550 feat: application 2025-06-16 17:38:48 +08:00
dataeaseShu 6bfee8d072 fix(knowledge): knowledge shared 2025-06-16 17:13:58 +08:00
shaohuzhang1 baf1c2cdc2
feat: ui hasPermission (#3267) 2025-06-16 17:02:36 +08:00
CaptainB 8e93e1ea2e fix: handle None source_file_id in link_file method 2025-06-16 16:57:10 +08:00
liqiang-fit2cloud fc89b91ab3 fix: typo. 2025-06-16 16:44:58 +08:00
wxg0103 f773792424 refactor: log add workspace_id 2025-06-16 16:31:28 +08:00
shaohuzhang1 60b3bcdd64
feat: operate log workspace (#3266) 2025-06-16 16:28:07 +08:00
wxg0103 d8ca74a2f5 refactor: xpack license 2025-06-16 15:08:33 +08:00
shaohuzhang1 1ea78ea0c7
fix: role authentication (#3263) 2025-06-16 14:05:08 +08:00
dependabot[bot] 2782a7720c build(deps): bump the python-dependencies group with 6 updates
Updates the requirements on [langchain-openai](https://github.com/langchain-ai/langchain), zhipuai, [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [xinference-client](https://github.com/xorbitsai/inference-client) and [xlrd](https://github.com/python-excel/xlrd) to permit the latest version.

Updates `langchain-openai` to 0.3.23
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.22...langchain-openai==0.3.23)

Updates `zhipuai` to 2.1.5.20250611

Updates `boto3` to 1.38.36
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.35...1.38.36)

Updates `tencentcloud-sdk-python` to 3.0.1402
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1400...3.0.1402)

Updates `xinference-client` to 1.7.0.post1
- [Release notes](https://github.com/xorbitsai/inference-client/releases)
- [Commits](https://github.com/xorbitsai/inference-client/compare/v1.6.1...v1.7.0.post1)

Updates `xlrd` to 2.0.2
- [Changelog](https://github.com/python-excel/xlrd/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/python-excel/xlrd/compare/2.0.1...2.0.2)

---
updated-dependencies:
- dependency-name: langchain-openai
  dependency-version: 0.3.23
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: zhipuai
  dependency-version: 2.1.5.20250611
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.36
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1402
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: xinference-client
  dependency-version: 1.7.0.post1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: xlrd
  dependency-version: 2.0.2
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-16 13:52:58 +08:00
CaptainB 8fd4541d67 fix: add psutil dependency version 7.0.0 to pyproject.toml 2025-06-16 13:34:24 +08:00
CaptainB 9b2452ccfe fix: add psutil dependency version 7.0.0 to pyproject.toml 2025-06-16 13:29:27 +08:00
CaptainB b8f80931d2 fix: update default folder reference from 'root' to 'default' in multiple models 2025-06-16 12:59:51 +08:00
shaohuzhang1 9e24e8c467
feat: workspace to store (#3261) 2025-06-16 12:08:09 +08:00
CaptainB cbcad3cc83 fix: update default folder reference from 'root' to 'default' in multiple models
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-16 11:42:28 +08:00
liqiang-fit2cloud 357c887c93 build(deps): fix torch version. 2025-06-16 11:36:39 +08:00
CaptainB 7aa0b10f93 fix: update Dockerfile to use 'build-only' command for UI build process 2025-06-16 11:33:20 +08:00
CaptainB 34a096ccf4 fix: update Dockerfile to use 'build-only' command for UI build process 2025-06-16 10:47:31 +08:00
wangdan-fit2cloud 1b98e352b6 feat: chat
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-15 15:21:36 +08:00
wangdan-fit2cloud afada6fa72 feat: chat 2025-06-15 14:53:18 +08:00
dataeaseShu 26be536b40 fix(lark): add lark api
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-14 20:33:51 +08:00
CaptainB e364070082 fix: update PostgreSQL version in Dockerfile
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-14 12:59:24 +08:00
shaohuzhang1 719ad9c9c1
Update django.po
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-13 23:57:51 +08:00
wangdan-fit2cloud 16b1a79c0b feat: chat 2025-06-13 21:56:01 +08:00
wangdan-fit2cloud 5acf2f60e5 feat: applicaiton 2025-06-13 18:41:09 +08:00
wxg0103 f4efdca5ed refactor: permission 2025-06-13 18:36:01 +08:00
wangdan-fit2cloud 0837d606a1 feat: workflow version 2025-06-13 18:10:59 +08:00
wangdan-fit2cloud 20e11f5c87 feat: application 2025-06-13 18:10:59 +08:00
CaptainB bce83f7545 feat: add compilation and installation scripts for MaxKB project 2025-06-13 18:04:55 +08:00
CaptainB 43087e7ca3 feat: add compilation and installation scripts for MaxKB project 2025-06-13 17:58:52 +08:00
teukkk a76c561769 feat: workspace dropdown 2025-06-13 17:42:16 +08:00
shaohuzhang1 b6fb059512
feat: web ui (#3257) 2025-06-13 17:35:25 +08:00
dataeaseShu 6a37d22540
fix(Authorized workspace): eslint error (#3256) 2025-06-13 17:34:17 +08:00
wangdan-fit2cloud 75410459eb fix: bug 2025-06-13 17:21:46 +08:00
dataeaseShu ac6716b29b
fix(knowledge base): knowledge base lark upload (#3255) 2025-06-13 17:12:31 +08:00
shaohuzhang1 67ec3c15f8
feat: build ui (#3254)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-13 16:48:55 +08:00
shaohuzhang1 9558e4053d
feat chat ui (#3253) 2025-06-13 16:17:02 +08:00
wangdan-fit2cloud 4948051f67 feat: Related Knowledge 2025-06-13 15:54:11 +08:00
shaohuzhang1 f7349d2b3d
feat local model config (#3252) 2025-06-13 15:31:51 +08:00
wxg0103 748420167a refactor: chat user 2025-06-13 15:05:51 +08:00
shaohuzhang1 e9aa3a311c
feat application ui (#3250) 2025-06-13 14:25:18 +08:00
wxg0103 8def4f3e4a refactor: chat user auth ui 2025-06-13 14:08:33 +08:00
wangdan-fit2cloud 0260b40fa1 feat: application 2025-06-13 14:06:45 +08:00
wxg0103 79c8ee591c refactor: role add user count 2025-06-13 12:05:56 +08:00
shaohuzhang1 466175fb19
perf: workflow chat (#3247) 2025-06-13 12:01:08 +08:00
wangdan-fit2cloud d9dc3db242 feat: user 2025-06-13 11:41:31 +08:00
CaptainB 54578eff33 fix: update logging messages to reflect new MaxKB branding 2025-06-13 11:18:39 +08:00
teukkk 64b1f3d33a feat: workspace 2025-06-13 11:07:00 +08:00
wangdan-fit2cloud 625b4d6b5d feat: chat 2025-06-13 11:00:15 +08:00
CaptainB 336d77ff87 fix: update dependencies in pyproject.toml for compatibility and improvements 2025-06-13 10:13:49 +08:00
dependabot[bot] 9e881b3596 build(deps): bump the python-dependencies group with 15 updates
Updates the requirements on [django](https://github.com/django/django), [langchain-openai](https://github.com/langchain-ai/langchain), [langchain-anthropic](https://github.com/langchain-ai/langchain), [langchain-community](https://github.com/langchain-ai/langchain), langchain-mcp-adapters, [langchain-huggingface](https://github.com/langchain-ai/langchain), [langgraph](https://github.com/langchain-ai/langgraph), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [xinference-client](https://github.com/xorbitsai/inference-client), [anthropic](https://github.com/anthropics/anthropic-sdk-python), [dashscope](https://dashscope.aliyun.com/), [celery](https://github.com/celery/celery), [pymupdf](https://github.com/pymupdf/pymupdf) and [pypdf](https://github.com/py-pdf/pypdf) to permit the latest version.

Updates `django` to 5.2.3
- [Commits](https://github.com/django/django/compare/5.2.1...5.2.3)

Updates `langchain-openai` to 0.3.22
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.18...langchain-openai==0.3.22)

Updates `langchain-anthropic` to 0.3.15
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-anthropic==0.3.14...langchain-anthropic==0.3.15)

Updates `langchain-community` to 0.3.25
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain==0.3.24...langchain==0.3.25)

Updates `langchain-mcp-adapters` to 0.1.7

Updates `langchain-huggingface` to 0.3.0
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-huggingface==0.2.0...langchain-huggingface==0.3.0)

Updates `langgraph` to 0.4.8
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.4.7...0.4.8)

Updates `boto3` to 1.38.35
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.25...1.38.35)

Updates `tencentcloud-sdk-python` to 3.0.1400
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1390...3.0.1400)

Updates `xinference-client` to 1.6.1
- [Release notes](https://github.com/xorbitsai/inference-client/releases)
- [Commits](https://github.com/xorbitsai/inference-client/compare/v1.6.0...v1.6.1)

Updates `anthropic` to 0.54.0
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.52.1...v0.54.0)

Updates `dashscope` to 1.23.4

Updates `celery` to 5.5.3
- [Release notes](https://github.com/celery/celery/releases)
- [Changelog](https://github.com/celery/celery/blob/main/Changelog.rst)
- [Commits](https://github.com/celery/celery/compare/v5.5.2...v5.5.3)

Updates `pymupdf` to 1.26.1
- [Release notes](https://github.com/pymupdf/pymupdf/releases)
- [Changelog](https://github.com/pymupdf/PyMuPDF/blob/main/changes.txt)
- [Commits](https://github.com/pymupdf/pymupdf/compare/1.26.0...1.26.1)

Updates `pypdf` to 5.6.0
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/5.5.0...5.6.0)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.3
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.22
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-anthropic
  dependency-version: 0.3.15
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-community
  dependency-version: 0.3.25
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.1.7
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-huggingface
  dependency-version: 0.3.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.8
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.35
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1400
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: xinference-client
  dependency-version: 1.6.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: anthropic
  dependency-version: 0.54.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: dashscope
  dependency-version: 1.23.4
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: celery
  dependency-version: 5.5.3
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pymupdf
  dependency-version: 1.26.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pypdf
  dependency-version: 5.6.0
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-13 10:01:42 +08:00
wangdan-fit2cloud 201e6f5da2 feat: applicaiton setting
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-12 21:29:17 +08:00
shaohuzhang1 bf630b9d07
feat: workflow application debug chat (#3245) 2025-06-12 21:10:10 +08:00
shaohuzhang1 c7e30bb098
feat: simple application debug chat (#3244) 2025-06-12 20:07:31 +08:00
wxg0103 b624de75be refactor: user reset password ui 2025-06-12 19:23:11 +08:00
wxg0103 02e7cacb10 refactor: user reset password 2025-06-12 19:16:30 +08:00
wangdan-fit2cloud e0a7fe8feb feat: chat user 2025-06-12 18:35:52 +08:00
wangdan-fit2cloud 8875bc9b83 feat: knowledge 2025-06-12 18:35:52 +08:00
wangdan-fit2cloud 48e37148f0 feat: knowledge 2025-06-12 18:35:52 +08:00
CaptainB 156b490f1a fix: add workspace_id to knowledge retrieval 2025-06-12 18:22:00 +08:00
CaptainB 42c6157404 fix: add workspace_id to knowledge retrieval 2025-06-12 18:09:08 +08:00
CaptainB dad309193a fix: add workspace_id to knowledge retrieval 2025-06-12 18:06:28 +08:00
CaptainB a3e2e8b548 fix: change workspace_id field type from UUIDField to CharField in serializers 2025-06-12 17:47:41 +08:00
CaptainB 10cbfcf795 fix: change workspace_id field type from UUIDField to CharField in document serializer 2025-06-12 17:46:12 +08:00
wangdan-fit2cloud bbcc45181c feat: user 2025-06-12 17:39:30 +08:00
wxg0103 31f6da272f refactor: chat user login index 2025-06-12 17:14:34 +08:00
shaohuzhang1 14ae7864aa
fix: resource permission auth (#3243) 2025-06-12 17:10:33 +08:00
dataeaseShu 399e00415c
feat(shared resources): Add new shared resources 2025-06-12 16:51:49 +08:00
CaptainB bba9e62d43 fix: add migrations for altering workspace_id and creating ModelWorkspaceAuthorization 2025-06-12 16:32:40 +08:00
wxg0103 4e203f8f95 refactor: chat user login
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-12 16:15:15 +08:00
wangdan-fit2cloud 0a0941a49b feat: workflow 2025-06-12 16:10:31 +08:00
CaptainB 9a7281212d fix: update image URL paths to use OSS endpoints 2025-06-12 15:49:54 +08:00
shaohuzhang1 e5e993986c
feat: application chat debug (#3241) 2025-06-12 15:21:59 +08:00
CaptainB 31838f8099 fix: update embedding_mode_id to embedding_model_id across multiple files 2025-06-12 15:12:26 +08:00
CaptainB 64d5217dc9 fix: update folder_id retrieval to use workspace_id from localStorage 2025-06-12 14:29:00 +08:00
CaptainB 6342fd97da fix: update folder_id retrieval to use workspace_id from localStorage 2025-06-12 14:26:58 +08:00
wangdan-fit2cloud e4e58bc3bd feat: user-login 2025-06-12 12:05:11 +08:00
wangdan-fit2cloud b00ad14214 fix: fix bug 2025-06-12 12:05:11 +08:00
CaptainB 3f5180d54d fix: remove default value for folder_id and use workspace_id instead 2025-06-12 11:52:46 +08:00
wxg0103 6ad9682465 refactor: add switch language 2025-06-12 11:25:19 +08:00
wxg0103 e0d08ac590 refactor: add switch language 2025-06-12 11:25:07 +08:00
CaptainB 39ab4e155b fix: update endpoint paths for tool-related operations 2025-06-12 11:21:48 +08:00
CaptainB 3b74cc440b fix: add recorder-core and vue3-menus dependencies to package.json 2025-06-12 10:56:44 +08:00
CaptainB e81a7962b8 fix: add scope field to knowledge serializers and update related SQL queries
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-11 20:35:25 +08:00
wangdan-fit2cloud babd6d5bde feat: chat 2025-06-11 20:33:38 +08:00
teukkk 569d16d735 feat: role member 2025-06-11 20:20:29 +08:00
CaptainB ace03e5b5a fix: enhance knowledge retrieval logic with dynamic SQL selection based on workspace management 2025-06-11 20:07:33 +08:00
CaptainB 0695b281d8 fix: enhance knowledge retrieval logic with dynamic SQL selection based on workspace management 2025-06-11 20:06:13 +08:00
wxg0103 16482af519 refactor: chat user add login auth 2025-06-11 19:36:35 +08:00
wxg0103 6c342e02f0 refactor: add all user list 2025-06-11 18:29:26 +08:00
wangdan-fit2cloud a9381ab914 feat: system-setting 2025-06-11 17:43:42 +08:00
CaptainB ba0dcf6b1b feat: enhance permission checks by incorporating role constants for workspace management 2025-06-11 17:00:14 +08:00
wxg0103 874dd34cba refactor: user add log 2025-06-11 16:40:09 +08:00
shaohuzhang1 6f61c18ff6
feat: application ui overview (#3237) 2025-06-11 16:38:48 +08:00
teukkk 25cc01d51f feat: role member 2025-06-11 16:06:58 +08:00
shaohuzhang1 59d78679b0
feat: application add workspace manage role (#3235)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-11 15:21:01 +08:00
CaptainB c758059fe4 feat: add migration to insert default data for ToolFolder and KnowledgeFolder 2025-06-11 15:07:38 +08:00
CaptainB 9877c825bc fix: update check_depth function to include workspace_id for folder hierarchy validation 2025-06-11 14:58:08 +08:00
CaptainB b63bd8bbea fix: update check_depth function to include workspace_id for folder hierarchy validation 2025-06-11 14:56:49 +08:00
wangdan-fit2cloud 238821e96b feat: chat log 2025-06-11 14:46:34 +08:00
wangdan-fit2cloud e9527bdd2b feat: chat log 2025-06-11 14:46:34 +08:00
wxg0103 fa818fc6e8 refactor: workspace add user member 2025-06-11 14:27:06 +08:00
wxg0103 7ca61274f2 refactor: workspace add user member 2025-06-11 14:15:49 +08:00
shaohuzhang1 f5baae4117
fix: application page (#3233) 2025-06-11 12:21:13 +08:00
wxg0103 c07fd323bf refactor: workspace add user member 2025-06-11 11:35:47 +08:00
wxg0103 bec1cbd000 refactor: workspace add user member 2025-06-11 11:25:26 +08:00
CaptainB 840fa68b98 fix: rename parameter in put method for clarity 2025-06-11 10:35:13 +08:00
shaohuzhang1 e0bfe0cd73
fix: Modify openAPI description (#3231)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-10 21:03:50 +08:00
shaohuzhang1 87ab2178bf
feat: application chat log (#3230) 2025-06-10 20:35:20 +08:00
wangdan-fit2cloud ab256b980d feat: application 2025-06-10 20:07:22 +08:00
teukkk e0dcc4b29d feat: role 2025-06-10 19:51:06 +08:00
wxg0103 cfafc3f0ba refactor: cache 2025-06-10 19:50:33 +08:00
wangdan-fit2cloud fd694b2162 feat: application 2025-06-10 17:57:33 +08:00
wangdan-fit2cloud 70b5782033 feat: application-setting 2025-06-10 17:10:24 +08:00
wangdan-fit2cloud 649e2ce1f6 feat: application 2025-06-10 15:04:12 +08:00
wxg0103 e6e3acdfea refactor: log add workspace_id
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-10 14:50:25 +08:00
CaptainB 982604d39a fix: change order of query results to ascending by creation time 2025-06-10 13:03:50 +08:00
wxg0103 bc91e94079 refactor: add shared model 2025-06-10 11:30:15 +08:00
wxg0103 3233058146 refactor: permission 2025-06-10 11:29:30 +08:00
wangdan-fit2cloud c3723c3962 feat: tool
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-09 21:27:25 +08:00
shaohuzhang1 5f19924f9f
perf: model manage (#3226) 2025-06-09 21:09:51 +08:00
shaohuzhang1 6a0a57e785
feat: application stats (#3225) 2025-06-09 21:08:04 +08:00
shaohuzhang1 e8886d5c65
feat: application api key (#3224) 2025-06-09 20:25:58 +08:00
wangdan-fit2cloud dfba894e88 fix: build 2025-06-09 20:09:51 +08:00
wangdan-fit2cloud 76e3eeba14 feat: knowledge 2025-06-09 19:57:49 +08:00
wangdan-fit2cloud f0bbe1c2f8 feat: document 2025-06-09 19:47:30 +08:00
CaptainB 56dc0c89de feat: alter document and paragraph status fields and update foreign key constraints 2025-06-09 19:12:52 +08:00
wxg0103 68201d3f87 refactor: model 2025-06-09 19:08:50 +08:00
CaptainB 42509f46ab feat: update permission constants and views for system knowledge management 2025-06-09 18:59:13 +08:00
wangdan-fit2cloud c68e35e9da feat: paragraph 2025-06-09 18:54:34 +08:00
CaptainB 9ccb501a90 feat: update permission constants and views for system knowledge management 2025-06-09 18:42:21 +08:00
shaohuzhang1 5da47a140d
feat: Access restrictions (#3222) 2025-06-09 18:40:56 +08:00
CaptainB fff46e5c28 feat: add workspace_id field to Create serializer in paragraph.py 2025-06-09 17:56:24 +08:00
CaptainB f1e19a1ace feat: add resource management module with CRUD operations and permissions 2025-06-09 17:56:24 +08:00
wangdan-fit2cloud b1610a00bf feat: problem 2025-06-09 17:44:18 +08:00
CaptainB 2b097e5c97 feat: update problem serializers to use ListField for batch requests 2025-06-09 17:38:08 +08:00
shaohuzhang1 c83bce3cef
fix: anonymous authentication (#3216) 2025-06-09 16:57:04 +08:00
wxg0103 6e0e0d2366 refactor: model api 2025-06-09 16:32:29 +08:00
shaohuzhang1 66c868e71f
fix: anonymous authentication (#3214) 2025-06-09 16:25:18 +08:00
shaohuzhang1 3807cf1960
feat: application chat (#3213) 2025-06-09 16:18:43 +08:00
wxg0103 5f10b70e24 refactor: tools add default workspace_id 2025-06-09 15:26:21 +08:00
wxg0103 07caf1ffa5 refactor: add share model 2025-06-09 15:10:13 +08:00
wangdan-fit2cloud 387967ca69 fix: knowledge 2025-06-09 14:57:35 +08:00
wxg0103 c0eac6d97c refactor: model 2025-06-09 14:28:17 +08:00
wxg0103 515e8555aa refactor: cache
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-09 11:16:50 +08:00
wangdan-fit2cloud 82d4a3376b feat: paragraph
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-08 16:43:40 +08:00
wangdan-fit2cloud 0342aee292 feat: paragraph
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-08 11:22:59 +08:00
wangdan-fit2cloud 06216b1596 feat: paragraph 2025-06-08 10:38:24 +08:00
wxg0103 980a27bb74 refactor: add logout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-07 19:05:27 +08:00
wxg0103 8d40004c67 refactor: add logout 2025-06-07 19:03:18 +08:00
wxg0103 b8b14884bd refactor: add application settings 2025-06-07 17:57:11 +08:00
wangdan-fit2cloud cebdfd6123 feat: paragraph
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-07 10:27:30 +08:00
wangdan-fit2cloud 003b9115a3 feat: paragraph 2025-06-07 10:27:30 +08:00
wangdan-fit2cloud 1390ddb36e paragraph 2025-06-07 10:26:24 +08:00
shaohuzhang1 7d898d870c
feat: add application migrations (#3208)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-06 22:59:00 +08:00
shaohuzhang1 b2b5c331fa
fix: setup error (#3207) 2025-06-06 22:32:17 +08:00
shaohuzhang1 165de1ad73
feat: chat authentication (#3206) 2025-06-06 22:28:21 +08:00
CaptainB 7abd9dfb71 refactor: improve code formatting and enhance folder_id handling in knowledge serializers
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-06 18:54:59 +08:00
wxg0103 c3c6a551ae refactor: application add chat_background 2025-06-06 18:26:51 +08:00
CaptainB 2fccb9db67 feat: add shared document and paragraph views with related permissions 2025-06-06 17:55:06 +08:00
wxg0103 66d4b6c81a refactor: application add show_exec 2025-06-06 17:17:52 +08:00
wxg0103 8ab4456ec3 refactor: permission 2025-06-06 17:05:25 +08:00
CaptainB 16dc78d5a4 feat: implement pagination and deletion for shared knowledge API 2025-06-06 15:45:21 +08:00
CaptainB c0ea174275 feat: implement pagination and deletion for shared knowledge API 2025-06-06 15:42:02 +08:00
wxg0103 927b12a5ca refactor: delete dbmodelManage 2025-06-06 15:18:28 +08:00
CaptainB 643200cc06 feat: add scope field to knowledge creation serializers and update related views 2025-06-06 15:13:17 +08:00
CaptainB a2cc83ec31 style: format URL paths for consistency in spacing 2025-06-06 14:43:40 +08:00
CaptainB fd441b6986 feat: add file_size_limit and file_count_limit to list_knowledge.sql 2025-06-06 13:14:33 +08:00
wxg0103 4d76f08b14 refactor: file to oss 2025-06-06 12:31:41 +08:00
CaptainB 448bbb3aae feat: rename CELERY_ACKS_LATE to CELERY_TASK_ACKS_LATE for consistency 2025-06-06 12:30:39 +08:00
CaptainB fc11fcf0e1 feat: add file_count_limit to knowledge model and create KnowledgeWorkspaceAuthorization model 2025-06-06 12:04:02 +08:00
wxg0103 b17cf3fea8 refactor: file to oss 2025-06-06 12:03:25 +08:00
wxg0103 93833849c1 refactor: file to oss
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-06 11:42:31 +08:00
wangdan-fit2cloud fb0d5b0de7 feat: api 2025-06-06 10:59:50 +08:00
zhangzhanwei 6f2f4d93bb feat: Locations 2025-06-06 10:46:16 +08:00
wxg0103 9c205048d4 refactor: ui 2025-06-06 09:39:01 +08:00
wangdan-fit2cloud e9d7decef8 feat: paragraph
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-05 20:57:00 +08:00
CaptainB 8f98b7188d feat: add INTERNAL scope to tools and update related SQL queries 2025-06-05 20:22:39 +08:00
wangdan-fit2cloud d33bc56db1 feat: knowledge 2025-06-05 20:16:08 +08:00
wxg0103 0cb33dad5a feat: ui add system settings 2025-06-05 19:47:47 +08:00
wxg0103 40df595173 refactor: model
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-05 18:39:35 +08:00
wxg0103 d05d82106e refactor: model 2025-06-05 18:37:51 +08:00
CaptainB fee5993c22 feat: add SQL query for embedding text and update model API routes to remove workspace_id 2025-06-05 18:35:31 +08:00
CaptainB 269960649d feat: add gunicorn and python-daemon dependencies to pyproject.toml 2025-06-05 17:56:42 +08:00
wangdan-fit2cloud 2fe1803f19 feat: document 2025-06-05 17:28:07 +08:00
wangdan-fit2cloud 636f96178c feat: document 2025-06-05 16:30:48 +08:00
CaptainB a4b6570110 feat: rename tool_type to scope and update related query parameters for tool filtering 2025-06-05 16:27:54 +08:00
wangdan-fit2cloud 1817537269 feat: document 2025-06-05 15:09:10 +08:00
zhangzhanwei e63572b89b feat: System operate log 2025-06-05 14:12:14 +08:00
wangdan-fit2cloud 09dfedac9b feat: document 2025-06-05 11:28:26 +08:00
wangdan-fit2cloud 491b06a43b feat: document 2025-06-05 11:28:26 +08:00
CaptainB 5cb7fc8d9a feat: refactor shared tool API to utilize ToolSerializer for create, update, and import operations 2025-06-05 11:12:17 +08:00
CaptainB f5bc003aaf feat: update knowledge permissions to include resource permission groups for various operations
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-05 10:37:55 +08:00
CaptainB 7998133e35 feat: update permission constants for knowledge documents and problems to include resource permission groups 2025-06-05 10:31:29 +08:00
CaptainB 0ca2c72e52 feat: update permission check to use workspace permission for knowledge read operations 2025-06-05 10:17:04 +08:00
CaptainB 6cb3ae74d9 feat: update permission checks to use workspace knowledge permissions for document and knowledge operations 2025-06-05 10:12:59 +08:00
wxg0103 74ce98c39b refactor: gemini 2025-06-05 09:12:38 +08:00
wangdan-fit2cloud aebbc794cd feat: document
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-04 20:46:55 +08:00
wangdan-fit2cloud 8b6ce9fc41 feat: knowledge 2025-06-04 20:41:39 +08:00
CaptainB 26f84338d6 feat: update folder serializer to remove allow_null and allow_blank from workspace_id and parent_id 2025-06-04 20:34:07 +08:00
shaohuzhang1 1641039fd2
feat: application version (#3194) 2025-06-04 20:14:52 +08:00
CaptainB 8b9e03d7cf feat: update knowledge retrieval logic and optimize SQL queries for application listing 2025-06-04 19:39:21 +08:00
CaptainB 40137f147b feat: enhance init_params handling with encryption and decryption for tools and shared tools 2025-06-04 19:15:33 +08:00
CaptainB 64e26dd2cc feat: change icon edit method from POST to PUT for tools and shared tools 2025-06-04 19:05:19 +08:00
wangdan-fit2cloud 61359e078f feat: knowledge 2025-06-04 18:54:07 +08:00
CaptainB fd2b1245b8 feat: add debug and edit icon functionalities for tools and shared tools 2025-06-04 18:52:24 +08:00
CaptainB c775f2a57f feat: add edit icon functionality for tools and shared tools 2025-06-04 18:48:20 +08:00
CaptainB 578fb34361 feat: add import, export, and debug functionalities for shared tools 2025-06-04 18:36:36 +08:00
wangdan-fit2cloud a84c287963 feat: knowledge
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-04 18:09:00 +08:00
wangdan-fit2cloud a0291bea88 feat: tool 2025-06-04 18:09:00 +08:00
CaptainB 7a34ba6fe3 feat: add shared resource tool functionality 2025-06-04 17:19:23 +08:00
wxg0103 824e02521c refactor: permission 2025-06-04 17:18:04 +08:00
shaohuzhang1 445a87143b
feat: system profile (#3193) 2025-06-04 17:16:35 +08:00
shaohuzhang1 28c09ae220
feat: create application ui (#3190) 2025-06-04 15:47:31 +08:00
wxg0103 bfa15c2221 refactor: ui 2025-06-04 15:21:34 +08:00
CaptainB fb6314cd69 feat: implement file download functionality in document handler 2025-06-04 14:25:01 +08:00
shaohuzhang1 faeee1b92c
feat: log management (#3189) 2025-06-04 14:23:10 +08:00
shaohuzhang1 d92fdb999c
feat: use redis cache (#3185) 2025-06-04 14:21:12 +08:00
liqiang-fit2cloud c2e9e5480a fix: fix typo. 2025-06-04 13:59:59 +08:00
shaohuzhang1 bc03deabfc
feat: Resources authorization (#3183) 2025-06-04 13:05:39 +08:00
zhangzhanwei 596dbedd39 fix: Fix Swagger document image upload 2025-06-04 12:01:12 +08:00
CaptainB d686bc3625 feat: refactor pylint handling and update endpoint for workspace tool 2025-06-04 11:09:58 +08:00
CaptainB e525f77fa0 feat: refactor pylint handling and update endpoint for workspace tool 2025-06-04 11:08:05 +08:00
CaptainB 56a9e69912 feat: add endpoint to download source files with updated parameter handling 2025-06-04 10:57:32 +08:00
wxg0103 642920e916 refactor: permission 2025-06-04 10:17:17 +08:00
wangdan-fit2cloud f4f39d8059 feat: application
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-03 20:45:12 +08:00
wangdan-fit2cloud b6ef007b45 feat: application 2025-06-03 19:03:33 +08:00
CaptainB 852313217d feat: add migration endpoints for documents and paragraphs with parameter handling 2025-06-03 18:43:41 +08:00
wxg0103 070a5d4ed3 refactor: user add batch delete 2025-06-03 18:35:42 +08:00
CaptainB efd273b3bc feat: add export and export_zip endpoints for knowledge base and document with image handling 2025-06-03 17:44:13 +08:00
wangdan-fit2cloud cb4b1c927c feat: application
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-06-03 17:29:43 +08:00
wxg0103 4de998dee2 refactor: user nick_name 2025-06-03 16:48:14 +08:00
CaptainB aa593f3790 feat: refactor user_id handling and enhance tool query logic 2025-06-03 16:31:07 +08:00
CaptainB a8a19f357a feat: add endpoint to retrieve embedding model for knowledge base 2025-06-03 16:31:07 +08:00
wangdan-fit2cloud af8172a7b5 feat: resource authorization 2025-06-03 16:09:09 +08:00
wangdan-fit2cloud 3f565602a4 fix: tool 2025-06-03 16:09:09 +08:00
wxg0103 11ce2e26b5 refactor: permission 2025-06-03 15:54:48 +08:00
CaptainB 15eea403ec feat: remove user_id permission check for embedding model in knowledge processing 2025-06-03 11:24:08 +08:00
CaptainB 787da980b8 feat: rename embedding_mode_id to embedding_model_id across multiple files 2025-06-03 11:20:53 +08:00
dependabot[bot] 3ded9092ca build(deps): bump the python-dependencies group with 8 updates
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Updates the requirements on [langchain-anthropic](https://github.com/langchain-ai/langchain), [langchain-google-genai](https://github.com/langchain-ai/langchain-google), langchain-mcp-adapters, [langgraph](https://github.com/langchain-ai/langgraph), zhipuai, [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python) and [anthropic](https://github.com/anthropics/anthropic-sdk-python) to permit the latest version.

Updates `langchain-anthropic` to 0.3.14
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-anthropic==0.3.13...langchain-anthropic==0.3.14)

Updates `langchain-google-genai` to 2.1.5
- [Release notes](https://github.com/langchain-ai/langchain-google/releases)
- [Commits](https://github.com/langchain-ai/langchain-google/compare/libs/genai/v2.1.4...libs/genai/v2.1.5)

Updates `langchain-mcp-adapters` to 0.1.4

Updates `langgraph` to 0.4.7
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.4.5...0.4.7)

Updates `zhipuai` to 2.1.5.20250526

Updates `boto3` to 1.38.25
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.21...1.38.25)

Updates `tencentcloud-sdk-python` to 3.0.1390
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1385...3.0.1390)

Updates `anthropic` to 0.52.1
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.52.0...v0.52.1)

---
updated-dependencies:
- dependency-name: langchain-anthropic
  dependency-version: 0.3.14
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-google-genai
  dependency-version: 2.1.5
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.1.4
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.7
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: zhipuai
  dependency-version: 2.1.5.20250526
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.25
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1390
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: anthropic
  dependency-version: 0.52.1
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 15:26:09 +08:00
shaohuzhang1 43654bddaf
feat: application operate api (#3176)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-30 20:02:39 +08:00
wangdan-fit2cloud b16353fbe8 feat: knowledge
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-30 14:34:24 +08:00
wangdan-fit2cloud 1dfff30daf feat: resource authorization 2025-05-30 14:03:08 +08:00
wxg0103 b1a6c463d0 refactor: user page add role 2025-05-30 11:07:24 +08:00
wangdan-fit2cloud 54e3804ca8 feat: user manage
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-29 19:25:28 +08:00
zhangzhanwei 1dadc06220 feat: System api permission setting 2025-05-29 18:49:00 +08:00
wangdan-fit2cloud 1b36e43ac5 feat: user manage 2025-05-29 18:41:44 +08:00
wangdan-fit2cloud 165efaa1ab feat: layout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-28 19:03:37 +08:00
shaohuzhang1 345e588ef6
feat: application list (#3160) 2025-05-28 18:57:09 +08:00
wxg0103 743b04aebf refactor: user role 2025-05-28 17:45:02 +08:00
shaohuzhang1 129d52dff2
fix: common (#3154)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-28 10:13:47 +08:00
wangdan-fit2cloud b45095f7ec feat: knowledge
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-27 19:06:56 +08:00
shaohuzhang1 896fb5fa52
feat: application flow (#3152) 2025-05-27 18:24:28 +08:00
wxg0103 0c9d8ccf71 refactor: add login auth permission 2025-05-27 16:17:56 +08:00
shaohuzhang1 6bbb181927
feat: application save (#3151) 2025-05-27 15:21:57 +08:00
wxg0103 30a60c9ab8 refactor: sql 2025-05-27 14:44:57 +08:00
shaohuzhang1 080a6031bd
feat: application save (#3150)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-27 11:08:55 +08:00
shaohuzhang1 60ff19be17
feat: Application Apikey (#3149)
Co-authored-by: zhangzhanwei <zhanwei.zhang@fit2cloud.com>
2025-05-27 10:41:05 +08:00
wxg0103 ba79dd8582 refactor: user add role setting 2025-05-27 09:47:33 +08:00
wangdan-fit2cloud bbc7dbc834 feat: knowledge
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-26 18:56:05 +08:00
shaohuzhang1 41dd3c4f3d
feat: application view init (#3147) 2025-05-26 18:39:53 +08:00
wangdan-fit2cloud da65ce57b5 fix: tool 2025-05-26 18:10:27 +08:00
wxg0103 356dbeb2b9 refactor: i18n 2025-05-26 16:46:05 +08:00
shaohuzhang1 9e7279e336
feat: application model (#3146) 2025-05-26 16:37:35 +08:00
wxg0103 b7843fd2bf refactor: user add role 2025-05-26 16:12:08 +08:00
shaohuzhang1 1aa8fe28ef
feat: delete workflow (#3145) 2025-05-26 16:01:43 +08:00
wxg0103 c0b676ed16 refactor: permission 2025-05-23 18:08:25 +08:00
wxg0103 2da3eac1b5 refactor: user model 2025-05-23 18:07:23 +08:00
dependabot[bot] 8a088e6c75 build(deps): bump the python-dependencies group with 9 updates
Updates the requirements on [uuid-utils](https://github.com/aminalaee/uuid-utils), [langchain-openai](https://github.com/langchain-ai/langchain), langchain-mcp-adapters, [langchain-ollama](https://github.com/langchain-ai/langchain), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [xinference-client](https://github.com/xorbitsai/inference-client), [anthropic](https://github.com/anthropics/anthropic-sdk-python) and [pymupdf](https://github.com/pymupdf/pymupdf) to permit the latest version.

Updates `uuid-utils` to 0.11.0
- [Release notes](https://github.com/aminalaee/uuid-utils/releases)
- [Commits](https://github.com/aminalaee/uuid-utils/compare/0.10.0...0.11.0)

Updates `langchain-openai` to 0.3.18
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.17...langchain-openai==0.3.18)

Updates `langchain-mcp-adapters` to 0.1.1

Updates `langchain-ollama` to 0.3.3
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-ollama==0.3.2...langchain-ollama==0.3.3)

Updates `boto3` to 1.38.21
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.16...1.38.21)

Updates `tencentcloud-sdk-python` to 3.0.1385
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1379...3.0.1385)

Updates `xinference-client` to 1.6.0
- [Release notes](https://github.com/xorbitsai/inference-client/releases)
- [Commits](https://github.com/xorbitsai/inference-client/compare/v1.5.1...v1.6.0)

Updates `anthropic` to 0.52.0
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.51.0...v0.52.0)

Updates `pymupdf` to 1.26.0
- [Release notes](https://github.com/pymupdf/pymupdf/releases)
- [Changelog](https://github.com/pymupdf/PyMuPDF/blob/main/changes.txt)
- [Commits](https://github.com/pymupdf/pymupdf/compare/1.25.5...1.26.0)

---
updated-dependencies:
- dependency-name: uuid-utils
  dependency-version: 0.11.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.18
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.1.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-ollama
  dependency-version: 0.3.3
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.21
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1385
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: xinference-client
  dependency-version: 1.6.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: anthropic
  dependency-version: 0.52.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pymupdf
  dependency-version: 1.26.0
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 17:51:00 +08:00
wangdan-fit2cloud 75b31ecba9 feat: tool 2025-05-22 18:38:06 +08:00
wangdan-fit2cloud 6b02e5fa9d fix: captcha 2025-05-22 15:46:39 +08:00
wxg0103 9dc06909bd refactor: login captcha 2025-05-22 15:42:12 +08:00
wxg0103 abadff25e5 refactor: login captcha
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-21 10:35:17 +08:00
wxg0103 3c5b38dc44 refactor: list
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-20 17:14:12 +08:00
wxg0103 f2b0af25da refactor: permission constants
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-19 16:30:31 +08:00
wxg0103 f618dd4f99 refactor: permission constants 2025-05-19 14:26:45 +08:00
wxg0103 0a1d5c4fbf refactor: permission constants
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-16 18:23:27 +08:00
CaptainB fc0599fe01 chore: update langchain-mcp-adapters version to 0.1.0
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-16 12:02:10 +08:00
dependabot[bot] e56a0481e0 build(deps): bump the python-dependencies group with 10 updates
Updates the requirements on [psycopg](https://github.com/psycopg/psycopg), [langchain-openai](https://github.com/langchain-ai/langchain), [langchain-anthropic](https://github.com/langchain-ai/langchain), [langchain-community](https://github.com/langchain-ai/langchain), [langgraph](https://github.com/langchain-ai/langgraph), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [dashscope](https://dashscope.aliyun.com/), [django-celery-beat](https://github.com/celery/django-celery-beat) and [pypdf](https://github.com/py-pdf/pypdf) to permit the latest version.

Updates `psycopg` to 3.2.9
- [Changelog](https://github.com/psycopg/psycopg/blob/3.2.9/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.2.7...3.2.9)

Updates `langchain-openai` to 0.3.17
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.16...langchain-openai==0.3.17)

Updates `langchain-anthropic` to 0.3.13
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-anthropic==0.3.12...langchain-anthropic==0.3.13)

Updates `langchain-community` to 0.3.24
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain==0.3.23...langchain==0.3.24)

Updates `langgraph` to 0.4.5
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.4.3...0.4.5)

Updates `boto3` to 1.38.16
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.11...1.38.16)

Updates `tencentcloud-sdk-python` to 3.0.1379
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1374...3.0.1379)

Updates `dashscope` to 1.23.3

Updates `django-celery-beat` to 2.8.1
- [Release notes](https://github.com/celery/django-celery-beat/releases)
- [Changelog](https://github.com/celery/django-celery-beat/blob/main/Changelog)
- [Commits](https://github.com/celery/django-celery-beat/compare/v2.8.0...v2.8.1)

Updates `pypdf` to 5.5.0
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/5.4.0...5.5.0)

---
updated-dependencies:
- dependency-name: psycopg
  dependency-version: 3.2.9
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.17
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-anthropic
  dependency-version: 0.3.13
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-community
  dependency-version: 0.3.24
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.5
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.16
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1379
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: dashscope
  dependency-version: 1.23.3
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: django-celery-beat
  dependency-version: 2.8.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pypdf
  dependency-version: 5.5.0
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-16 10:24:09 +08:00
wangdan-fit2cloud e50b5cc051 feat: tool
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-15 18:21:38 +08:00
CaptainB aa7bc349ab feat: add request handling to UnAssociation and Association API endpoints 2025-05-15 13:48:26 +08:00
wxg0103 8fb8c06e0b refactor: user 2025-05-15 12:07:07 +08:00
CaptainB e24f211674 feat: add optional user_id parameter to tool queries and serializers 2025-05-15 11:04:54 +08:00
CaptainB 74fac81c7b feat: enhance knowledge pagination to include child folders in response 2025-05-15 10:49:47 +08:00
CaptainB 7780d89c55 feat: add pagination method for tools with folder data in tool.py 2025-05-15 10:40:29 +08:00
wangdan-fit2cloud d7b61c61e6 feat: tool 2025-05-15 10:25:14 +08:00
CaptainB b13799d584 feat: add Pylint API for code checking and integrate with tool operations 2025-05-14 14:35:13 +08:00
CaptainB d85d20694d fix: include desc field in editable fields for folder validation
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-14 12:12:16 +08:00
CaptainB 25da46d13f fix: make desc field optional in KnowledgeFolder and ToolFolder models 2025-05-14 11:31:54 +08:00
CaptainB 6b41d8cff1 chore: remove unused CompareConstants import from document.py 2025-05-14 10:12:52 +08:00
wangdan-fit2cloud e6dc404867 feat: model 2025-05-13 19:18:27 +08:00
wangdan-fit2cloud d14b47373a feat: model 2025-05-13 16:19:35 +08:00
wxg0103 4eed42b6a0 refactor: user add default password
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-13 14:39:47 +08:00
CaptainB c3581be9bd fix: rename image_name to file_name in zip_split_handle and remove workspace_id assignment in document 2025-05-13 12:47:59 +08:00
CaptainB bd71ca9eb4 fix: update is_valid method to use dynamic file size limit from Knowledge model 2025-05-13 11:50:08 +08:00
CaptainB d24532d679 fix: update is_valid method to accept instance parameter for file validation 2025-05-13 11:28:15 +08:00
CaptainB 554b81b59a fix: update has_permissions decorator formatting for knowledge document endpoints 2025-05-13 11:22:06 +08:00
CaptainB 680475cb97 feat: add new permission constants for knowledge documents, paragraphs, and problems 2025-05-13 10:58:56 +08:00
CaptainB 5ca3151e90 fix: update permission constants for document operations and adjust serializer field options 2025-05-12 18:34:15 +08:00
wangdan-fit2cloud b11e3398da feat: knowledge 2025-05-12 18:28:58 +08:00
wangdan-fit2cloud 796eff7759 feat: tool 2025-05-12 18:19:43 +08:00
CaptainB f21d301140 fix: change HTTP methods from PUT to GET for association and unassociation endpoints 2025-05-12 17:13:57 +08:00
CaptainB 6f81d80389 fix: change HTTP methods from GET to PUT for disassociation and related questions endpoints 2025-05-12 16:24:01 +08:00
CaptainB a5fb2e15c6 feat: add initial SQL migration for tool data and integrate file content retrieval 2025-05-12 11:22:12 +08:00
CaptainB f5fc51cb12 fix: update langchain-mcp-adapters version to 0.0.11
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-12 10:34:52 +08:00
CaptainB cb2fb496b4 fix: update ForeignKey on_delete behavior for ApplicationKnowledgeMapping 2025-05-12 10:30:13 +08:00
shaohuzhang1 5ebfe9b5dd
feat: workflow init (#3072)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-09 18:55:53 +08:00
CaptainB f6ccc95240 feat: implement source type retrieval and enhance folder deletion logic 2025-05-09 18:31:08 +08:00
CaptainB 1f8907e1cb feat: add GetModelAPI for retrieving model information in knowledge base 2025-05-09 17:50:15 +08:00
CaptainB 1e80a6136a chore: i18n 2025-05-09 17:20:31 +08:00
wangdan-fit2cloud 53048774ee feat: tree
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-09 14:43:01 +08:00
wxg0103 deb7268be1 refactor: i18n 2025-05-09 14:37:14 +08:00
CaptainB 40d9954c3b chore: i18n 2025-05-09 11:49:07 +08:00
CaptainB 94c5c4197c fix: add type ignore comments for operation_id and tags in various API schemas 2025-05-09 11:29:05 +08:00
dependabot[bot] 1a34c67d46 build(deps): bump the python-dependencies group with 10 updates
Updates the requirements on [django](https://github.com/django/django), [django-db-connection-pool](https://github.com/altairbow/django-db-connection-pool), [langchain-openai](https://github.com/langchain-ai/langchain), langchain-mcp-adapters, [langchain-huggingface](https://github.com/langchain-ai/langchain), [langgraph](https://github.com/langchain-ai/langgraph), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python), [anthropic](https://github.com/anthropics/anthropic-sdk-python) and [pylint](https://github.com/pylint-dev/pylint) to permit the latest version.

Updates `django` to 5.2.1
- [Commits](https://github.com/django/django/compare/5.2...5.2.1)

Updates `django-db-connection-pool` to 1.2.6
- [Release notes](https://github.com/altairbow/django-db-connection-pool/releases)
- [Commits](https://github.com/altairbow/django-db-connection-pool/compare/1.2.5...1.2.6)

Updates `langchain-openai` to 0.3.16
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.15...langchain-openai==0.3.16)

Updates `langchain-mcp-adapters` to 0.0.10

Updates `langchain-huggingface` to 0.2.0
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-huggingface==0.1.2...langchain-huggingface==0.2.0)

Updates `langgraph` to 0.4.3
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.4.1...0.4.3)

Updates `boto3` to 1.38.11
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.6...1.38.11)

Updates `tencentcloud-sdk-python` to 3.0.1374
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1372...3.0.1374)

Updates `anthropic` to 0.51.0
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.50.0...v0.51.0)

Updates `pylint` to 3.3.7
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.6...v3.3.7)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 5.2.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: django-db-connection-pool
  dependency-version: 1.2.6
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.16
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.0.10
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-huggingface
  dependency-version: 0.2.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.3
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.11
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1374
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: anthropic
  dependency-version: 0.51.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: pylint
  dependency-version: 3.3.7
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-09 10:57:31 +08:00
CaptainB 6f209d740d feat: add request and response handling for SyncWeb, Embedding, and GenerateRelated APIs 2025-05-09 10:56:11 +08:00
CaptainB a75501737f feat: add BatchGenerateRelated API for batch processing of related paragraphs 2025-05-08 19:28:58 +08:00
CaptainB ac698e0c4c feat: add BatchRefresh and BatchGenerateRelated APIs for document processing 2025-05-08 19:16:45 +08:00
CaptainB 54836d549c feat: add Embedding API for re-vectorization of knowledge objects 2025-05-08 17:17:09 +08:00
CaptainB b6f5a8378a feat: add HitTest API for knowledge base query testing and update SyncWeb API to use knowledge_id 2025-05-08 16:49:12 +08:00
CaptainB 7dcd1a71e8 feat: add SyncWeb and GenerateRelated APIs for knowledge base synchronization and related generation 2025-05-08 16:49:12 +08:00
wangdan-fit2cloud 0ae489a50b feat: layout 2025-05-08 16:23:13 +08:00
CaptainB 9f004defd9 feat: add SHA256 hash attribute to knowledge object on save
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-05-08 12:34:51 +08:00
CaptainB ab479c422c feat: add delete method to File API for file removal 2025-05-08 12:15:00 +08:00
CaptainB 4d44637ae5 feat: add file size attribute to knowledge object on save 2025-05-08 11:31:16 +08:00
CaptainB 4b30b5b1b5 fix: correct tag casing in File API documentation 2025-05-08 10:55:26 +08:00
wxg0103 0401c01c93 refactor: user add role setting 2025-05-08 10:51:01 +08:00
CaptainB 3010fa835f feat: implement File API for file upload and retrieval with new endpoints 2025-05-08 10:42:00 +08:00
CaptainB 06d5c10ac6 chore: reformat code 2025-05-08 10:00:58 +08:00
CaptainB 906407a15b feat: update Problem API to batch process request data in post method
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-07 18:51:26 +08:00
wxg0103 a90f6c89cb refactor: email setting 2025-05-07 18:09:45 +08:00
CaptainB a09d0d5171 feat: add ProblemParagraphAPI for retrieving associated paragraphs and update routing 2025-05-07 17:37:34 +08:00
CaptainB 6cdd5b4508 feat: implement Problem API for delete and modify operations with new Operate endpoint 2025-05-07 17:17:41 +08:00
CaptainB a6c74024b0 feat: implement pagination support for Problem API with new Page endpoint 2025-05-07 17:06:27 +08:00
CaptainB 4995721399 feat: implement Problem API for CRUD operations and batch processing 2025-05-07 16:28:56 +08:00
wangdan-fit2cloud fd7fd36626 feat: model 2025-05-07 15:58:55 +08:00
CaptainB ecc25796a6 feat: update document and paragraph batch operations to use PUT method and rename classes for clarity 2025-05-07 14:49:32 +08:00
CaptainB a04c2efa41 feat: add pagination support for paragraph retrieval in Paragraph API 2025-05-07 14:06:27 +08:00
CaptainB 36da813eea feat: implement Paragraph API for CRUD operations and batch deletion 2025-05-07 13:53:04 +08:00
CaptainB 10105ce5ab feat: implement Paragraph API for CRUD operations and batch deletion 2025-05-07 13:51:20 +08:00
CaptainB bcc7c1acf1 refactor: add noqa comments to suppress linting warnings for folder type retrieval 2025-05-07 12:03:00 +08:00
shaohuzhang1 bcf6ccee20
refactor: File model (#3050)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-07 11:45:00 +08:00
CaptainB 442dd209a5 feat: add KnowledgeFolderFlatSerializer for flat folder representation in Knowledge API 2025-05-07 10:30:56 +08:00
CaptainB 1448927f4e feat: add ToolFolderFlatSerializer for flat folder serialization in Tool API 2025-05-07 10:29:23 +08:00
wangdan-fit2cloud 4e77ebcc91 feat: model 2025-05-07 10:10:24 +08:00
wangdan-fit2cloud b219c72c4a feat: model 2025-05-07 10:10:24 +08:00
CaptainB 4cb513dd3f feat: enhance Tool API to return folder and tool structure for a given folder ID 2025-05-07 10:05:53 +08:00
shaohuzhang1 115e11052c
feat: Resources authorization (#3039) 2025-05-06 18:35:11 +08:00
CaptainB bd865ceafc feat: add DocumentSplitPatternAPI for segment ID retrieval with workspace and knowledge ID parameters 2025-05-06 17:56:49 +08:00
CaptainB 6f5645e16c feat: add DocumentTreeReadAPI for document pagination and file size limit to knowledge model 2025-05-06 17:39:26 +08:00
CaptainB c3b979decc feat: add CancelTaskAPI and batch cancellation endpoints for document tasks 2025-05-06 16:47:59 +08:00
CaptainB e702af8c2b feat: enhance Document API with workspace ID support for get, put, and delete operations 2025-05-06 15:24:36 +08:00
wxg0103 3e9069aac1 refactor: bailian 2025-05-06 15:03:31 +08:00
CaptainB 0e66b8a186 feat: add summary fields to extend_schema for folder and document APIs 2025-05-06 13:55:14 +08:00
CaptainB 24e734fb36 feat: enhance Document API with create and query functionalities 2025-05-06 13:55:14 +08:00
CaptainB ba5028858c feat: add DocumentBatchCreateAPI for batch document creation
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-05-05 17:50:13 +08:00
dependabot[bot] ee2ac7835c build(deps): bump the python-dependencies group with 7 updates
Updates the requirements on [psycopg](https://github.com/psycopg/psycopg), [langchain-openai](https://github.com/langchain-ai/langchain), [langchain-google-genai](https://github.com/langchain-ai/langchain-google), [langgraph](https://github.com/langchain-ai/langgraph), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python) and [xinference-client](https://github.com/xorbitsai/inference-client) to permit the latest version.

Updates `psycopg` to 3.2.7
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.2.6...3.2.7)

Updates `langchain-openai` to 0.3.15
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-openai==0.3.14...langchain-openai==0.3.15)

Updates `langchain-google-genai` to 2.1.4
- [Release notes](https://github.com/langchain-ai/langchain-google/releases)
- [Commits](https://github.com/langchain-ai/langchain-google/compare/libs/genai/v2.1.3...libs/genai/v2.1.4)

Updates `langgraph` to 0.4.1
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.4.0...0.4.1)

Updates `boto3` to 1.38.6
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.38.5...1.38.6)

Updates `tencentcloud-sdk-python` to 3.0.1372
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1371...3.0.1372)

Updates `xinference-client` to 1.5.1
- [Release notes](https://github.com/xorbitsai/inference-client/releases)
- [Commits](https://github.com/xorbitsai/inference-client/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: psycopg
  dependency-version: 3.2.7
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-openai
  dependency-version: 0.3.15
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langchain-google-genai
  dependency-version: 2.1.4
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.1
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.6
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1372
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: xinference-client
  dependency-version: 1.5.1
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 17:47:58 +08:00
CaptainB 0d3eb431f6 feat: implement batch processing for document creation, synchronization, and deletion
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-04-30 18:04:40 +08:00
CaptainB 43bef216d5 refactor: reorganize file handling imports into a structured directory 2025-04-30 16:08:17 +08:00
CaptainB 2a5cd4ca14 build(deps): update pymupdf to 1.25.5 and pypdf to 5.4.0 2025-04-30 15:57:51 +08:00
CaptainB 48297d81e5 feat: add initial implementations of various file handling classes for CSV, XLS, and XLSX formats 2025-04-30 15:52:58 +08:00
wangdan-fit2cloud c8ce7e28d8 feat: layout 2025-04-30 14:53:58 +08:00
dependabot[bot] 7be1173843 build(deps): bump the python-dependencies group with 5 updates
Updates the requirements on [langchain-community](https://github.com/langchain-ai/langchain), [langgraph](https://github.com/langchain-ai/langgraph), [boto3](https://github.com/boto/boto3), [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python) and [dashscope](https://dashscope.aliyun.com/) to permit the latest version.

Updates `langchain-community` to 0.3.23
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-community==0.3.22...langchain==0.3.23)

Updates `langgraph` to 0.4.0
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.3.34...0.4.0)

Updates `boto3` to 1.38.5
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.37.36...1.38.5)

Updates `tencentcloud-sdk-python` to 3.0.1371
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1366...3.0.1371)

Updates `dashscope` to 1.23.2

---
updated-dependencies:
- dependency-name: langchain-community
  dependency-version: 0.3.23
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: langgraph
  dependency-version: 0.4.0
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: boto3
  dependency-version: 1.38.5
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1371
  dependency-type: direct:production
  dependency-group: python-dependencies
- dependency-name: dashscope
  dependency-version: 1.23.2
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-30 11:26:35 +08:00
liqiang-fit2cloud 1ca395094e build: update build-and-push.yml. 2025-04-30 10:23:19 +08:00
liqiang-fit2cloud adba1829c0 Merge remote-tracking branch 'origin/v2' into v2 2025-04-30 10:15:59 +08:00
liqiang-fit2cloud ced932b07c build: update build-and-push.yml. 2025-04-30 10:15:49 +08:00
CaptainB 4dcd150c8d refactor: improve code readability and formatting in common, knowledge, and paragraph modules 2025-04-30 09:57:11 +08:00
wxg0103 132fd1b84d refactor: i18n
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-29 15:45:47 +08:00
CaptainB 3b5a02307c refactor: celery config 2025-04-29 11:48:15 +08:00
CaptainB 870fabe187 chore: add init file for every folder 2025-04-29 10:31:49 +08:00
CaptainB 770089e432 feat: add initial implementation of document and paragraph models with serializers 2025-04-29 10:04:34 +08:00
CaptainB 8c362b0f99 feat: update translation strings and add new error messages in django.po 2025-04-28 18:41:41 +08:00
wangdan-fit2cloud 69e35b36aa feat: layout
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-28 18:15:41 +08:00
wangdan-fit2cloud ab46d7ab61 feat: layout 2025-04-28 18:15:41 +08:00
wxg0103 06f834b7e3 feat: user manage 2025-04-28 17:36:56 +08:00
shaohuzhang1 5481b8a2aa feat: auth 2025-04-28 14:41:46 +08:00
shaohuzhang1 4369be9867
feat: add env (#3013) 2025-04-28 13:48:01 +08:00
shaohuzhang1 118db9dd14
fix: authentication errors (#3012) 2025-04-28 13:03:54 +08:00
CaptainB 0df7c7247d feat: implement web knowledge synchronization with ForkManage and related handlers 2025-04-28 11:53:38 +08:00
CaptainB ee37d7c320 feat: implement web knowledge synchronization with ForkManage and related handlers 2025-04-28 11:27:59 +08:00
shaohuzhang1 99fd32897c
feat: UI permission instruction (#3010) 2025-04-28 10:20:40 +08:00
shaohuzhang1 c79479d80b
feat: User profile returns permission role information (#3005)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-04-27 18:27:35 +08:00
shaohuzhang1 7bda26d92a
feat: Improve workspace resource authorization (#3004) 2025-04-27 18:14:50 +08:00
wxg0103 7aa294db38 feat: support create user 2025-04-27 17:59:47 +08:00
CaptainB 1e86919882 feat: remove KnowledgeLarkCreateAPI and KnowledgeLarkView classes 2025-04-27 17:43:20 +08:00
CaptainB 3e7bc1dae0 feat: remove KnowledgeYuque and KnowledgeLark classes 2025-04-27 17:39:22 +08:00
wxg0103 bca128ec39 feat: support create user 2025-04-27 16:26:40 +08:00
wangdan-fit2cloud a91d8016f8 feat: commit 2025-04-27 11:35:57 +08:00
wangdan-fit2cloud f805f6dce1 feat: login 2025-04-27 11:35:57 +08:00
CaptainB b1d13f501f feat: reduce module depth limit from 3 to 2 2025-04-27 10:46:34 +08:00
CaptainB bb4b35bfe8 feat: enhance module depth validation with current depth tracking 2025-04-27 10:42:18 +08:00
CaptainB f7a4aca0e8 feat: implement knowledge creation APIs for base, web, lark, and yuque 2025-04-25 20:31:59 +08:00
CaptainB 724686762e feat: add knowledge management API and permissions 2025-04-25 18:18:47 +08:00
wxg0103 83ace97ecc refactor: model 2025-04-25 18:12:55 +08:00
wxg0103 7f492b4d92 refactor: openai 2025-04-25 17:53:22 +08:00
CaptainB 57c6c9916e feat: implement module depth validation and refactor check_depth method 2025-04-25 15:37:44 +08:00
CaptainB fdb7aeb47b feat: implement module depth validation and refactor check_depth method 2025-04-25 15:36:27 +08:00
CaptainB 3205ff2a65 feat: add knowledge management
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-04-25 14:58:22 +08:00
CaptainB ec643fca7f feat: add initial model structure for knowledge management 2025-04-25 14:06:23 +08:00
CaptainB f08b551a72 chore: fix typo. 2025-04-25 13:32:26 +08:00
dependabot[bot] a084b12ac4 build(deps): update langgraph requirement from 0.3.31 to 0.3.34
Updates the requirements on [langgraph](https://github.com/langchain-ai/langgraph) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langgraph/releases)
- [Commits](https://github.com/langchain-ai/langgraph/compare/0.3.31...0.3.34)

---
updated-dependencies:
- dependency-name: langgraph
  dependency-version: 0.3.34
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 11:48:21 +08:00
dependabot[bot] 15ff1acc2c build(deps): update tencentcloud-sdk-python requirement
Updates the requirements on [tencentcloud-sdk-python](https://github.com/TencentCloud/tencentcloud-sdk-python) to permit the latest version.
- [Changelog](https://github.com/TencentCloud/tencentcloud-sdk-python/blob/master/SERVICE_CHANGELOG.md)
- [Commits](https://github.com/TencentCloud/tencentcloud-sdk-python/compare/3.0.1362...3.0.1366)

---
updated-dependencies:
- dependency-name: tencentcloud-sdk-python
  dependency-version: 3.0.1366
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 11:47:59 +08:00
wxg0103 ff41b1ff6e refactor: tokens 2025-04-25 10:17:50 +08:00
dependabot[bot] 3d1c43c020 build(deps): update anthropic requirement from 0.49.0 to 0.50.0
Updates the requirements on [anthropic](https://github.com/anthropics/anthropic-sdk-python) to permit the latest version.
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.49.0...v0.50.0)

---
updated-dependencies:
- dependency-name: anthropic
  dependency-version: 0.50.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 09:21:17 +08:00
dependabot[bot] 4466343e97 build(deps): update langchain-community requirement
Updates the requirements on [langchain-community](https://github.com/langchain-ai/langchain) to permit the latest version.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-community==0.3.21...langchain-community==0.3.22)

---
updated-dependencies:
- dependency-name: langchain-community
  dependency-version: 0.3.22
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 09:05:51 +08:00
dependabot[bot] 52a7f40ba8 build(deps): update xinference-client requirement from 1.4.1 to 1.5.0
Updates the requirements on [xinference-client](https://github.com/xorbitsai/inference-client) to permit the latest version.
- [Release notes](https://github.com/xorbitsai/inference-client/releases)
- [Commits](https://github.com/xorbitsai/inference-client/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: xinference-client
  dependency-version: 1.5.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 09:04:42 +08:00
dependabot[bot] 166309de09 build(deps): update diskcache2 requirement from 0.1.2 to 1.0.0
Updates the requirements on [diskcache2](https://github.com/grantjenks/python-diskcache) to permit the latest version.
- [Commits](https://github.com/grantjenks/python-diskcache/compare/v0.1.2...v1.0.0)

---
updated-dependencies:
- dependency-name: diskcache2
  dependency-version: 1.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 09:04:24 +08:00
dependabot[bot] 11faca22f9 build(deps): update zhipuai requirement
Updates the requirements on zhipuai to permit the latest version.

---
updated-dependencies:
- dependency-name: zhipuai
  dependency-version: 2.1.5.20250421
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-25 09:03:54 +08:00
CaptainB f05a4a67c5 feat: refactor response serializers for model parameters and lists
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-24 13:42:58 +08:00
CaptainB 4c38e8a82b feat: add dynamic SQL execution and pagination functionality with custom query compiler 2025-04-24 11:37:11 +08:00
CaptainB fbb4e7d449 feat: add __init__.py file to initialize the package 2025-04-24 11:10:58 +08:00
CaptainB 21097d7164 feat: add depth validation for module creation to limit hierarchy to 3 levels 2025-04-24 10:49:07 +08:00
CaptainB 91f16aa394 feat: add ToolEditRequest serializer for editing tool properties
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-23 11:34:19 +08:00
CaptainB a9d962c1f1 feat: implement RestrictedUnpickler for secure deserialization and enhance import functionality 2025-04-23 10:33:26 +08:00
wxg0103 cc0e431605 refactor: remove image params
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-22 18:22:50 +08:00
CaptainB 11331a60e0 feat: enhance Tool API by adding module_id and tool_type parameters, and refactor query handling
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-22 17:53:47 +08:00
CaptainB bbd7079166 feat: add import and export endpoints to ToolView for workspace tools 2025-04-22 17:06:39 +08:00
wxg0103 55705593a9 feat: remove qwen 2025-04-22 14:35:09 +08:00
wxg0103 6d4f5dc1c3 feat: add model setting 2025-04-22 10:45:11 +08:00
liqiang-fit2cloud 3f7fb88217 build: update Dockerfile. 2025-04-21 16:39:20 +08:00
liqiang-fit2cloud 8071d2dcd5 build: update shell files. 2025-04-21 15:39:29 +08:00
liqiang-fit2cloud 5e8dd48032 build: update Dockerfile.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-21 14:44:00 +08:00
CaptainB 220168c4bf chore: add some i18n code 2025-04-21 13:23:22 +08:00
liqiang-fit2cloud ab0f5e09b1 build: update Dockerfile-python-pg. 2025-04-21 11:15:22 +08:00
CaptainB a8cda7d4a4 feat: consolidate module and tool views by removing redundant classes and updating API endpoints 2025-04-21 10:59:42 +08:00
wxg0103 39841cb344 feat: add model setting 2025-04-21 10:24:13 +08:00
wxg0103 d3346deb62 feat: add model setting 2025-04-21 09:10:25 +08:00
CaptainB 16cafec6af fix: update module and tool URLs to avoid duplicate paths for ModuleTreeView and ToolTreeView
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
2025-04-18 21:16:31 +08:00
CaptainB 2c0cb5b6e6 feat: update module and tool delete APIs to use DefaultResultSerializer for responses 2025-04-18 19:11:26 +08:00
CaptainB 7c15082e53 feat: update API documentation to specify retrieval of tool by module 2025-04-18 19:05:53 +08:00
CaptainB 83b494f700 feat: add DefaultResultSerializer to module and tool delete operations responses 2025-04-18 18:58:49 +08:00
CaptainB fe032822f4 feat: add ToolTreeView and ToolTreeReadAPI for retrieving tools by workspace and module 2025-04-18 17:54:06 +08:00
wxg0103 6f6b163416 feat: add model setting 2025-04-18 17:45:15 +08:00
CaptainB 9b0f9b04b7 refactor: remove tool_type field and update imports in tool model
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-18 17:08:59 +08:00
liqiang-fit2cloud 1ebcc664bb build: init directory. 2025-04-18 17:02:59 +08:00
CaptainB 0b8f5d7597 feat: implement CRUD operations for tools with API views 2025-04-18 16:42:46 +08:00
liqiang-fit2cloud f89e18578f build: init directory. 2025-04-18 15:42:59 +08:00
CaptainB 32111f6a8f fix: improve module tree query to use Q object for filtering by workspace_id 2025-04-18 15:17:04 +08:00
CaptainB 8f0dd16949 fix: improve module tree query to use Q object for filtering by workspace_id 2025-04-18 15:01:34 +08:00
liqiang-fit2cloud ac4df1421a build: init directory. 2025-04-18 14:45:36 +08:00
liqiang-fit2cloud 90d2d90658 build: init directory. 2025-04-18 14:24:32 +08:00
liqiang-fit2cloud 4f4c8c43b9 build: init directory. 2025-04-18 14:17:59 +08:00
liqiang-fit2cloud ffe8900fb2 build: init directory. 2025-04-18 14:10:16 +08:00
dependabot[bot] 9b21a36e1a chore(deps): update websockets requirement from 13.1 to 15.0.1
Updates the requirements on [websockets](https://github.com/python-websockets/websockets) to permit the latest version.
- [Release notes](https://github.com/python-websockets/websockets/releases)
- [Commits](https://github.com/python-websockets/websockets/compare/13.1...15.0.1)

---
updated-dependencies:
- dependency-name: websockets
  dependency-version: 15.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 14:01:51 +08:00
dependabot[bot] 3554bdf7df chore(deps): update qianfan requirement from 0.3.18 to 0.4.12.3
Updates the requirements on [qianfan](https://github.com/baidubce/bce-qianfan-sdk) to permit the latest version.
- [Release notes](https://github.com/baidubce/bce-qianfan-sdk/releases)
- [Commits](https://github.com/baidubce/bce-qianfan-sdk/compare/py/v0.3.18...py/v0.4.12.3)

---
updated-dependencies:
- dependency-name: qianfan
  dependency-version: 0.4.12.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 14:01:36 +08:00
dependabot[bot] e69341ed3c chore(deps): update pylint requirement from 3.1.0 to 3.3.6
Updates the requirements on [pylint](https://github.com/pylint-dev/pylint) to permit the latest version.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.1.0...v3.3.6)

---
updated-dependencies:
- dependency-name: pylint
  dependency-version: 3.3.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 14:01:26 +08:00
dependabot[bot] 4ca557fe5d chore(deps): update langchain-mcp-adapters requirement
Updates the requirements on langchain-mcp-adapters to permit the latest version.

---
updated-dependencies:
- dependency-name: langchain-mcp-adapters
  dependency-version: 0.0.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 14:01:15 +08:00
CaptainB 4876a45733 chore: update target branch format in dependabot configuration 2025-04-18 13:57:16 +08:00
CaptainB b3c12fb0b8 chore: update dependabot schedule to target v2 branch 2025-04-18 13:40:50 +08:00
CaptainB cbebef774c chore: update dependabot schedule to run on Fridays 2025-04-18 13:38:51 +08:00
CaptainB d49fd74305 feat: add ToolModule model and API for managing tool modules with workspace support 2025-04-18 13:33:29 +08:00
shaohuzhang1 dcb77bbe16
feat: Captcha (#2913)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-17 19:16:54 +08:00
wxg0103 063393d659 feat: add model setting 2025-04-17 18:05:31 +08:00
wxg0103 946de675ff feat: add model setting 2025-04-17 18:01:33 +08:00
shaohuzhang1 934871f5c6 feat:Use distcache 2025-04-17 17:16:45 +08:00
shaohuzhang1 9108971fdc
fix: Swagger warning(#2909)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-17 14:27:58 +08:00
CaptainB 4c23b9aded feat: implement Tool model and related API for Tool management 2025-04-17 14:11:57 +08:00
wangdan-fit2cloud 9778fd2bb4 feat: login 2025-04-17 11:30:20 +08:00
shaohuzhang1 342ef6df30 feat: authentication demo 2025-04-17 10:40:07 +08:00
shaohuzhang1 3351968969 feat: authentication demo 2025-04-17 10:35:02 +08:00
shaohuzhang1 5f902ef5de
feat: authentication (#2906)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-16 20:09:00 +08:00
wangdan-fit2cloud 475a05e8b0 init: init 2025-04-16 19:20:15 +08:00
CaptainB 342f984a3b feat: update UUID generation to use uuid.uuid7 and add uuid-utils dependency
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-16 15:02:37 +08:00
shaohuzhang1 04642eb497 feat: authentication
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-15 20:37:38 +08:00
CaptainB 5ffd3423ff feat: load environment variables from .env file and update config loading logic
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-15 15:09:26 +08:00
shaohuzhang1 5fa0734c66 feat: psycopg 2025-04-15 14:20:07 +08:00
shaohuzhang1 aafcd5eb28 Merge branch 'v2' of github.com:1Panel-dev/MaxKB into v2
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
2025-04-14 20:12:50 +08:00
shaohuzhang1 e58a5507a9 init project 2025-04-14 20:11:23 +08:00
liqiang-fit2cloud d8cbf0d879 build: add Dockerfile-python-pg 2025-04-14 15:57:40 +08:00
liqiang-fit2cloud e8d5a4a653 build: add Dockerfile-python-pg 2025-04-14 15:47:02 +08:00
CaptainB 3502522086 chore: add ignore 2025-04-11 15:57:58 +08:00
CaptainB c78a6babb6 ci: v2 2025-04-11 15:47:59 +08:00
2055 changed files with 147975 additions and 71433 deletions

View File

@ -1,2 +1,4 @@
.git* .git*
.idea* .idea*
*.md
.venv/

9
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
timezone: "Asia/Shanghai"
day: "friday"
target-branch: "v3"

View File

@ -14,33 +14,19 @@ on:
- linux/amd64,linux/arm64 - linux/amd64,linux/arm64
jobs: jobs:
build-and-push-python-pg-to-ghcr: build-and-push-python-pg-to-ghcr:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Check Disk Space
run: df -h
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Check Disk Space
run: df -h
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: main ref: ${{ github.ref_name }}
- name: Prepare - name: Prepare
id: prepare id: prepare
run: | run: |
DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-python-pg DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-base
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }} DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
TAG_NAME=python3.11-pg15.8 TAG_NAME=python3.11-pg17.6
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
echo ::set-output name=docker_image::${DOCKER_IMAGE} echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::${TAG_NAME} echo ::set-output name=version::${TAG_NAME}
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \ echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \
@ -51,8 +37,7 @@ jobs:
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
with: with:
# Until https://github.com/tonistiigi/binfmt/issues/215 cache-image: false
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
@ -63,4 +48,4 @@ jobs:
password: ${{ secrets.GH_TOKEN }} password: ${{ secrets.GH_TOKEN }}
- name: Docker Buildx (build-and-push) - name: Docker Buildx (build-and-push)
run: | run: |
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile-python-pg docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile-base

View File

@ -5,7 +5,7 @@ on:
inputs: inputs:
dockerImageTag: dockerImageTag:
description: 'Docker Image Tag' description: 'Docker Image Tag'
default: 'v1.0.1' default: 'v2.0.3'
required: true required: true
architecture: architecture:
description: 'Architecture' description: 'Architecture'
@ -19,26 +19,12 @@ on:
jobs: jobs:
build-and-push-vector-model-to-ghcr: build-and-push-vector-model-to-ghcr:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Check Disk Space
run: df -h
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Check Disk Space
run: df -h
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: main ref: ${{ github.ref_name }}
- name: Prepare - name: Prepare
id: prepare id: prepare
run: | run: |
@ -56,8 +42,7 @@ jobs:
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
with: with:
# Until https://github.com/tonistiigi/binfmt/issues/215 cache-image: false
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry

View File

@ -1,13 +1,13 @@
name: build-and-push name: build-and-push
run-name: 构建镜像并推送仓库 ${{ github.event.inputs.dockerImageTag }} (${{ github.event.inputs.registry }}) run-name: 构建镜像并推送仓库 ${{ github.event.inputs.dockerImageTag }} (${{ github.event.inputs.registry }}) (${{ github.event.inputs.architecture }})
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
dockerImageTag: dockerImageTag:
description: 'Image Tag' description: 'Image Tag'
default: 'v1.10.3-dev' default: 'v2.4.0-dev'
required: true required: true
dockerImageTagWithLatest: dockerImageTagWithLatest:
description: '是否发布latest tag正式发版时选择测试版本切勿选择' description: '是否发布latest tag正式发版时选择测试版本切勿选择'
@ -36,26 +36,12 @@ on:
jobs: jobs:
build-and-push-to-fit2cloud-registry: build-and-push-to-fit2cloud-registry:
if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }} if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }}
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Check Disk Space - name: Clear Work Dir
run: df -h run: |
- name: Free Disk Space (Ubuntu) ls -la
uses: jlumbroso/free-disk-space@main rm -rf -- ./* ./.??*
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Check Disk Space
run: df -h
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@ -68,24 +54,19 @@ jobs:
TAG_NAME=${{ github.event.inputs.dockerImageTag }} TAG_NAME=${{ github.event.inputs.dockerImageTag }}
TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }} TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }}
if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:${TAG_NAME%%.*} --tag ${DOCKER_IMAGE}:latest"
else else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
fi fi
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --memory-swap -1 \ echo "buildx_args=--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
--build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \ --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \
${DOCKER_IMAGE_TAGS} . ${DOCKER_IMAGE_TAGS} ." >> $GITHUB_OUTPUT
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
with: with:
# Until https://github.com/tonistiigi/binfmt/issues/215 cache-image: false
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -98,32 +79,25 @@ jobs:
registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }} registry: ${{ secrets.FIT2CLOUD_REGISTRY_HOST }}
username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }} username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }}
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }} password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
- name: Build Web
run: |
docker buildx build --no-cache --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
rm -rf ./ui
cp -r ./web-build-output/ui ./
rm -rf ./web-build-output
- name: Docker Buildx (build-and-push) - name: Docker Buildx (build-and-push)
run: | run: |
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
build-and-push-to-dockerhub: build-and-push-to-dockerhub:
if: ${{ contains(github.event.inputs.registry, 'dockerhub') }} if: ${{ contains(github.event.inputs.registry, 'dockerhub') }}
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- name: Check Disk Space - name: Clear Work Dir
run: df -h run: |
- name: Free Disk Space (Ubuntu) ls -la
uses: jlumbroso/free-disk-space@main rm -rf -- ./* ./.??*
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Check Disk Space
run: df -h
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@ -136,24 +110,19 @@ jobs:
TAG_NAME=${{ github.event.inputs.dockerImageTag }} TAG_NAME=${{ github.event.inputs.dockerImageTag }}
TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }} TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }}
if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then if [[ ${TAG_NAME_WITH_LATEST} == 'true' ]]; then
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest" DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:${TAG_NAME%%.*} --tag ${DOCKER_IMAGE}:latest"
else else
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
fi fi
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --memory-swap -1 \ echo "buildx_args=--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
--build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \ --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \
${DOCKER_IMAGE_TAGS} . ${DOCKER_IMAGE_TAGS} ." >> $GITHUB_OUTPUT
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
with: with:
# Until https://github.com/tonistiigi/binfmt/issues/215 cache-image: false
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@ -165,6 +134,13 @@ jobs:
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Web
run: |
docker buildx build --no-cache --target web-build --output type=local,dest=./web-build-output . -f installer/Dockerfile
rm -rf ./ui
cp -r ./web-build-output/ui ./
rm -rf ./web-build-output
- name: Docker Buildx (build-and-push) - name: Docker Buildx (build-and-push)
run: | run: |
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile

View File

@ -1,8 +1,7 @@
name: Typos Check name: Typos Check
on: on:
workflow_dispatch:
push: push:
branches:
- main
pull_request: pull_request:
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
@ -12,7 +11,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Actions Repository - name: Checkout Actions Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Create config file
run: |
cat <<EOF > typo-check-config.toml
[files]
extend-exclude = [
"**/*_svg",
"**/migrations/**",
"**/loopEdge.ts",
"**/edge.ts",
]
EOF
- name: Check spelling - name: Check spelling
uses: crate-ci/typos@master uses: crate-ci/typos@master
with:
config: ./typo-check-config.toml

11
.gitignore vendored
View File

@ -137,9 +137,9 @@ celerybeat.pid
# Environments # Environments
.env .env
.venv .venv
env/ # env/
venv/ venv/
ENV/ # ENV/
env.bak/ env.bak/
venv.bak/ venv.bak/
@ -183,5 +183,10 @@ apps/xpack
data data
.dev .dev
poetry.lock poetry.lock
apps/setting/models_provider/impl/*/icon/ uv.lock
apps/models_provider/impl/*/icon/
apps/models_provider/impl/tencent_model_provider/credential/stt.py
apps/models_provider/impl/tencent_model_provider/model/stt.py
tmp/ tmp/
config.yml
.SANDBOX_BANNED_HOSTS

View File

@ -1,4 +0,0 @@
[files]
extend-exclude = [
'apps/setting/models_provider/impl/*/icon/*'
]

View File

@ -1,5 +1,6 @@
<p align="center"><img src= "https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf" alt="MaxKB" width="300" /></p> <p align="center"><img src= "https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf" alt="MaxKB" width="300" /></p>
<h3 align="center">Ready-to-use AI Chatbot</h3> <h3 align="center">Open-source platform for building enterprise-grade agents</h3>
<h3 align="center">强大易用的企业级智能体平台</h3>
<p align="center"><a href="https://trendshift.io/repositories/9113" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9113" alt="1Panel-dev%2FMaxKB | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a></p> <p align="center"><a href="https://trendshift.io/repositories/9113" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9113" alt="1Panel-dev%2FMaxKB | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a></p>
<p align="center"> <p align="center">
<a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/github/license/1Panel-dev/maxkb?color=%231890FF" alt="License: GPL v3"></a> <a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/github/license/1Panel-dev/maxkb?color=%231890FF" alt="License: GPL v3"></a>
@ -10,10 +11,10 @@
</p> </p>
<hr/> <hr/>
MaxKB = Max Knowledge Base, it is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities. MaxKB is widely applied in scenarios such as intelligent customer service, corporate internal knowledge bases, academic research, and education. MaxKB = Max Knowledge Brain, it is an open-source platform for building enterprise-grade agents. MaxKB integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities. MaxKB is widely applied in scenarios such as intelligent customer service, corporate internal knowledge bases, academic research, and education.
- **RAG Pipeline**: Supports direct uploading of documents / automatic crawling of online documents, with features for automatic text splitting, vectorization, and RAG (Retrieval-Augmented Generation). This effectively reduces hallucinations in large models, providing a superior smart Q&A interaction experience. - **RAG Pipeline**: Supports direct uploading of documents / automatic crawling of online documents, with features for automatic text splitting, vectorization. This effectively reduces hallucinations in large models, providing a superior smart Q&A interaction experience.
- **Flexible Orchestration**: Equipped with a powerful workflow engine, function library and MCP tool-use, enabling the orchestration of AI processes to meet the needs of complex business scenarios. - **Agentic Workflow**: Equipped with a powerful workflow engine, function library and MCP tool-use, enabling the orchestration of AI processes to meet the needs of complex business scenarios.
- **Seamless Integration**: Facilitates zero-coding rapid integration into third-party business systems, quickly equipping existing systems with intelligent Q&A capabilities to enhance user satisfaction. - **Seamless Integration**: Facilitates zero-coding rapid integration into third-party business systems, quickly equipping existing systems with intelligent Q&A capabilities to enhance user satisfaction.
- **Model-Agnostic**: Supports various large models, including private models (such as DeepSeek, Llama, Qwen, etc.) and public models (like OpenAI, Claude, Gemini, etc.). - **Model-Agnostic**: Supports various large models, including private models (such as DeepSeek, Llama, Qwen, etc.) and public models (like OpenAI, Claude, Gemini, etc.).
- **Multi Modal**: Native support for input and output text, image, audio and video. - **Multi Modal**: Native support for input and output text, image, audio and video.
@ -23,7 +24,7 @@ MaxKB = Max Knowledge Base, it is a ready-to-use AI chatbot that integrates Retr
Execute the script below to start a MaxKB container using Docker: Execute the script below to start a MaxKB container using Docker:
```bash ```bash
docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/var/lib/postgresql/data -v ~/.python-packages:/opt/maxkb/app/sandbox/python-packages 1panel/maxkb docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb 1panel/maxkb
``` ```
Access MaxKB web interface at `http://your_server_ip:8080` with default admin credentials: Access MaxKB web interface at `http://your_server_ip:8080` with default admin credentials:
@ -31,18 +32,18 @@ Access MaxKB web interface at `http://your_server_ip:8080` with default admin cr
- username: admin - username: admin
- password: MaxKB@123.. - password: MaxKB@123..
中国用户如遇到 Docker 镜像 Pull 失败问题,请参照该 [离线安装文档](https://maxkb.cn/docs/installation/offline_installtion/) 进行安装。 中国用户如遇到 Docker 镜像 Pull 失败问题,请参照该 [离线安装文档](https://maxkb.cn/docs/v2/installation/offline_installtion/) 进行安装。
## Screenshots ## Screenshots
<table style="border-collapse: collapse; border: 1px solid black;"> <table style="border-collapse: collapse; border: 1px solid black;">
<tr> <tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://maxkb.hk/images/overview.png" alt="MaxKB Demo1" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/eb285512-a66a-4752-8941-c65ed1592238" alt="MaxKB Demo1" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://maxkb.hk/images/screenshot-models.png" alt="MaxKB Demo2" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/f732f1f5-472c-4fd2-93c1-a277eda83d04" alt="MaxKB Demo2" /></td>
</tr> </tr>
<tr> <tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://maxkb.hk/images/screenshot-knowledge.png" alt="MaxKB Demo3" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/c927474a-9a23-4830-822f-5db26025c9b2" alt="MaxKB Demo3" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://maxkb.hk/images/screenshot-function.png" alt="MaxKB Demo4" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/e6268996-a46d-4e58-9f30-31139df78ad2" alt="MaxKB Demo4" /></td>
</tr> </tr>
</table> </table>
@ -53,69 +54,6 @@ Access MaxKB web interface at `http://your_server_ip:8080` with default admin cr
- LLM Framework[LangChain](https://www.langchain.com/) - LLM Framework[LangChain](https://www.langchain.com/)
- Database[PostgreSQL + pgvector](https://www.postgresql.org/) - Database[PostgreSQL + pgvector](https://www.postgresql.org/)
## Feature Comparison
MaxKB is positioned as an Ready-to-use RAG (Retrieval-Augmented Generation) intelligent Q&A application, rather than a middleware platform for building large model applications. The following table is merely a comparison from a functional perspective.
<table style="width: 100%;">
<tr>
<th align="center">Feature</th>
<th align="center">LangChain</th>
<th align="center">Dify.AI</th>
<th align="center">Flowise</th>
<th align="center">MaxKB <br>Built upon LangChain</th>
</tr>
<tr>
<td align="center">Supported LLMs</td>
<td align="center">Rich Variety</td>
<td align="center">Rich Variety</td>
<td align="center">Rich Variety</td>
<td align="center">Rich Variety</td>
</tr>
<tr>
<td align="center">RAG Engine</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center">Agent</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center">Workflow</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center">Observability</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center">SSO/Access control</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center">✅ (Pro)</td>
</tr>
<tr>
<td align="center">On-premise Deployment</td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
</table>
## Star History ## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=1Panel-dev/MaxKB&type=Date)](https://star-history.com/#1Panel-dev/MaxKB&Date) [![Star History Chart](https://api.star-history.com/svg?repos=1Panel-dev/MaxKB&type=Date)](https://star-history.com/#1Panel-dev/MaxKB&Date)

View File

@ -1,25 +1,25 @@
<p align="center"><img src= "https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf" alt="MaxKB" width="300" /></p> <p align="center"><img src= "https://github.com/1Panel-dev/maxkb/assets/52996290/c0694996-0eed-40d8-b369-322bf2a380bf" alt="MaxKB" width="300" /></p>
<h3 align="center">基于大模型和 RAG 的知识库问答系统</h3> <h3 align="center">强大易用的企业级智能体平台</h3>
<h4 align="center">Ready-to-use, flexible RAG Chatbot</h4>
<p align="center"> <p align="center">
<a href="https://trendshift.io/repositories/9113" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9113" alt="1Panel-dev%2FMaxKB | Trendshift" style="width: 250px; height: auto;" /></a> <a href="https://trendshift.io/repositories/9113" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9113" alt="1Panel-dev%2FMaxKB | Trendshift" style="width: 250px; height: auto;" /></a>
<a href="https://market.aliyun.com/products/53690006/cmjj00067609.html?userCode=kmemb8jp" target="_blank"><img src="https://img.alicdn.com/imgextra/i2/O1CN01H5JIwY1rZ0OobDjnJ_!!6000000005644-2-tps-1000-216.png" alt="1Panel-dev%2FMaxKB | Aliyun" style="width: 250px; height: auto;" /></a>
</p> </p>
<p align="center"> <p align="center">
<a href="README_EN.md"><img src="https://img.shields.io/badge/English_README-blue" alt="English README"></a> <a href="README_EN.md"><img src="https://img.shields.io/badge/English_README-blue" alt="English README"></a>
<a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/github/license/1Panel-dev/maxkb" alt="License: GPL v3"></a> <a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/github/license/1Panel-dev/maxkb?color=%231890FF" alt="License: GPL v3"></a>
<a href="https://github.com/1Panel-dev/maxkb/releases/latest"><img src="https://img.shields.io/github/v/release/1Panel-dev/maxkb" alt="Latest release"></a> <a href="https://github.com/1Panel-dev/maxkb/releases/latest"><img src="https://img.shields.io/github/v/release/1Panel-dev/maxkb" alt="Latest release"></a>
<a href="https://github.com/1Panel-dev/maxkb"><img src="https://img.shields.io/github/stars/1Panel-dev/maxkb?style=flat-square" alt="Stars"></a> <a href="https://github.com/1Panel-dev/maxkb"><img src="https://img.shields.io/github/stars/1Panel-dev/maxkb?style=flat-square" alt="Stars"></a>
<a href="https://hub.docker.com/r/1panel/maxkb"><img src="https://img.shields.io/docker/pulls/1panel/maxkb?label=downloads" alt="Download"></a> <a href="https://hub.docker.com/r/1panel/maxkb"><img src="https://img.shields.io/docker/pulls/1panel/maxkb?label=downloads" alt="Download"></a>
<a href="https://gitee.com/fit2cloud-feizhiyun/MaxKB"><img src="https://gitee.com/fit2cloud-feizhiyun/MaxKB/badge/star.svg?theme=gvp" alt="Gitee Stars"></a>
<a href="https://gitcode.com/feizhiyun/MaxKB"><img src="https://gitcode.com/feizhiyun/MaxKB/star/badge.svg" alt="GitCode Stars"></a>
</p> </p>
<hr/> <hr/>
MaxKB = Max Knowledge Base是一款开箱即用的 RAG Chatbot具备强大的工作流和 MCP 工具调用能力。它支持对接各种主流大语言模型LLMs广泛应用于智能客服、企业内部知识库、学术研究与教育等场景。 MaxKB = Max Knowledge Brain是一个强大易用的企业级智能体平台致力于解决企业 AI 落地面临的技术门槛高、部署成本高、迭代周期长等问题助力企业在人工智能时代赢得先机。秉承“开箱即用伴随成长”的设计理念MaxKB 支持企业快速接入主流大模型高效构建专属知识库并提供从基础问答RAG、复杂流程自动化工作流到智能体Agent的渐进式升级路径全面赋能智能客服、智能办公助手等多种应用场景。
- **开箱即用**:支持直接上传文档 / 自动爬取在线文档,支持文本自动拆分、向量化和 RAG检索增强生成有效减少大模型幻觉智能问答交互体验好 - **RAG 检索增强生成**:高效搭建本地 AI 知识库,支持直接上传文档 / 自动爬取在线文档,支持文本自动拆分、向量化,有效减少大模型幻觉,提升问答效果;
- **模型中立**支持对接各种大模型包括本地私有大模型DeepSeek R1 / Llama 3 / Qwen 2 等)、国内公共大模型(通义千问 / 腾讯混元 / 字节豆包 / 百度千帆 / 智谱 AI / Kimi 等和国外公共大模型OpenAI / Claude / Gemini 等);
- **灵活编排**:内置强大的工作流引擎、函数库和 MCP 工具调用能力,支持编排 AI 工作过程,满足复杂业务场景下的需求; - **灵活编排**:内置强大的工作流引擎、函数库和 MCP 工具调用能力,支持编排 AI 工作过程,满足复杂业务场景下的需求;
- **无缝嵌入**:支持零编码快速嵌入到第三方业务系统,让已有系统快速拥有智能问答能力,提高用户满意度。 - **无缝嵌入**:支持零编码快速嵌入到第三方业务系统,让已有系统快速拥有智能问答能力,提高用户满意度;
- **模型中立**支持对接各种大模型包括本地私有大模型DeepSeek R1 / Qwen 3 等)、国内公共大模型(通义千问 / 腾讯混元 / 字节豆包 / 百度千帆 / 智谱 AI / Kimi 等和国外公共大模型OpenAI / Claude / Gemini 等)。
MaxKB 三分钟视频介绍https://www.bilibili.com/video/BV18JypYeEkj/ MaxKB 三分钟视频介绍https://www.bilibili.com/video/BV18JypYeEkj/
@ -27,10 +27,10 @@ MaxKB 三分钟视频介绍https://www.bilibili.com/video/BV18JypYeEkj/
``` ```
# Linux 机器 # Linux 机器
docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/var/lib/postgresql/data -v ~/.python-packages:/opt/maxkb/app/sandbox/python-packages registry.fit2cloud.com/maxkb/maxkb docker run -d --name=maxkb --restart=always -p 8080:8080 -v ~/.maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb
# Windows 机器 # Windows 机器
docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/var/lib/postgresql/data -v C:/python-packages:/opt/maxkb/app/sandbox/python-packages registry.fit2cloud.com/maxkb/maxkb docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/opt/maxkb registry.fit2cloud.com/maxkb/maxkb
# 用户名: admin # 用户名: admin
# 密码: MaxKB@123.. # 密码: MaxKB@123..
@ -38,8 +38,8 @@ docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/var/lib/po
- 你也可以通过 [1Panel 应用商店](https://apps.fit2cloud.com/1panel) 快速部署 MaxKB - 你也可以通过 [1Panel 应用商店](https://apps.fit2cloud.com/1panel) 快速部署 MaxKB
- 如果是内网环境,推荐使用 [离线安装包](https://community.fit2cloud.com/#/products/maxkb/downloads) 进行安装部署; - 如果是内网环境,推荐使用 [离线安装包](https://community.fit2cloud.com/#/products/maxkb/downloads) 进行安装部署;
- MaxKB 产品版本分为社区版和专业版,详情请参见:[MaxKB 产品版本对比](https://maxkb.cn/pricing.html) - MaxKB 不同产品产品版本的对比请参见:[MaxKB 产品版本对比](https://maxkb.cn/price)
- 如果您需要向团队介绍 MaxKB可以使用这个 [官方 PPT 材料](https://maxkb.cn/download/introduce-maxkb_202503.pdf)。 - 如果您需要向团队介绍 MaxKB可以使用这个 [官方 PPT 材料](https://fit2cloud.com/maxkb/download/introduce-maxkb_202507.pdf)。
如你有更多问题,可以查看使用手册,或者通过论坛与我们交流。 如你有更多问题,可以查看使用手册,或者通过论坛与我们交流。
@ -54,12 +54,12 @@ docker run -d --name=maxkb --restart=always -p 8080:8080 -v C:/maxkb:/var/lib/po
<table style="border-collapse: collapse; border: 1px solid black;"> <table style="border-collapse: collapse; border: 1px solid black;">
<tr> <tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/1Panel-dev/MaxKB/assets/52996290/d87395fa-a8d7-401c-82bf-c6e475d10ae9" alt="MaxKB Demo1" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/eb285512-a66a-4752-8941-c65ed1592238" alt="MaxKB Demo1" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/1Panel-dev/MaxKB/assets/52996290/47c35ee4-3a3b-4bd4-9f4f-ee20788b2b9a" alt="MaxKB Demo2" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/f732f1f5-472c-4fd2-93c1-a277eda83d04" alt="MaxKB Demo2" /></td>
</tr> </tr>
<tr> <tr>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/9a1043cb-fa62-4f71-b9a3-0b46fa59a70e" alt="MaxKB Demo3" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/c927474a-9a23-4830-822f-5db26025c9b2" alt="MaxKB Demo3" /></td>
<td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/3407ce9a-779c-4eb4-858e-9441a2ddc664" alt="MaxKB Demo4" /></td> <td style="padding: 5px;background-color:#fff;"><img src= "https://github.com/user-attachments/assets/e6268996-a46d-4e58-9f30-31139df78ad2" alt="MaxKB Demo4" /></td>
</tr> </tr>
</table> </table>

View File

@ -0,0 +1,35 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file application_access_token.py
@date2025/6/9 17:46
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_access_token import AccessTokenEditSerializer
from common.mixins.api_mixin import APIMixin
class ApplicationAccessTokenAPI(APIMixin):
@staticmethod
def get_parameters():
return [OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
), OpenApiParameter(
name="application_id",
description="应用id",
type=OpenApiTypes.STR,
location='path',
required=True,
)]
@staticmethod
def get_request():
return AccessTokenEditSerializer

View File

@ -0,0 +1,218 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file application.py
@date2025/5/26 16:59
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from rest_framework import serializers
from application.serializers.application import ApplicationCreateSerializer, ApplicationListResponse, \
ApplicationImportRequest, ApplicationEditSerializer, TextToSpeechRequest, SpeechToTextRequest, PlayDemoTextRequest
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer, ResultPageSerializer, DefaultResultSerializer
class ApplicationCreateRequest(ApplicationCreateSerializer.SimplateRequest):
work_flow = serializers.DictField(required=True, label=_("Workflow Objects"))
class ApplicationCreateResponse(ResultSerializer):
def get_data(self):
return ApplicationCreateSerializer.ApplicationResponse()
class ApplicationListResult(ResultSerializer):
def get_data(self):
return ApplicationListResponse(many=True)
class ApplicationPageResult(ResultPageSerializer):
def get_data(self):
return ApplicationListResponse(many=True)
class ApplicationQueryAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="current_page",
description=_("Current page"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="page_size",
description=_("Page size"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="folder_id",
description=_("folder id"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="name",
description=_("Application Name"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="desc",
description=_("Application Description"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="user_id",
description=_("User ID"),
type=OpenApiTypes.STR,
location='query',
required=False,
),
OpenApiParameter(
name="publish_status",
description=_("Publish status") + '(published|unpublished)',
type=OpenApiTypes.STR,
location='query',
required=False,
)
]
@staticmethod
def get_response():
return ApplicationListResult
@staticmethod
def get_page_response():
return ApplicationPageResult
class ApplicationCreateAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
@staticmethod
def get_request():
return ApplicationCreateRequest
@staticmethod
def get_response():
return ApplicationCreateResponse
class ApplicationImportAPI(APIMixin):
@staticmethod
def get_parameters():
ApplicationCreateAPI.get_parameters()
@staticmethod
def get_request():
return ApplicationImportRequest
class ApplicationOperateAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="应用id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class ApplicationExportAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_response():
return DefaultResultSerializer
class ApplicationEditAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationEditSerializer
class TextToSpeechAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_request():
return TextToSpeechRequest
@staticmethod
def get_response():
return DefaultResultSerializer
class SpeechToTextAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_request():
return SpeechToTextRequest
@staticmethod
def get_response():
return DefaultResultSerializer
class PlayDemoTextAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationOperateAPI.get_parameters()
@staticmethod
def get_request():
return PlayDemoTextRequest
@staticmethod
def get_response():
return DefaultResultSerializer

View File

@ -0,0 +1,61 @@
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_api_key import EditApplicationKeySerializer, ApplicationKeySerializerModel
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer
class ApplicationKeyListResult(ResultSerializer):
def get_data(self):
return ApplicationKeySerializerModel(many=True)
class ApplicationKeyResult(ResultSerializer):
def get_data(self):
return ApplicationKeySerializerModel()
class ApplicationKeyAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
@staticmethod
def get_response():
return ApplicationKeyResult
class List(APIMixin):
@staticmethod
def get_response():
return ApplicationKeyListResult
class Operate(APIMixin):
@staticmethod
def get_parameters():
return [*ApplicationKeyAPI.get_parameters(), OpenApiParameter(
name="api_key_id",
description="ApiKeyId",
type=OpenApiTypes.STR,
location='path',
required=True,
)]
@staticmethod
def get_request():
return EditApplicationKeySerializer

View File

@ -0,0 +1,141 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file application_chat.py
@date2025/6/10 13:54
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_chat import ApplicationChatQuerySerializers, \
ApplicationChatResponseSerializers, ApplicationChatRecordExportRequest
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer, ResultPageSerializer
class ApplicationChatListResponseSerializers(ResultSerializer):
def get_data(self):
return ApplicationChatResponseSerializers(many=True)
class ApplicationChatPageResponseSerializers(ResultPageSerializer):
def get_data(self):
return ApplicationChatResponseSerializers(many=True)
class ApplicationChatQueryAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatQuerySerializers
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
), OpenApiParameter(
name="start_time",
description="start Time",
type=OpenApiTypes.STR,
required=True,
),
OpenApiParameter(
name="end_time",
description="end Time",
type=OpenApiTypes.STR,
required=True,
),
OpenApiParameter(
name="abstract",
description="summary",
type=OpenApiTypes.STR,
required=False,
),
OpenApiParameter(
name="username",
description="username",
type=OpenApiTypes.STR,
required=False,
),
OpenApiParameter(
name="min_star",
description=_("Minimum number of likes"),
type=OpenApiTypes.INT,
required=False,
),
OpenApiParameter(
name="min_trample",
description=_("Minimum number of clicks"),
type=OpenApiTypes.INT,
required=False,
),
OpenApiParameter(
name="comparer",
description=_("Comparator"),
type=OpenApiTypes.STR,
required=False,
),
]
@staticmethod
def get_response():
return ApplicationChatListResponseSerializers
class ApplicationChatQueryPageAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatQueryAPI.get_request()
@staticmethod
def get_parameters():
return [
*ApplicationChatQueryAPI.get_parameters(),
OpenApiParameter(
name="current_page",
description=_("Current page"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="page_size",
description=_("Page size"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
]
@staticmethod
def get_response():
return ApplicationChatPageResponseSerializers
class ApplicationChatExportAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatRecordExportRequest
@staticmethod
def get_parameters():
return ApplicationChatQueryAPI.get_parameters()
@staticmethod
def get_response():
return None

View File

@ -0,0 +1,180 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file application_chat_record.py
@date2025/6/10 15:19
@desc:
"""
from django.utils.translation import gettext_lazy as _
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_chat_record import ApplicationChatRecordAddKnowledgeSerializer, \
ApplicationChatRecordImproveInstanceSerializer
from common.mixins.api_mixin import APIMixin
class ApplicationChatRecordQueryAPI(APIMixin):
@staticmethod
def get_response():
pass
@staticmethod
def get_request():
pass
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_id",
description=_("Chat ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="order_asc",
description=_("Is it in order"),
type=OpenApiTypes.BOOL,
required=True,
)
]
class ApplicationChatRecordPageQueryAPI(APIMixin):
@staticmethod
def get_response():
pass
@staticmethod
def get_request():
pass
@staticmethod
def get_parameters():
return [*ApplicationChatRecordQueryAPI.get_parameters(),
OpenApiParameter(
name="current_page",
description=_("Current page"),
type=OpenApiTypes.INT,
location='path',
required=True,
),
OpenApiParameter(
name="page_size",
description=_("Page size"),
type=OpenApiTypes.INT,
location='path',
required=True,
)]
class ApplicationChatRecordImproveParagraphAPI(APIMixin):
@staticmethod
def get_response():
pass
@staticmethod
def get_request():
return ApplicationChatRecordImproveInstanceSerializer
@staticmethod
def get_parameters():
return [OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_id",
description=_("Chat ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="chat_record_id",
description=_("Chat Record ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="knowledge_id",
description=_("Knowledge ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="document_id",
description=_("Document ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class Operate(APIMixin):
@staticmethod
def get_parameters():
return [*ApplicationChatRecordImproveParagraphAPI.get_parameters(), OpenApiParameter(
name="paragraph_id",
description=_("Paragraph ID"),
type=OpenApiTypes.STR,
location='path',
required=True,
)]
class ApplicationChatRecordAddKnowledgeAPI(APIMixin):
@staticmethod
def get_request():
return ApplicationChatRecordAddKnowledgeSerializer
@staticmethod
def get_response():
return None
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="Application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
)]

View File

@ -0,0 +1,55 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file application_stats.py
@date2025/6/9 20:45
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_stats import ApplicationStatsSerializer
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer
class ApplicationStatsResult(ResultSerializer):
def get_data(self):
return ApplicationStatsSerializer(many=True)
class ApplicationStatsAPI(APIMixin):
@staticmethod
def get_parameters():
return [OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="start_time",
description="start Time",
type=OpenApiTypes.STR,
required=True,
),
OpenApiParameter(
name="end_time",
description="end Time",
type=OpenApiTypes.STR,
required=True,
),
]
@staticmethod
def get_response():
return ApplicationStatsResult

View File

@ -0,0 +1,96 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file application_version.py
@date2025/6/4 17:33
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from application.serializers.application_version import ApplicationVersionModelSerializer
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer, PageDataResponse, ResultPageSerializer
class ApplicationListVersionResult(ResultSerializer):
def get_data(self):
return ApplicationVersionModelSerializer(many=True)
class ApplicationPageVersionResult(ResultPageSerializer):
def get_data(self):
return ApplicationVersionModelSerializer(many=True)
class ApplicationWorkflowVersionResult(ResultSerializer):
def get_data(self):
return ApplicationVersionModelSerializer()
class ApplicationVersionAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="workspace_id",
description="工作空间id",
type=OpenApiTypes.STR,
location='path',
required=True,
),
OpenApiParameter(
name="application_id",
description="application ID",
type=OpenApiTypes.STR,
location='path',
required=True,
)
]
class ApplicationVersionOperateAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="application_version_id",
description="工作流版本id",
type=OpenApiTypes.STR,
location='path',
required=True,
)
, *ApplicationVersionAPI.get_parameters()
]
@staticmethod
def get_response():
return ApplicationWorkflowVersionResult
class ApplicationVersionListAPI(APIMixin):
@staticmethod
def get_parameters():
return [
OpenApiParameter(
name="name",
description="Version Name",
type=OpenApiTypes.STR,
required=False,
)
, *ApplicationVersionAPI.get_parameters()]
@staticmethod
def get_response():
return ApplicationListVersionResult
class ApplicationVersionPageAPI(APIMixin):
@staticmethod
def get_parameters():
return ApplicationVersionListAPI.get_parameters()
@staticmethod
def get_response():
return ApplicationPageVersionResult

View File

@ -12,42 +12,45 @@ from typing import Type
from rest_framework import serializers from rest_framework import serializers
from dataset.models import Paragraph from knowledge.models import Paragraph
class ParagraphPipelineModel: class ParagraphPipelineModel:
def __init__(self, _id: str, document_id: str, dataset_id: str, content: str, title: str, status: str, def __init__(self, _id: str, document_id: str, knowledge_id: str, content: str, title: str, status: str,
is_active: bool, comprehensive_score: float, similarity: float, dataset_name: str, document_name: str, is_active: bool, comprehensive_score: float, similarity: float, knowledge_name: str,
hit_handling_method: str, directly_return_similarity: float, meta: dict = None): document_name: str,
hit_handling_method: str, directly_return_similarity: float, knowledge_type, meta: dict = None):
self.id = _id self.id = _id
self.document_id = document_id self.document_id = document_id
self.dataset_id = dataset_id self.knowledge_id = knowledge_id
self.content = content self.content = content
self.title = title self.title = title
self.status = status, self.status = status,
self.is_active = is_active self.is_active = is_active
self.comprehensive_score = comprehensive_score self.comprehensive_score = comprehensive_score
self.similarity = similarity self.similarity = similarity
self.dataset_name = dataset_name self.knowledge_name = knowledge_name
self.document_name = document_name self.document_name = document_name
self.hit_handling_method = hit_handling_method self.hit_handling_method = hit_handling_method
self.directly_return_similarity = directly_return_similarity self.directly_return_similarity = directly_return_similarity
self.meta = meta self.meta = meta
self.knowledge_type = knowledge_type
def to_dict(self): def to_dict(self):
return { return {
'id': self.id, 'id': self.id,
'document_id': self.document_id, 'document_id': self.document_id,
'dataset_id': self.dataset_id, 'knowledge_id': self.knowledge_id,
'content': self.content, 'content': self.content,
'title': self.title, 'title': self.title,
'status': self.status, 'status': self.status,
'is_active': self.is_active, 'is_active': self.is_active,
'comprehensive_score': self.comprehensive_score, 'comprehensive_score': self.comprehensive_score,
'similarity': self.similarity, 'similarity': self.similarity,
'dataset_name': self.dataset_name, 'knowledge_name': self.knowledge_name,
'document_name': self.document_name, 'document_name': self.document_name,
'knowledge_type': self.knowledge_type,
'meta': self.meta, 'meta': self.meta,
} }
@ -57,7 +60,8 @@ class ParagraphPipelineModel:
self.paragraph = {} self.paragraph = {}
self.comprehensive_score = None self.comprehensive_score = None
self.document_name = None self.document_name = None
self.dataset_name = None self.knowledge_name = None
self.knowledge_type = None
self.hit_handling_method = None self.hit_handling_method = None
self.directly_return_similarity = 0.9 self.directly_return_similarity = 0.9
self.meta = {} self.meta = {}
@ -66,7 +70,7 @@ class ParagraphPipelineModel:
if isinstance(paragraph, Paragraph): if isinstance(paragraph, Paragraph):
self.paragraph = {'id': paragraph.id, self.paragraph = {'id': paragraph.id,
'document_id': paragraph.document_id, 'document_id': paragraph.document_id,
'dataset_id': paragraph.dataset_id, 'knowledge_id': paragraph.knowledge_id,
'content': paragraph.content, 'content': paragraph.content,
'title': paragraph.title, 'title': paragraph.title,
'status': paragraph.status, 'status': paragraph.status,
@ -76,8 +80,12 @@ class ParagraphPipelineModel:
self.paragraph = paragraph self.paragraph = paragraph
return self return self
def add_dataset_name(self, dataset_name): def add_knowledge_name(self, knowledge_name):
self.dataset_name = dataset_name self.knowledge_name = knowledge_name
return self
def add_knowledge_type(self, knowledge_type):
self.knowledge_type = knowledge_type
return self return self
def add_document_name(self, document_name): def add_document_name(self, document_name):
@ -106,12 +114,13 @@ class ParagraphPipelineModel:
def build(self): def build(self):
return ParagraphPipelineModel(str(self.paragraph.get('id')), str(self.paragraph.get('document_id')), return ParagraphPipelineModel(str(self.paragraph.get('id')), str(self.paragraph.get('document_id')),
str(self.paragraph.get('dataset_id')), str(self.paragraph.get('knowledge_id')),
self.paragraph.get('content'), self.paragraph.get('title'), self.paragraph.get('content'), self.paragraph.get('title'),
self.paragraph.get('status'), self.paragraph.get('status'),
self.paragraph.get('is_active'), self.paragraph.get('is_active'),
self.comprehensive_score, self.similarity, self.dataset_name, self.comprehensive_score, self.similarity, self.knowledge_name,
self.document_name, self.hit_handling_method, self.directly_return_similarity, self.document_name, self.hit_handling_method, self.directly_return_similarity,
self.knowledge_type,
self.meta) self.meta)

View File

@ -17,12 +17,14 @@ from common.handle.impl.response.system_to_response import SystemToResponse
class PipelineManage: class PipelineManage:
def __init__(self, step_list: List[Type[IBaseChatPipelineStep]], def __init__(self, step_list: List[Type[IBaseChatPipelineStep]],
base_to_response: BaseToResponse = SystemToResponse()): base_to_response: BaseToResponse = SystemToResponse(),
debug=False):
# 步骤执行器 # 步骤执行器
self.step_list = [step() for step in step_list] self.step_list = [step() for step in step_list]
# 上下文 # 上下文
self.context = {'message_tokens': 0, 'answer_tokens': 0} self.context = {'message_tokens': 0, 'answer_tokens': 0}
self.base_to_response = base_to_response self.base_to_response = base_to_response
self.debug = debug
def run(self, context: Dict = None): def run(self, context: Dict = None):
self.context['start_time'] = time.time() self.context['start_time'] = time.time()
@ -44,6 +46,7 @@ class PipelineManage:
def __init__(self): def __init__(self):
self.step_list: List[Type[IBaseChatPipelineStep]] = [] self.step_list: List[Type[IBaseChatPipelineStep]] = []
self.base_to_response = SystemToResponse() self.base_to_response = SystemToResponse()
self.debug = False
def append_step(self, step: Type[IBaseChatPipelineStep]): def append_step(self, step: Type[IBaseChatPipelineStep]):
self.step_list.append(step) self.step_list.append(step)
@ -53,5 +56,9 @@ class PipelineManage:
self.base_to_response = base_to_response self.base_to_response = base_to_response
return self return self
def add_debug(self, debug):
self.debug = debug
return self
def build(self): def build(self):
return PipelineManage(step_list=self.step_list, base_to_response=self.base_to_response) return PipelineManage(step_list=self.step_list, base_to_response=self.base_to_response, debug=self.debug)

View File

@ -16,9 +16,8 @@ from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage from application.chat_pipeline.pipeline_manage import PipelineManage
from application.serializers.application_serializers import NoReferencesSetting from application.serializers.application import NoReferencesSetting
from common.field.common import InstanceField from common.field.common import InstanceField
from common.util.field_message import ErrMessage
class ModelField(serializers.Field): class ModelField(serializers.Field):
@ -45,7 +44,7 @@ class PostResponseHandler:
@abstractmethod @abstractmethod
def handler(self, chat_id, chat_record_id, paragraph_list: List[ParagraphPipelineModel], problem_text: str, def handler(self, chat_id, chat_record_id, paragraph_list: List[ParagraphPipelineModel], problem_text: str,
answer_text, answer_text,
manage, step, padding_problem_text: str = None, client_id=None, **kwargs): manage, step, padding_problem_text: str = None, **kwargs):
pass pass
@ -53,35 +52,43 @@ class IChatStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer): class InstanceSerializer(serializers.Serializer):
# 对话列表 # 对话列表
message_list = serializers.ListField(required=True, child=MessageField(required=True), message_list = serializers.ListField(required=True, child=MessageField(required=True),
error_messages=ErrMessage.list(_("Conversation list"))) label=_("Conversation list"))
model_id = serializers.UUIDField(required=False, allow_null=True, error_messages=ErrMessage.uuid(_("Model id"))) model_id = serializers.UUIDField(required=False, allow_null=True, label=_("Model id"))
# 段落列表 # 段落列表
paragraph_list = serializers.ListField(error_messages=ErrMessage.list(_("Paragraph List"))) paragraph_list = serializers.ListField(label=_("Paragraph List"))
# 对话id # 对话id
chat_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("Conversation ID"))) chat_id = serializers.UUIDField(required=True, label=_("Conversation ID"))
# 用户问题 # 用户问题
problem_text = serializers.CharField(required=True, error_messages=ErrMessage.uuid(_("User Questions"))) problem_text = serializers.CharField(required=True, label=_("User Questions"))
# 后置处理器 # 后置处理器
post_response_handler = InstanceField(model_type=PostResponseHandler, post_response_handler = InstanceField(model_type=PostResponseHandler,
error_messages=ErrMessage.base(_("Post-processor"))) label=_("Post-processor"))
# 补全问题 # 补全问题
padding_problem_text = serializers.CharField(required=False, padding_problem_text = serializers.CharField(required=False,
error_messages=ErrMessage.base(_("Completion Question"))) label=_("Completion Question"))
# 是否使用流的形式输出 # 是否使用流的形式输出
stream = serializers.BooleanField(required=False, error_messages=ErrMessage.base(_("Streaming Output"))) stream = serializers.BooleanField(required=False, label=_("Streaming Output"))
client_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Client id"))) chat_user_id = serializers.CharField(required=True, label=_("Chat user id"))
client_type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Client Type")))
chat_user_type = serializers.CharField(required=True, label=_("Chat user Type"))
# 未查询到引用分段 # 未查询到引用分段
no_references_setting = NoReferencesSetting(required=True, no_references_setting = NoReferencesSetting(required=True,
error_messages=ErrMessage.base(_("No reference segment settings"))) label=_("No reference segment settings"))
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("User ID"))) workspace_id = serializers.CharField(required=True, label=_("Workspace ID"))
model_setting = serializers.DictField(required=True, allow_null=True, model_setting = serializers.DictField(required=True, allow_null=True,
error_messages=ErrMessage.dict(_("Model settings"))) label=_("Model settings"))
model_params_setting = serializers.DictField(required=False, allow_null=True, model_params_setting = serializers.DictField(required=False, allow_null=True,
error_messages=ErrMessage.dict(_("Model parameter settings"))) label=_("Model parameter settings"))
mcp_enable = serializers.BooleanField(label="MCP否启用", required=False, default=False)
mcp_tool_ids = serializers.JSONField(label="MCP工具ID列表", required=False, default=list)
mcp_servers = serializers.JSONField(label="MCP服务列表", required=False, default=dict)
mcp_source = serializers.CharField(label="MCP Source", required=False, default="referencing")
tool_enable = serializers.BooleanField(label="工具是否启用", required=False, default=False)
tool_ids = serializers.JSONField(label="工具ID列表", required=False, default=list)
mcp_output_enable = serializers.BooleanField(label="MCP输出是否启用", required=False, default=True)
def is_valid(self, *, raise_exception=False): def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True) super().is_valid(raise_exception=True)
@ -102,9 +109,12 @@ class IChatStep(IBaseChatPipelineStep):
chat_id, problem_text, chat_id, problem_text,
post_response_handler: PostResponseHandler, post_response_handler: PostResponseHandler,
model_id: str = None, model_id: str = None,
user_id: str = None, workspace_id: str = None,
paragraph_list=None, paragraph_list=None,
manage: PipelineManage = None, manage: PipelineManage = None,
padding_problem_text: str = None, stream: bool = True, client_id=None, client_type=None, padding_problem_text: str = None, stream: bool = True, chat_user_id=None, chat_user_type=None,
no_references_setting=None, model_params_setting=None, model_setting=None, **kwargs): no_references_setting=None, model_params_setting=None, model_setting=None,
mcp_enable=False, mcp_tool_ids=None, mcp_servers='', mcp_source="referencing",
tool_enable=False, tool_ids=None, mcp_output_enable=True,
**kwargs):
pass pass

View File

@ -6,10 +6,11 @@
@date2024/1/9 18:25 @date2024/1/9 18:25
@desc: 对话step Base实现 @desc: 对话step Base实现
""" """
import logging import json
import os
import time import time
import traceback import traceback
import uuid import uuid_utils.compat as uuid
from typing import List from typing import List
from django.db.models import QuerySet from django.db.models import QuerySet
@ -18,22 +19,28 @@ from django.utils.translation import gettext as _
from langchain.chat_models.base import BaseChatModel from langchain.chat_models.base import BaseChatModel
from langchain.schema import BaseMessage from langchain.schema import BaseMessage
from langchain.schema.messages import HumanMessage, AIMessage from langchain.schema.messages import HumanMessage, AIMessage
from langchain_core.messages import AIMessageChunk from langchain_core.messages import AIMessageChunk, SystemMessage
from rest_framework import status from rest_framework import status
from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage from application.chat_pipeline.pipeline_manage import PipelineManage
from application.chat_pipeline.step.chat_step.i_chat_step import IChatStep, PostResponseHandler from application.chat_pipeline.step.chat_step.i_chat_step import IChatStep, PostResponseHandler
from application.flow.tools import Reasoning from application.flow.tools import Reasoning, mcp_response_generator
from application.models.api_key_model import ApplicationPublicAccessClient from application.models import ApplicationChatUserStats, ChatUserType
from common.constants.authentication_type import AuthenticationType from common.utils.logger import maxkb_logger
from setting.models_provider.tools import get_model_instance_by_model_user_id from common.utils.rsa_util import rsa_long_decrypt
from common.utils.tool_code import ToolExecutor
from maxkb.const import CONFIG
from models_provider.tools import get_model_instance_by_model_workspace_id
from tools.models import Tool
def add_access_num(client_id=None, client_type=None, application_id=None): def add_access_num(chat_user_id=None, chat_user_type=None, application_id=None):
if client_type == AuthenticationType.APPLICATION_ACCESS_TOKEN.value and application_id is not None: if [ChatUserType.ANONYMOUS_USER.value, ChatUserType.CHAT_USER.value].__contains__(
application_public_access_client = (QuerySet(ApplicationPublicAccessClient).filter(client_id=client_id, chat_user_type) and application_id is not None:
application_id=application_id) application_public_access_client = (QuerySet(ApplicationChatUserStats).filter(chat_user_id=chat_user_id,
chat_user_type=chat_user_type,
application_id=application_id)
.first()) .first())
if application_public_access_client is not None: if application_public_access_client is not None:
application_public_access_client.access_num = application_public_access_client.access_num + 1 application_public_access_client.access_num = application_public_access_client.access_num + 1
@ -52,6 +59,7 @@ def write_context(step, manage, request_token, response_token, all_text):
manage.context['answer_tokens'] = manage.context['answer_tokens'] + response_token manage.context['answer_tokens'] = manage.context['answer_tokens'] + response_token
def event_content(response, def event_content(response,
chat_id, chat_id,
chat_record_id, chat_record_id,
@ -63,7 +71,7 @@ def event_content(response,
message_list: List[BaseMessage], message_list: List[BaseMessage],
problem_text: str, problem_text: str,
padding_problem_text: str = None, padding_problem_text: str = None,
client_id=None, client_type=None, chat_user_id=None, chat_user_type=None,
is_ai_chat: bool = None, is_ai_chat: bool = None,
model_setting=None): model_setting=None):
if model_setting is None: if model_setting is None:
@ -85,6 +93,7 @@ def event_content(response,
reasoning_content_chunk = chunk.additional_kwargs.get('reasoning_content', '') reasoning_content_chunk = chunk.additional_kwargs.get('reasoning_content', '')
else: else:
reasoning_content_chunk = reasoning_chunk.get('reasoning_content') reasoning_content_chunk = reasoning_chunk.get('reasoning_content')
content_chunk = reasoning._normalize_content(content_chunk)
all_text += content_chunk all_text += content_chunk
if reasoning_content_chunk is None: if reasoning_content_chunk is None:
reasoning_content_chunk = '' reasoning_content_chunk = ''
@ -124,26 +133,24 @@ def event_content(response,
request_token = 0 request_token = 0
response_token = 0 response_token = 0
write_context(step, manage, request_token, response_token, all_text) write_context(step, manage, request_token, response_token, all_text)
asker = manage.context.get('form_data', {}).get('asker', None)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text, post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
all_text, manage, step, padding_problem_text, client_id, all_text, manage, step, padding_problem_text,
reasoning_content=reasoning_content if reasoning_content_enable else '' reasoning_content=reasoning_content if reasoning_content_enable else '')
, asker=asker)
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node', yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], '', True, [], '', True,
request_token, response_token, request_token, response_token,
{'node_is_end': True, 'view_type': 'many_view', {'node_is_end': True, 'view_type': 'many_view',
'node_type': 'ai-chat-node'}) 'node_type': 'ai-chat-node'})
add_access_num(client_id, client_type, manage.context.get('application_id')) if not manage.debug:
add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
except Exception as e: except Exception as e:
logging.getLogger("max_kb_error").error(f'{str(e)}:{traceback.format_exc()}') maxkb_logger.error(f'{str(e)}:{traceback.format_exc()}')
all_text = 'Exception:' + str(e) all_text = 'Exception:' + str(e)
write_context(step, manage, 0, 0, all_text) write_context(step, manage, 0, 0, all_text)
asker = manage.context.get('form_data', {}).get('asker', None)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text, post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
all_text, manage, step, padding_problem_text, client_id, reasoning_content='', all_text, manage, step, padding_problem_text, reasoning_content='')
asker=asker) if not manage.debug:
add_access_num(client_id, client_type, manage.context.get('application_id')) add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node', yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], all_text, [], all_text,
False, False,
@ -160,28 +167,40 @@ class BaseChatStep(IChatStep):
problem_text, problem_text,
post_response_handler: PostResponseHandler, post_response_handler: PostResponseHandler,
model_id: str = None, model_id: str = None,
user_id: str = None, workspace_id: str = None,
paragraph_list=None, paragraph_list=None,
manage: PipelineManage = None, manage: PipelineManage = None,
padding_problem_text: str = None, padding_problem_text: str = None,
stream: bool = True, stream: bool = True,
client_id=None, client_type=None, chat_user_id=None, chat_user_type=None,
no_references_setting=None, no_references_setting=None,
model_params_setting=None, model_params_setting=None,
model_setting=None, model_setting=None,
mcp_enable=False,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_enable=False,
tool_ids=None,
mcp_output_enable=True,
**kwargs): **kwargs):
chat_model = get_model_instance_by_model_user_id(model_id, user_id, chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting) if model_id is not None else None **model_params_setting) if model_id is not None else None
if stream: if stream:
return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model, return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model,
paragraph_list, paragraph_list,
manage, padding_problem_text, client_id, client_type, no_references_setting, manage, padding_problem_text, chat_user_id, chat_user_type,
model_setting) no_references_setting,
model_setting,
mcp_enable, mcp_tool_ids, mcp_servers, mcp_source, tool_enable, tool_ids,
mcp_output_enable)
else: else:
return self.execute_block(message_list, chat_id, problem_text, post_response_handler, chat_model, return self.execute_block(message_list, chat_id, problem_text, post_response_handler, chat_model,
paragraph_list, paragraph_list,
manage, padding_problem_text, client_id, client_type, no_references_setting, manage, padding_problem_text, chat_user_id, chat_user_type, no_references_setting,
model_setting) model_setting,
mcp_enable, mcp_tool_ids, mcp_servers, mcp_source, tool_enable, tool_ids,
mcp_output_enable)
def get_details(self, manage, **kwargs): def get_details(self, manage, **kwargs):
return { return {
@ -197,19 +216,69 @@ class BaseChatStep(IChatStep):
@staticmethod @staticmethod
def reset_message_list(message_list: List[BaseMessage], answer_text): def reset_message_list(message_list: List[BaseMessage], answer_text):
result = [{'role': 'user' if isinstance(message, HumanMessage) else 'ai', 'content': message.content} for result = [{'role': 'user' if isinstance(message, HumanMessage) else (
'system' if isinstance(message, SystemMessage) else 'ai'), 'content': message.content} for
message message
in in
message_list] message_list]
result.append({'role': 'ai', 'content': answer_text}) result.append({'role': 'ai', 'content': answer_text})
return result return result
@staticmethod def _handle_mcp_request(self, mcp_enable, tool_enable, mcp_source, mcp_servers, mcp_tool_ids, tool_ids,
def get_stream_result(message_list: List[BaseMessage], mcp_output_enable, chat_model, message_list):
if not mcp_enable and not tool_enable:
return None
mcp_servers_config = {}
# 迁移过来mcp_source是None
if mcp_source is None:
mcp_source = 'custom'
if mcp_enable:
# 兼容老数据
if not mcp_tool_ids:
mcp_tool_ids = []
if mcp_source == 'custom' and mcp_servers is not None and '"stdio"' not in mcp_servers:
mcp_servers_config = json.loads(mcp_servers)
elif mcp_tool_ids:
mcp_tools = QuerySet(Tool).filter(id__in=mcp_tool_ids).values()
for mcp_tool in mcp_tools:
if mcp_tool and mcp_tool['is_active']:
mcp_servers_config = {**mcp_servers_config, **json.loads(mcp_tool['code'])}
if tool_enable:
if tool_ids and len(tool_ids) > 0: # 如果有工具ID则将其转换为MCP
self.context['tool_ids'] = tool_ids
for tool_id in tool_ids:
tool = QuerySet(Tool).filter(id=tool_id).first()
if tool is None or tool.is_active is False:
continue
executor = ToolExecutor()
if tool.init_params is not None:
params = json.loads(rsa_long_decrypt(tool.init_params))
else:
params = {}
tool_config = executor.get_tool_mcp_config(tool.code, params)
mcp_servers_config[str(tool.id)] = tool_config
if len(mcp_servers_config) > 0:
return mcp_response_generator(chat_model, message_list, json.dumps(mcp_servers_config), mcp_output_enable)
return None
def get_stream_result(self, message_list: List[BaseMessage],
chat_model: BaseChatModel = None, chat_model: BaseChatModel = None,
paragraph_list=None, paragraph_list=None,
no_references_setting=None, no_references_setting=None,
problem_text=None): problem_text=None,
mcp_enable=False,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_enable=False,
tool_ids=None,
mcp_output_enable=True):
if paragraph_list is None: if paragraph_list is None:
paragraph_list = [] paragraph_list = []
directly_return_chunk_list = [AIMessageChunk(content=paragraph.content) directly_return_chunk_list = [AIMessageChunk(content=paragraph.content)
@ -225,6 +294,13 @@ class BaseChatStep(IChatStep):
return iter([AIMessageChunk( return iter([AIMessageChunk(
_('Sorry, the AI model is not configured. Please go to the application to set up the AI model first.'))]), False _('Sorry, the AI model is not configured. Please go to the application to set up the AI model first.'))]), False
else: else:
# 处理 MCP 请求
mcp_result = self._handle_mcp_request(
mcp_enable, tool_enable, mcp_source, mcp_servers, mcp_tool_ids, tool_ids, mcp_output_enable, chat_model,
message_list,
)
if mcp_result:
return mcp_result, True
return chat_model.stream(message_list), True return chat_model.stream(message_list), True
def execute_stream(self, message_list: List[BaseMessage], def execute_stream(self, message_list: List[BaseMessage],
@ -235,27 +311,44 @@ class BaseChatStep(IChatStep):
paragraph_list=None, paragraph_list=None,
manage: PipelineManage = None, manage: PipelineManage = None,
padding_problem_text: str = None, padding_problem_text: str = None,
client_id=None, client_type=None, chat_user_id=None, chat_user_type=None,
no_references_setting=None, no_references_setting=None,
model_setting=None): model_setting=None,
mcp_enable=False,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_enable=False,
tool_ids=None,
mcp_output_enable=True):
chat_result, is_ai_chat = self.get_stream_result(message_list, chat_model, paragraph_list, chat_result, is_ai_chat = self.get_stream_result(message_list, chat_model, paragraph_list,
no_references_setting, problem_text) no_references_setting, problem_text, mcp_enable, mcp_tool_ids,
chat_record_id = uuid.uuid1() mcp_servers, mcp_source, tool_enable, tool_ids,
mcp_output_enable)
chat_record_id = uuid.uuid7()
r = StreamingHttpResponse( r = StreamingHttpResponse(
streaming_content=event_content(chat_result, chat_id, chat_record_id, paragraph_list, streaming_content=event_content(chat_result, chat_id, chat_record_id, paragraph_list,
post_response_handler, manage, self, chat_model, message_list, problem_text, post_response_handler, manage, self, chat_model, message_list, problem_text,
padding_problem_text, client_id, client_type, is_ai_chat, model_setting), padding_problem_text, chat_user_id, chat_user_type, is_ai_chat,
model_setting),
content_type='text/event-stream;charset=utf-8') content_type='text/event-stream;charset=utf-8')
r['Cache-Control'] = 'no-cache' r['Cache-Control'] = 'no-cache'
return r return r
@staticmethod def get_block_result(self, message_list: List[BaseMessage],
def get_block_result(message_list: List[BaseMessage],
chat_model: BaseChatModel = None, chat_model: BaseChatModel = None,
paragraph_list=None, paragraph_list=None,
no_references_setting=None, no_references_setting=None,
problem_text=None): problem_text=None,
mcp_enable=False,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_enable=False,
tool_ids=None,
mcp_output_enable=True
):
if paragraph_list is None: if paragraph_list is None:
paragraph_list = [] paragraph_list = []
directly_return_chunk_list = [AIMessageChunk(content=paragraph.content) directly_return_chunk_list = [AIMessageChunk(content=paragraph.content)
@ -270,6 +363,13 @@ class BaseChatStep(IChatStep):
return AIMessage( return AIMessage(
_('Sorry, the AI model is not configured. Please go to the application to set up the AI model first.')), False _('Sorry, the AI model is not configured. Please go to the application to set up the AI model first.')), False
else: else:
# 处理 MCP 请求
mcp_result = self._handle_mcp_request(
mcp_enable, tool_enable, mcp_source, mcp_servers, mcp_tool_ids, tool_ids, mcp_output_enable,
chat_model, message_list,
)
if mcp_result:
return mcp_result, True
return chat_model.invoke(message_list), True return chat_model.invoke(message_list), True
def execute_block(self, message_list: List[BaseMessage], def execute_block(self, message_list: List[BaseMessage],
@ -280,18 +380,27 @@ class BaseChatStep(IChatStep):
paragraph_list=None, paragraph_list=None,
manage: PipelineManage = None, manage: PipelineManage = None,
padding_problem_text: str = None, padding_problem_text: str = None,
client_id=None, client_type=None, no_references_setting=None, chat_user_id=None, chat_user_type=None, no_references_setting=None,
model_setting=None): model_setting=None,
mcp_enable=False,
mcp_tool_ids=None,
mcp_servers='',
mcp_source="referencing",
tool_enable=False,
tool_ids=None,
mcp_output_enable=True):
reasoning_content_enable = model_setting.get('reasoning_content_enable', False) reasoning_content_enable = model_setting.get('reasoning_content_enable', False)
reasoning_content_start = model_setting.get('reasoning_content_start', '<think>') reasoning_content_start = model_setting.get('reasoning_content_start', '<think>')
reasoning_content_end = model_setting.get('reasoning_content_end', '</think>') reasoning_content_end = model_setting.get('reasoning_content_end', '</think>')
reasoning = Reasoning(reasoning_content_start, reasoning = Reasoning(reasoning_content_start,
reasoning_content_end) reasoning_content_end)
chat_record_id = uuid.uuid1() chat_record_id = uuid.uuid7()
# 调用模型 # 调用模型
try: try:
chat_result, is_ai_chat = self.get_block_result(message_list, chat_model, paragraph_list, chat_result, is_ai_chat = self.get_block_result(message_list, chat_model, paragraph_list,
no_references_setting, problem_text) no_references_setting, problem_text, mcp_enable,
mcp_tool_ids, mcp_servers, mcp_source, tool_enable,
tool_ids, mcp_output_enable)
if is_ai_chat: if is_ai_chat:
request_token = chat_model.get_num_tokens_from_messages(message_list) request_token = chat_model.get_num_tokens_from_messages(message_list)
response_token = chat_model.get_num_tokens(chat_result.content) response_token = chat_model.get_num_tokens(chat_result.content)
@ -303,16 +412,15 @@ class BaseChatStep(IChatStep):
reasoning_result_end = reasoning.get_end_reasoning_content() reasoning_result_end = reasoning.get_end_reasoning_content()
content = reasoning_result.get('content') + reasoning_result_end.get('content') content = reasoning_result.get('content') + reasoning_result_end.get('content')
if 'reasoning_content' in chat_result.response_metadata: if 'reasoning_content' in chat_result.response_metadata:
reasoning_content = chat_result.response_metadata.get('reasoning_content', '') reasoning_content = (chat_result.response_metadata.get('reasoning_content', '') or '')
else: else:
reasoning_content = reasoning_result.get('reasoning_content') + reasoning_result_end.get( reasoning_content = (reasoning_result.get('reasoning_content') or "") + (reasoning_result_end.get(
'reasoning_content') 'reasoning_content') or "")
asker = manage.context.get('form_data', {}).get('asker', None)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text, post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
content, manage, self, padding_problem_text, client_id, content, manage, self, padding_problem_text,
reasoning_content=reasoning_content if reasoning_content_enable else '', reasoning_content=reasoning_content)
asker=asker) if not manage.debug:
add_access_num(client_id, client_type, manage.context.get('application_id')) add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id), return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id),
content, True, content, True,
request_token, response_token, request_token, response_token,
@ -325,10 +433,9 @@ class BaseChatStep(IChatStep):
except Exception as e: except Exception as e:
all_text = 'Exception:' + str(e) all_text = 'Exception:' + str(e)
write_context(self, manage, 0, 0, all_text) write_context(self, manage, 0, 0, all_text)
asker = manage.context.get('form_data', {}).get('asker', None)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text, post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
all_text, manage, self, padding_problem_text, client_id, reasoning_content='', all_text, manage, self, padding_problem_text, reasoning_content='')
asker=asker) if not manage.debug:
add_access_num(client_id, client_type, manage.context.get('application_id')) add_access_num(chat_user_id, chat_user_type, manage.context.get('application_id'))
return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id), all_text, True, 0, return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id), all_text, True, 0,
0, _status=status.HTTP_500_INTERNAL_SERVER_ERROR) 0, _status=status.HTTP_500_INTERNAL_SERVER_ERROR)

View File

@ -16,34 +16,35 @@ from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage from application.chat_pipeline.pipeline_manage import PipelineManage
from application.models import ChatRecord from application.models import ChatRecord
from application.serializers.application_serializers import NoReferencesSetting from application.serializers.application import NoReferencesSetting
from common.field.common import InstanceField from common.field.common import InstanceField
from common.util.field_message import ErrMessage
class IGenerateHumanMessageStep(IBaseChatPipelineStep): class IGenerateHumanMessageStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer): class InstanceSerializer(serializers.Serializer):
# 问题 # 问题
problem_text = serializers.CharField(required=True, error_messages=ErrMessage.char(_("question"))) problem_text = serializers.CharField(required=True, label=_("question"))
# 段落列表 # 段落列表
paragraph_list = serializers.ListField(child=InstanceField(model_type=ParagraphPipelineModel, required=True), paragraph_list = serializers.ListField(child=InstanceField(model_type=ParagraphPipelineModel, required=True),
error_messages=ErrMessage.list(_("Paragraph List"))) label=_("Paragraph List"))
# 历史对答 # 历史对答
history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True), history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True),
error_messages=ErrMessage.list(_("History Questions"))) label=_("History Questions"))
# 多轮对话数量 # 多轮对话数量
dialogue_number = serializers.IntegerField(required=True, error_messages=ErrMessage.integer(_("Number of multi-round conversations"))) dialogue_number = serializers.IntegerField(required=True, label=_("Number of multi-round conversations"))
# 最大携带知识库段落长度 # 最大携带知识库段落长度
max_paragraph_char_number = serializers.IntegerField(required=True, error_messages=ErrMessage.integer( max_paragraph_char_number = serializers.IntegerField(required=True,
_("Maximum length of the knowledge base paragraph"))) label=_("Maximum length of the knowledge base paragraph"))
# 模板 # 模板
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word"))) prompt = serializers.CharField(required=True, label=_("Prompt word"))
system = serializers.CharField(required=False, allow_null=True, allow_blank=True, system = serializers.CharField(required=False, allow_null=True, allow_blank=True,
error_messages=ErrMessage.char(_("System prompt words (role)"))) label=_("System prompt words (role)"))
# 补齐问题 # 补齐问题
padding_problem_text = serializers.CharField(required=False, error_messages=ErrMessage.char(_("Completion problem"))) padding_problem_text = serializers.CharField(required=False,
label=_("Completion problem"))
# 未查询到引用分段 # 未查询到引用分段
no_references_setting = NoReferencesSetting(required=True, error_messages=ErrMessage.base(_("No reference segment settings"))) no_references_setting = NoReferencesSetting(required=True,
label=_("No reference segment settings"))
def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]: def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]:
return self.InstanceSerializer return self.InstanceSerializer

View File

@ -15,7 +15,7 @@ from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineMode
from application.chat_pipeline.step.generate_human_message_step.i_generate_human_message_step import \ from application.chat_pipeline.step.generate_human_message_step.i_generate_human_message_step import \
IGenerateHumanMessageStep IGenerateHumanMessageStep
from application.models import ChatRecord from application.models import ChatRecord
from common.util.split_model import flat_map from common.utils.common import flat_map
class BaseGenerateHumanMessageStep(IGenerateHumanMessageStep): class BaseGenerateHumanMessageStep(IGenerateHumanMessageStep):

View File

@ -16,22 +16,20 @@ from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep
from application.chat_pipeline.pipeline_manage import PipelineManage from application.chat_pipeline.pipeline_manage import PipelineManage
from application.models import ChatRecord from application.models import ChatRecord
from common.field.common import InstanceField from common.field.common import InstanceField
from common.util.field_message import ErrMessage
class IResetProblemStep(IBaseChatPipelineStep): class IResetProblemStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer): class InstanceSerializer(serializers.Serializer):
# 问题文本 # 问题文本
problem_text = serializers.CharField(required=True, error_messages=ErrMessage.float(_("question"))) problem_text = serializers.CharField(required=True, label=_("question"))
# 历史对答 # 历史对答
history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True), history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True),
error_messages=ErrMessage.list(_("History Questions"))) label=_("History Questions"))
# 大语言模型 # 大语言模型
model_id = serializers.UUIDField(required=False, allow_null=True, error_messages=ErrMessage.uuid(_("Model id"))) model_id = serializers.UUIDField(required=False, allow_null=True, label=_("Model id"))
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("User ID"))) workspace_id = serializers.CharField(required=True, label=_("User ID"))
problem_optimization_prompt = serializers.CharField(required=False, max_length=102400, problem_optimization_prompt = serializers.CharField(required=False, max_length=102400,
error_messages=ErrMessage.char( label=_("Question completion prompt"))
_("Question completion prompt")))
def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]: def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]:
return self.InstanceSerializer return self.InstanceSerializer
@ -52,6 +50,6 @@ class IResetProblemStep(IBaseChatPipelineStep):
@abstractmethod @abstractmethod
def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None, def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None,
problem_optimization_prompt=None, problem_optimization_prompt=None,
user_id=None, workspace_id=None,
**kwargs): **kwargs):
pass pass

View File

@ -13,8 +13,8 @@ from langchain.schema import HumanMessage
from application.chat_pipeline.step.reset_problem_step.i_reset_problem_step import IResetProblemStep from application.chat_pipeline.step.reset_problem_step.i_reset_problem_step import IResetProblemStep
from application.models import ChatRecord from application.models import ChatRecord
from common.util.split_model import flat_map from common.utils.split_model import flat_map
from setting.models_provider.tools import get_model_instance_by_model_user_id from models_provider.tools import get_model_instance_by_model_workspace_id
prompt = _( prompt = _(
"() contains the user's question. Answer the guessed user's question based on the context ({question}) Requirement: Output a complete question and put it in the <data></data> tag") "() contains the user's question. Answer the guessed user's question based on the context ({question}) Requirement: Output a complete question and put it in the <data></data> tag")
@ -23,9 +23,9 @@ prompt = _(
class BaseResetProblemStep(IResetProblemStep): class BaseResetProblemStep(IResetProblemStep):
def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None, def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None,
problem_optimization_prompt=None, problem_optimization_prompt=None,
user_id=None, workspace_id=None,
**kwargs) -> str: **kwargs) -> str:
chat_model = get_model_instance_by_model_user_id(model_id, user_id) if model_id is not None else None chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id) if model_id is not None else None
if chat_model is None: if chat_model is None:
return problem_text return problem_text
start_index = len(history_chat_record) - 3 start_index = len(history_chat_record) - 3

View File

@ -16,62 +16,62 @@ from rest_framework import serializers
from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel from application.chat_pipeline.I_base_chat_pipeline import IBaseChatPipelineStep, ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage from application.chat_pipeline.pipeline_manage import PipelineManage
from common.util.field_message import ErrMessage
class ISearchDatasetStep(IBaseChatPipelineStep): class ISearchDatasetStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer): class InstanceSerializer(serializers.Serializer):
# 原始问题文本 # 原始问题文本
problem_text = serializers.CharField(required=True, error_messages=ErrMessage.char(_("question"))) problem_text = serializers.CharField(required=True, label=_("question"))
# 系统补全问题文本 # 系统补全问题文本
padding_problem_text = serializers.CharField(required=False, padding_problem_text = serializers.CharField(required=False,
error_messages=ErrMessage.char(_("System completes question text"))) label=_("System completes question text"))
# 需要查询的数据集id列表 # 需要查询的数据集id列表
dataset_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True), knowledge_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
error_messages=ErrMessage.list(_("Dataset id list"))) label=_("Dataset id list"))
# 需要排除的文档id # 需要排除的文档id
exclude_document_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True), exclude_document_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
error_messages=ErrMessage.list(_("List of document ids to exclude"))) label=_("List of document ids to exclude"))
# 需要排除向量id # 需要排除向量id
exclude_paragraph_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True), exclude_paragraph_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
error_messages=ErrMessage.list(_("List of exclusion vector ids"))) label=_("List of exclusion vector ids"))
# 需要查询的条数 # 需要查询的条数
top_n = serializers.IntegerField(required=True, top_n = serializers.IntegerField(required=True,
error_messages=ErrMessage.integer(_("Reference segment number"))) label=_("Reference segment number"))
# 相似度 0-1之间 # 相似度 0-1之间
similarity = serializers.FloatField(required=True, max_value=1, min_value=0, similarity = serializers.FloatField(required=True, max_value=1, min_value=0,
error_messages=ErrMessage.float(_("Similarity"))) label=_("Similarity"))
search_mode = serializers.CharField(required=True, validators=[ search_mode = serializers.CharField(required=True, validators=[
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"), validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
message=_("The type only supports embedding|keywords|blend"), code=500) message=_("The type only supports embedding|keywords|blend"), code=500)
], error_messages=ErrMessage.char(_("Retrieval Mode"))) ], label=_("Retrieval Mode"))
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("User ID"))) workspace_id = serializers.CharField(required=True, label=_("Workspace ID"))
def get_step_serializer(self, manage: PipelineManage) -> Type[InstanceSerializer]: def get_step_serializer(self, manage: PipelineManage) -> Type[InstanceSerializer]:
return self.InstanceSerializer return self.InstanceSerializer
def _run(self, manage: PipelineManage): def _run(self, manage: PipelineManage):
paragraph_list = self.execute(**self.context['step_args']) paragraph_list = self.execute(**self.context['step_args'], manage=manage)
manage.context['paragraph_list'] = paragraph_list manage.context['paragraph_list'] = paragraph_list
self.context['paragraph_list'] = paragraph_list self.context['paragraph_list'] = paragraph_list
@abstractmethod @abstractmethod
def execute(self, problem_text: str, dataset_id_list: list[str], exclude_document_id_list: list[str], def execute(self, problem_text: str, knowledge_id_list: list[str], exclude_document_id_list: list[str],
exclude_paragraph_id_list: list[str], top_n: int, similarity: float, padding_problem_text: str = None, exclude_paragraph_id_list: list[str], top_n: int, similarity: float, padding_problem_text: str = None,
search_mode: str = None, search_mode: str = None,
user_id=None, workspace_id=None,
manage: PipelineManage = None,
**kwargs) -> List[ParagraphPipelineModel]: **kwargs) -> List[ParagraphPipelineModel]:
""" """
关于 用户和补全问题 说明: 补全问题如果有就使用补全问题去查询 反之就用用户原始问题查询 关于 用户和补全问题 说明: 补全问题如果有就使用补全问题去查询 反之就用用户原始问题查询
:param similarity: 相关性 :param similarity: 相关性
:param top_n: 查询多少条 :param top_n: 查询多少条
:param problem_text: 用户问题 :param problem_text: 用户问题
:param dataset_id_list: 需要查询的数据集id列表 :param knowledge_id_list: 需要查询的数据集id列表
:param exclude_document_id_list: 需要排除的文档id :param exclude_document_id_list: 需要排除的文档id
:param exclude_paragraph_id_list: 需要排除段落id :param exclude_paragraph_id_list: 需要排除段落id
:param padding_problem_text 补全问题 :param padding_problem_text 补全问题
:param search_mode 检索模式 :param search_mode 检索模式
:param user_id 用户id :param workspace_id 工作空间id
:return: 段落列表 :return: 段落列表
""" """
pass pass

View File

@ -16,51 +16,59 @@ from rest_framework.utils.formatting import lazy_format
from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel from application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel
from application.chat_pipeline.step.search_dataset_step.i_search_dataset_step import ISearchDatasetStep from application.chat_pipeline.step.search_dataset_step.i_search_dataset_step import ISearchDatasetStep
from common.config.embedding_config import VectorStore, ModelManage from common.config.embedding_config import VectorStore, ModelManage
from common.constants.permission_constants import RoleConstants
from common.database_model_manage.database_model_manage import DatabaseModelManage
from common.db.search import native_search from common.db.search import native_search
from common.util.file_util import get_file_content from common.utils.common import get_file_content
from dataset.models import Paragraph, DataSet from knowledge.models import Paragraph, Knowledge
from embedding.models import SearchMode from knowledge.models import SearchMode
from setting.models import Model from maxkb.conf import PROJECT_DIR
from setting.models_provider import get_model from models_provider.models import Model
from smartdoc.conf import PROJECT_DIR from models_provider.tools import get_model, get_model_by_id, get_model_default_params
def get_model_by_id(_id, user_id): def reset_meta(meta):
model = QuerySet(Model).filter(id=_id).first() if not meta.get('allow_download', False):
if model is None: return {'allow_download': False}
raise Exception(_("Model does not exist")) return meta
if model.permission_type == 'PRIVATE' and str(model.user_id) != str(user_id):
message = lazy_format(_('No permission to use this model {model_name}'), model_name=model.name)
raise Exception(message)
return model
def get_embedding_id(dataset_id_list): def get_embedding_id(knowledge_id_list):
dataset_list = QuerySet(DataSet).filter(id__in=dataset_id_list) knowledge_list = QuerySet(Knowledge).filter(id__in=knowledge_id_list)
if len(set([dataset.embedding_mode_id for dataset in dataset_list])) > 1: if len(set([knowledge.embedding_model_id for knowledge in knowledge_list])) > 1:
raise Exception(_("The vector model of the associated knowledge base is inconsistent and the segmentation cannot be recalled.")) raise Exception(
if len(dataset_list) == 0: _("The vector model of the associated knowledge base is inconsistent and the segmentation cannot be recalled."))
if len(knowledge_list) == 0:
raise Exception(_("The knowledge base setting is wrong, please reset the knowledge base")) raise Exception(_("The knowledge base setting is wrong, please reset the knowledge base"))
return dataset_list[0].embedding_mode_id return knowledge_list[0].embedding_model_id
class BaseSearchDatasetStep(ISearchDatasetStep): class BaseSearchDatasetStep(ISearchDatasetStep):
def execute(self, problem_text: str, dataset_id_list: list[str], exclude_document_id_list: list[str], def execute(self, problem_text: str, knowledge_id_list: list[str], exclude_document_id_list: list[str],
exclude_paragraph_id_list: list[str], top_n: int, similarity: float, padding_problem_text: str = None, exclude_paragraph_id_list: list[str], top_n: int, similarity: float, padding_problem_text: str = None,
search_mode: str = None, search_mode: str = None,
user_id=None, workspace_id=None,
manage=None,
**kwargs) -> List[ParagraphPipelineModel]: **kwargs) -> List[ParagraphPipelineModel]:
if len(dataset_id_list) == 0: get_knowledge_list_of_authorized = DatabaseModelManage.get_model('get_knowledge_list_of_authorized')
chat_user_type = manage.context.get('chat_user_type')
if get_knowledge_list_of_authorized is not None and RoleConstants.CHAT_USER.value.name == chat_user_type:
knowledge_id_list = get_knowledge_list_of_authorized(manage.context.get('chat_user_id'),
knowledge_id_list)
if len(knowledge_id_list) == 0:
return [] return []
exec_problem_text = padding_problem_text if padding_problem_text is not None else problem_text exec_problem_text = padding_problem_text if padding_problem_text is not None else problem_text
model_id = get_embedding_id(dataset_id_list) model_id = get_embedding_id(knowledge_id_list)
model = get_model_by_id(model_id, user_id) model = get_model_by_id(model_id, workspace_id)
if model.model_type != "EMBEDDING":
raise Exception(_("Model does not exist"))
self.context['model_name'] = model.name self.context['model_name'] = model.name
embedding_model = ModelManage.get_model(model_id, lambda _id: get_model(model)) default_params = get_model_default_params(model)
embedding_model = ModelManage.get_model(model_id, lambda _id: get_model(model, **{**default_params}))
embedding_value = embedding_model.embed_query(exec_problem_text) embedding_value = embedding_model.embed_query(exec_problem_text)
vector = VectorStore.get_embedding_vector() vector = VectorStore.get_embedding_vector()
embedding_list = vector.query(exec_problem_text, embedding_value, dataset_id_list, exclude_document_id_list, embedding_list = vector.query(exec_problem_text, embedding_value, knowledge_id_list, None, exclude_document_id_list,
exclude_paragraph_id_list, True, top_n, similarity, SearchMode(search_mode)) exclude_paragraph_id_list, True, top_n, similarity, SearchMode(search_mode))
if embedding_list is None: if embedding_list is None:
return [] return []
@ -78,11 +86,12 @@ class BaseSearchDatasetStep(ISearchDatasetStep):
.add_paragraph(paragraph) .add_paragraph(paragraph)
.add_similarity(find_embedding.get('similarity')) .add_similarity(find_embedding.get('similarity'))
.add_comprehensive_score(find_embedding.get('comprehensive_score')) .add_comprehensive_score(find_embedding.get('comprehensive_score'))
.add_dataset_name(paragraph.get('dataset_name')) .add_knowledge_name(paragraph.get('knowledge_name'))
.add_knowledge_type(paragraph.get('knowledge_type'))
.add_document_name(paragraph.get('document_name')) .add_document_name(paragraph.get('document_name'))
.add_hit_handling_method(paragraph.get('hit_handling_method')) .add_hit_handling_method(paragraph.get('hit_handling_method'))
.add_directly_return_similarity(paragraph.get('directly_return_similarity')) .add_directly_return_similarity(paragraph.get('directly_return_similarity'))
.add_meta(paragraph.get('meta')) .add_meta(reset_meta(paragraph.get('meta')))
.build()) .build())
@staticmethod @staticmethod
@ -102,7 +111,7 @@ class BaseSearchDatasetStep(ISearchDatasetStep):
paragraph_list = native_search(QuerySet(Paragraph).filter(id__in=paragraph_id_list), paragraph_list = native_search(QuerySet(Paragraph).filter(id__in=paragraph_id_list),
get_file_content( get_file_content(
os.path.join(PROJECT_DIR, "apps", "application", 'sql', os.path.join(PROJECT_DIR, "apps", "application", 'sql',
'list_dataset_paragraph_by_paragraph_id.sql')), 'list_knowledge_paragraph_by_paragraph_id.sql')),
with_table_name=True) with_table_name=True)
# 如果向量库中存在脏数据 直接删除 # 如果向量库中存在脏数据 直接删除
if len(paragraph_list) != len(paragraph_id_list): if len(paragraph_list) != len(paragraph_id_list):

View File

@ -6,6 +6,22 @@
@date2024/12/11 17:57 @date2024/12/11 17:57
@desc: @desc:
""" """
from enum import Enum
from typing import List, Dict
from django.db.models import QuerySet
from django.utils.translation import gettext as _
from rest_framework.exceptions import ErrorDetail, ValidationError
from common.exception.app_exception import AppApiException
from common.utils.common import group_by
from models_provider.models import Model
from models_provider.tools import get_model_credential
from tools.models.tool import Tool
end_nodes = ['ai-chat-node', 'reply-node', 'function-node', 'function-lib-node', 'application-node',
'image-understand-node', 'speech-to-text-node', 'text-to-speech-node', 'image-generate-node',
'variable-assign-node']
class Answer: class Answer:
@ -42,3 +58,220 @@ class NodeChunk:
def is_end(self): def is_end(self):
return self.status == 200 return self.status == 200
class Edge:
def __init__(self, _id: str, _type: str, sourceNodeId: str, targetNodeId: str, **keywords):
self.id = _id
self.type = _type
self.sourceNodeId = sourceNodeId
self.targetNodeId = targetNodeId
for keyword in keywords:
self.__setattr__(keyword, keywords.get(keyword))
class Node:
def __init__(self, _id: str, _type: str, x: int, y: int, properties: dict, **kwargs):
self.id = _id
self.type = _type
self.x = x
self.y = y
self.properties = properties
for keyword in kwargs:
self.__setattr__(keyword, kwargs.get(keyword))
class EdgeNode:
edge: Edge
node: Node
def __init__(self, edge, node):
self.edge = edge
self.node = node
class WorkflowMode(Enum):
APPLICATION = "application"
APPLICATION_LOOP = "application-loop"
KNOWLEDGE = "knowledge"
KNOWLEDGE_LOOP = "knowledge-loop"
class Workflow:
"""
节点列表
"""
nodes: List[Node]
"""
线列表
"""
edges: List[Edge]
"""
节点id:node
"""
node_map: Dict[str, Node]
"""
节点id:当前节点id上面的所有节点
"""
up_node_map: Dict[str, List[EdgeNode]]
"""
节点id:当前节点id下面的所有节点
"""
next_node_map: Dict[str, List[EdgeNode]]
workflow_mode: WorkflowMode
def __init__(self, nodes: List[Node], edges: List[Edge],
workflow_mode: WorkflowMode = WorkflowMode.APPLICATION.value):
self.nodes = nodes
self.edges = edges
self.node_map = {node.id: node for node in nodes}
self.up_node_map = {key: [EdgeNode(edge, self.node_map.get(edge.sourceNodeId)) for
edge in edges] for
key, edges in
group_by(edges, key=lambda edge: edge.targetNodeId).items()}
self.next_node_map = {key: [EdgeNode(edge, self.node_map.get(edge.targetNodeId)) for edge in edges] for
key, edges in
group_by(edges, key=lambda edge: edge.sourceNodeId).items()}
self.workflow_mode = workflow_mode
def get_node(self, node_id):
"""
根据node_id 获取节点信息
@param node_id: node_id
@return: 节点信息
"""
return self.node_map.get(node_id)
def get_up_edge_nodes(self, node_id) -> List[EdgeNode]:
"""
根据节点id 获取当前连接前置节点和连线
@param node_id: 节点id
@return: 节点连线列表
"""
return self.up_node_map.get(node_id)
def get_next_edge_nodes(self, node_id) -> List[EdgeNode]:
"""
根据节点id 获取当前连接目标节点和连线
@param node_id: 节点id
@return: 节点连线列表
"""
return self.next_node_map.get(node_id)
def get_up_nodes(self, node_id) -> List[Node]:
"""
根据节点id 获取当前连接前置节点
@param node_id: 节点id
@return: 节点列表
"""
return [en.node for en in self.up_node_map.get(node_id)]
def get_next_nodes(self, node_id) -> List[Node]:
"""
根据节点id 获取当前连接目标节点
@param node_id: 节点id
@return: 节点列表
"""
return [en.node for en in self.next_node_map.get(node_id, [])]
@staticmethod
def new_instance(flow_obj: Dict, workflow_mode: WorkflowMode = WorkflowMode.APPLICATION):
nodes = flow_obj.get('nodes')
edges = flow_obj.get('edges')
nodes = [Node(node.get('id'), node.get('type'), **node)
for node in nodes]
edges = [Edge(edge.get('id'), edge.get('type'), **edge) for edge in edges]
return Workflow(nodes, edges, workflow_mode)
def get_start_node(self):
return self.get_node('start-node')
def get_search_node(self):
return [node for node in self.nodes if node.type == 'search-dataset-node']
def is_valid(self):
"""
校验工作流数据
"""
self.is_valid_model_params()
self.is_valid_start_node()
self.is_valid_base_node()
self.is_valid_work_flow()
def is_valid_node_params(self, node: Node):
from application.flow.step_node import get_node
get_node(node.type, self.workflow_mode)(node, None, None)
def is_valid_node(self, node: Node):
self.is_valid_node_params(node)
if node.type == 'condition-node':
branch_list = node.properties.get('node_data').get('branch')
for branch in branch_list:
source_anchor_id = f"{node.id}_{branch.get('id')}_right"
edge_list = [edge for edge in self.edges if edge.sourceAnchorId == source_anchor_id]
if len(edge_list) == 0:
raise AppApiException(500,
_('The branch {branch} of the {node} node needs to be connected').format(
node=node.properties.get("stepName"), branch=branch.get("type")))
else:
edge_list = [edge for edge in self.edges if edge.sourceNodeId == node.id]
if len(edge_list) == 0 and not end_nodes.__contains__(node.type):
raise AppApiException(500, _("{node} Nodes cannot be considered as end nodes").format(
node=node.properties.get("stepName")))
def is_valid_work_flow(self, up_node=None):
if up_node is None:
up_node = self.get_start_node()
self.is_valid_node(up_node)
next_nodes = self.get_next_nodes(up_node)
for next_node in next_nodes:
self.is_valid_work_flow(next_node)
def is_valid_start_node(self):
start_node_list = [node for node in self.nodes if node.id == 'start-node']
if len(start_node_list) == 0:
raise AppApiException(500, _('The starting node is required'))
if len(start_node_list) > 1:
raise AppApiException(500, _('There can only be one starting node'))
def is_valid_model_params(self):
node_list = [node for node in self.nodes if (node.type == 'ai-chat-node' or node.type == 'question-node')]
for node in node_list:
model = QuerySet(Model).filter(id=node.properties.get('node_data', {}).get('model_id')).first()
if model is None:
raise ValidationError(ErrorDetail(
_('The node {node} model does not exist').format(node=node.properties.get("stepName"))))
credential = get_model_credential(model.provider, model.model_type, model.model_name)
model_params_setting = node.properties.get('node_data', {}).get('model_params_setting')
model_params_setting_form = credential.get_model_params_setting_form(
model.model_name)
if model_params_setting is None:
model_params_setting = model_params_setting_form.get_default_form_data()
node.properties.get('node_data', {})['model_params_setting'] = model_params_setting
if node.properties.get('status', 200) != 200:
raise ValidationError(
ErrorDetail(_("Node {node} is unavailable").format(node.properties.get("stepName"))))
node_list = [node for node in self.nodes if (node.type == 'function-lib-node')]
for node in node_list:
function_lib_id = node.properties.get('node_data', {}).get('function_lib_id')
if function_lib_id is None:
raise ValidationError(ErrorDetail(
_('The library ID of node {node} cannot be empty').format(node=node.properties.get("stepName"))))
f_lib = QuerySet(Tool).filter(id=function_lib_id).first()
if f_lib is None:
raise ValidationError(ErrorDetail(_("The function library for node {node} is not available").format(
node=node.properties.get("stepName"))))
def is_valid_base_node(self):
base_node_list = [node for node in self.nodes if node.id == 'base-node']
if len(base_node_list) == 0:
raise AppApiException(500, _('Basic information node is required'))
if len(base_node_list) > 1:
raise AppApiException(500, _('There can only be one basic information node'))

View File

@ -8,6 +8,7 @@
""" """
from .contain_compare import * from .contain_compare import *
from .end_with import EndWithCompare
from .equal_compare import * from .equal_compare import *
from .ge_compare import * from .ge_compare import *
from .gt_compare import * from .gt_compare import *
@ -23,8 +24,10 @@ from .len_le_compare import *
from .len_lt_compare import * from .len_lt_compare import *
from .lt_compare import * from .lt_compare import *
from .not_contain_compare import * from .not_contain_compare import *
from .start_with import StartWithCompare
compare_handle_list = [GECompare(), GTCompare(), ContainCompare(), EqualCompare(), LTCompare(), LECompare(), compare_handle_list = [GECompare(), GTCompare(), ContainCompare(), EqualCompare(), LTCompare(), LECompare(),
LenLECompare(), LenGECompare(), LenEqualCompare(), LenGTCompare(), LenLTCompare(), LenLECompare(), LenGECompare(), LenEqualCompare(), LenGTCompare(), LenLTCompare(),
IsNullCompare(), IsNullCompare(),
IsNotNullCompare(), NotContainCompare(), IsTrueCompare(), IsNotTrueCompare()] IsNotNullCompare(), NotContainCompare(), IsTrueCompare(), IsNotTrueCompare(), StartWithCompare(),
EndWithCompare()]

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare.compare import Compare
class ContainCompare(Compare): class ContainCompare(Compare):
@ -20,4 +20,7 @@ class ContainCompare(Compare):
def compare(self, source_value, compare, target_value): def compare(self, source_value, compare, target_value):
if isinstance(source_value, str): if isinstance(source_value, str):
return str(target_value) in source_value return str(target_value) in source_value
return any([str(item) == str(target_value) for item in source_value]) elif isinstance(source_value, list):
return any([str(item) == str(target_value) for item in source_value])
else:
return str(target_value) in str(source_value)

View File

@ -0,0 +1,22 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file start_with.py
@date2025/10/20 10:37
@desc:
"""
from typing import List
from application.flow.compare import Compare
class EndWithCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'end_with':
return True
def compare(self, source_value, compare, target_value):
source_value = str(source_value)
return source_value.endswith(str(target_value))

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class EqualCompare(Compare): class EqualCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class GECompare(Compare): class GECompare(Compare):
@ -21,4 +21,8 @@ class GECompare(Compare):
try: try:
return float(source_value) >= float(target_value) return float(source_value) >= float(target_value)
except Exception as e: except Exception as e:
try:
return str(source_value) >= str(target_value)
except Exception as _:
pass
return False return False

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class GTCompare(Compare): class GTCompare(Compare):
@ -21,4 +21,8 @@ class GTCompare(Compare):
try: try:
return float(source_value) > float(target_value) return float(source_value) > float(target_value)
except Exception as e: except Exception as e:
try:
return str(source_value) > str(target_value)
except Exception as _:
pass
return False return False

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare import Compare from application.flow.compare import Compare
class IsNotNullCompare(Compare): class IsNotNullCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare import Compare from application.flow.compare import Compare
class IsNotTrueCompare(Compare): class IsNotTrueCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare import Compare from application.flow.compare import Compare
class IsNullCompare(Compare): class IsNullCompare(Compare):
@ -18,4 +18,7 @@ class IsNullCompare(Compare):
return True return True
def compare(self, source_value, compare, target_value): def compare(self, source_value, compare, target_value):
return source_value is None or len(source_value) == 0 try:
return source_value is None or len(source_value) == 0
except Exception as e:
return False

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare import Compare from application.flow.compare import Compare
class IsTrueCompare(Compare): class IsTrueCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LECompare(Compare): class LECompare(Compare):
@ -21,4 +21,8 @@ class LECompare(Compare):
try: try:
return float(source_value) <= float(target_value) return float(source_value) <= float(target_value)
except Exception as e: except Exception as e:
try:
return str(source_value) <= str(target_value)
except Exception as _:
pass
return False return False

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LenEqualCompare(Compare): class LenEqualCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LenGECompare(Compare): class LenGECompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LenGTCompare(Compare): class LenGTCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LenLECompare(Compare): class LenLECompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LenLTCompare(Compare): class LenLTCompare(Compare):

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class LTCompare(Compare): class LTCompare(Compare):
@ -21,4 +21,8 @@ class LTCompare(Compare):
try: try:
return float(source_value) < float(target_value) return float(source_value) < float(target_value)
except Exception as e: except Exception as e:
try:
return str(source_value) < str(target_value)
except Exception as _:
pass
return False return False

View File

@ -8,7 +8,7 @@
""" """
from typing import List from typing import List
from application.flow.step_node.condition_node.compare.compare import Compare from application.flow.compare import Compare
class NotContainCompare(Compare): class NotContainCompare(Compare):
@ -20,4 +20,7 @@ class NotContainCompare(Compare):
def compare(self, source_value, compare, target_value): def compare(self, source_value, compare, target_value):
if isinstance(source_value, str): if isinstance(source_value, str):
return str(target_value) not in source_value return str(target_value) not in source_value
return not any([str(item) == str(target_value) for item in source_value]) elif isinstance(self, list):
return not any([str(item) == str(target_value) for item in source_value])
else:
return str(target_value) not in str(source_value)

View File

@ -0,0 +1,22 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file start_with.py
@date2025/10/20 10:37
@desc:
"""
from typing import List
from application.flow.compare import Compare
class StartWithCompare(Compare):
def support(self, node_id, fields: List[str], source_value, compare, target_value):
if compare == 'start_with':
return True
def compare(self, source_value, compare, target_value):
source_value = str(source_value)
return source_value.startswith(str(target_value))

View File

@ -18,13 +18,12 @@ from rest_framework import serializers
from rest_framework.exceptions import ValidationError, ErrorDetail from rest_framework.exceptions import ValidationError, ErrorDetail
from application.flow.common import Answer, NodeChunk from application.flow.common import Answer, NodeChunk
from application.models import ChatRecord from application.models import ApplicationChatUserStats
from application.models.api_key_model import ApplicationPublicAccessClient from application.models import ChatRecord, ChatUserType
from common.constants.authentication_type import AuthenticationType
from common.field.common import InstanceField from common.field.common import InstanceField
from common.util.field_message import ErrMessage from knowledge.models.knowledge_action import KnowledgeAction, State
chat_cache = cache.caches['chat_cache'] chat_cache = cache
def write_context(step_variable: Dict, global_variable: Dict, node, workflow): def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
@ -46,16 +45,14 @@ def is_interrupt(node, step_variable: Dict, global_variable: Dict):
class WorkFlowPostHandler: class WorkFlowPostHandler:
def __init__(self, chat_info, client_id, client_type): def __init__(self, chat_info):
self.chat_info = chat_info self.chat_info = chat_info
self.client_id = client_id
self.client_type = client_type
def handler(self, chat_id, def handler(self, workflow):
chat_record_id, workflow_body = workflow.get_body()
answer, question = workflow_body.get('question')
workflow): chat_record_id = workflow_body.get('chat_record_id')
question = workflow.params['question'] chat_id = workflow_body.get('chat_id')
details = workflow.get_runtime_details() details = workflow.get_runtime_details()
message_tokens = sum([row.get('message_tokens') for row in details.values() if message_tokens = sum([row.get('message_tokens') for row in details.values() if
'message_tokens' in row and row.get('message_tokens') is not None]) 'message_tokens' in row and row.get('message_tokens') is not None])
@ -82,21 +79,60 @@ class WorkFlowPostHandler:
message_tokens=message_tokens, message_tokens=message_tokens,
answer_tokens=answer_tokens, answer_tokens=answer_tokens,
answer_text_list=answer_text_list, answer_text_list=answer_text_list,
run_time=time.time() - workflow.context['start_time'], run_time=time.time() - workflow.context.get('start_time') if workflow.context.get(
'start_time') is not None else 0,
index=0) index=0)
asker = workflow.context.get('asker', None)
self.chat_info.append_chat_record(chat_record, self.client_id, asker) self.chat_info.append_chat_record(chat_record)
# 重新设置缓存 self.chat_info.set_cache()
chat_cache.set(chat_id,
self.chat_info, timeout=60 * 30) if not self.chat_info.debug and [ChatUserType.ANONYMOUS_USER.value, ChatUserType.CHAT_USER.value].__contains__(
if self.client_type == AuthenticationType.APPLICATION_ACCESS_TOKEN.value: workflow_body.get('chat_user_type')):
application_public_access_client = (QuerySet(ApplicationPublicAccessClient) application_public_access_client = (QuerySet(ApplicationChatUserStats)
.filter(client_id=self.client_id, .filter(chat_user_id=workflow_body.get('chat_user_id'),
application_id=self.chat_info.application.id).first()) chat_user_type=workflow_body.get('chat_user_type'),
application_id=self.chat_info.application_id).first())
if application_public_access_client is not None: if application_public_access_client is not None:
application_public_access_client.access_num = application_public_access_client.access_num + 1 application_public_access_client.access_num = application_public_access_client.access_num + 1
application_public_access_client.intraday_access_num = application_public_access_client.intraday_access_num + 1 application_public_access_client.intraday_access_num = application_public_access_client.intraday_access_num + 1
application_public_access_client.save() application_public_access_client.save()
self.chat_info = None
class KnowledgeWorkflowPostHandler(WorkFlowPostHandler):
def __init__(self, chat_info, knowledge_action_id):
super().__init__(chat_info)
self.knowledge_action_id = knowledge_action_id
def handler(self, workflow):
state = get_workflow_state(workflow)
QuerySet(KnowledgeAction).filter(id=self.knowledge_action_id).update(
state=state,
run_time=time.time() - workflow.context.get('start_time') if workflow.context.get(
'start_time') is not None else 0)
def get_loop_workflow_node(node_list):
result = []
for item in node_list:
if item.get('type') == 'loop-node':
for loop_item in item.get('loop_node_data') or []:
for inner_item in loop_item.values():
result.append(inner_item)
return result
def get_workflow_state(workflow):
details = workflow.get_runtime_details()
node_list = details.values()
all_node = [*node_list, *get_loop_workflow_node(node_list)]
err = any([True for value in all_node if value.get('status') == 500])
if err:
return State.FAILURE
write_is_exist = any([True for value in all_node if value.get('type') == 'knowledge-write-node'])
if not write_is_exist:
return State.FAILURE
return State.SUCCESS
class NodeResult: class NodeResult:
@ -123,31 +159,44 @@ class NodeResult:
class ReferenceAddressSerializer(serializers.Serializer): class ReferenceAddressSerializer(serializers.Serializer):
node_id = serializers.CharField(required=True, error_messages=ErrMessage.char("节点id")) node_id = serializers.CharField(required=True, label="节点id")
fields = serializers.ListField( fields = serializers.ListField(
child=serializers.CharField(required=True, error_messages=ErrMessage.char("节点字段")), required=True, child=serializers.CharField(required=True, label="节点字段"), required=True,
error_messages=ErrMessage.list("节点字段数组")) label="节点字段数组")
class FlowParamsSerializer(serializers.Serializer): class FlowParamsSerializer(serializers.Serializer):
# 历史对答 # 历史对答
history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True), history_chat_record = serializers.ListField(child=InstanceField(model_type=ChatRecord, required=True),
error_messages=ErrMessage.list("历史对答")) label="历史对答")
question = serializers.CharField(required=True, error_messages=ErrMessage.list("用户问题")) question = serializers.CharField(required=True, label="用户问题")
chat_id = serializers.CharField(required=True, error_messages=ErrMessage.list("对话id")) chat_id = serializers.CharField(required=True, label="对话id")
chat_record_id = serializers.CharField(required=True, error_messages=ErrMessage.char("对话记录id")) chat_record_id = serializers.CharField(required=True, label="对话记录id")
stream = serializers.BooleanField(required=True, error_messages=ErrMessage.boolean("流式输出")) stream = serializers.BooleanField(required=True, label="流式输出")
client_id = serializers.CharField(required=False, error_messages=ErrMessage.char("客户端id")) chat_user_id = serializers.CharField(required=False, label="对话用户id")
client_type = serializers.CharField(required=False, error_messages=ErrMessage.char("客户端类型")) chat_user_type = serializers.CharField(required=False, label="对话用户类型")
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid("用户id")) workspace_id = serializers.CharField(required=True, label="工作空间id")
re_chat = serializers.BooleanField(required=True, error_messages=ErrMessage.boolean("换个答案"))
application_id = serializers.CharField(required=True, label="应用id")
re_chat = serializers.BooleanField(required=True, label="换个答案")
debug = serializers.BooleanField(required=True, label="是否debug")
class KnowledgeFlowParamsSerializer(serializers.Serializer):
knowledge_id = serializers.UUIDField(required=True, label="知识库id")
workspace_id = serializers.CharField(required=True, label="工作空间id")
knowledge_action_id = serializers.UUIDField(required=True, label="知识库任务执行器id")
data_source = serializers.DictField(required=True, label="数据源")
knowledge_base = serializers.DictField(required=False, label="知识库设置")
class INode: class INode:
@ -162,11 +211,12 @@ class INode:
return None return None
reasoning_content_enable = self.context.get('model_setting', {}).get('reasoning_content_enable', False) reasoning_content_enable = self.context.get('model_setting', {}).get('reasoning_content_enable', False)
return [ return [
Answer(self.answer_text, self.view_type, self.runtime_node_id, self.workflow_params['chat_record_id'], {}, Answer(self.answer_text, self.view_type, self.runtime_node_id, self.workflow_params.get('chat_record_id'),
{},
self.runtime_node_id, self.context.get('reasoning_content', '') if reasoning_content_enable else '')] self.runtime_node_id, self.context.get('reasoning_content', '') if reasoning_content_enable else '')]
def __init__(self, node, workflow_params, workflow_manage, up_node_id_list=None, def __init__(self, node, workflow_params, workflow_manage, up_node_id_list=None,
get_node_params=lambda node: node.properties.get('node_data')): get_node_params=lambda node: node.properties.get('node_data'), salt=None):
# 当前步骤上下文,用于存储当前步骤信息 # 当前步骤上下文,用于存储当前步骤信息
self.status = 200 self.status = 200
self.err_message = '' self.err_message = ''
@ -186,7 +236,8 @@ class INode:
self.runtime_node_id = sha1(uuid.NAMESPACE_DNS.bytes + bytes(str(uuid.uuid5(uuid.NAMESPACE_DNS, self.runtime_node_id = sha1(uuid.NAMESPACE_DNS.bytes + bytes(str(uuid.uuid5(uuid.NAMESPACE_DNS,
"".join([*sorted(up_node_id_list), "".join([*sorted(up_node_id_list),
node.id]))), node.id]))),
"utf-8")).hexdigest() "utf-8")).hexdigest() + (
"__" + str(salt) if salt is not None else '')
def valid_args(self, node_params, flow_params): def valid_args(self, node_params, flow_params):
flow_params_serializer_class = self.get_flow_params_serializer_class() flow_params_serializer_class = self.get_flow_params_serializer_class()
@ -218,13 +269,14 @@ class INode:
pass pass
def get_flow_params_serializer_class(self) -> Type[serializers.Serializer]: def get_flow_params_serializer_class(self) -> Type[serializers.Serializer]:
return FlowParamsSerializer return self.workflow_manage.get_params_serializer_class()
def get_write_error_context(self, e): def get_write_error_context(self, e):
self.status = 500 self.status = 500
self.answer_text = str(e) self.answer_text = str(e)
self.err_message = str(e) self.err_message = str(e)
self.context['run_time'] = time.time() - self.context['start_time'] current_time = time.time()
self.context['run_time'] = current_time - (self.context.get('start_time') or current_time)
def write_error_context(answer, status=200): def write_error_context(answer, status=200):
pass pass

View File

@ -0,0 +1,15 @@
# coding=utf-8
"""
@project: maxkb
@Author
@file workflow_manage.py
@date2024/1/9 17:40
@desc:
"""
from application.flow.i_step_node import KnowledgeFlowParamsSerializer
from application.flow.loop_workflow_manage import LoopWorkflowManage
class KnowledgeLoopWorkflowManage(LoopWorkflowManage):
def get_params_serializer_class(self):
return KnowledgeFlowParamsSerializer

View File

@ -0,0 +1,102 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file Knowledge_workflow_manage.py
@date2025/11/13 19:02
@desc:
"""
import time
import traceback
from concurrent.futures import ThreadPoolExecutor
from django.db.models import QuerySet
from django.utils.translation import get_language
from application.flow.common import Workflow
from application.flow.i_step_node import WorkFlowPostHandler, KnowledgeFlowParamsSerializer
from application.flow.workflow_manage import WorkflowManage
from common.handle.base_to_response import BaseToResponse
from common.handle.impl.response.system_to_response import SystemToResponse
from knowledge.models.knowledge_action import KnowledgeAction, State
executor = ThreadPoolExecutor(max_workers=200)
class KnowledgeWorkflowManage(WorkflowManage):
def __init__(self, flow: Workflow,
params,
work_flow_post_handler: WorkFlowPostHandler,
base_to_response: BaseToResponse = SystemToResponse(),
start_node_id=None,
start_node_data=None, chat_record=None, child_node=None):
super().__init__(flow, params, work_flow_post_handler, base_to_response, None, None, None,
None,
None, None, start_node_id, start_node_data, chat_record, child_node)
def get_params_serializer_class(self):
return KnowledgeFlowParamsSerializer
def get_start_node(self):
start_node_list = [node for node in self.flow.nodes if
self.params.get('data_source', {}).get('node_id') == node.id]
return start_node_list[0]
def run(self):
self.context['start_time'] = time.time()
executor.submit(self._run)
def _run(self):
QuerySet(KnowledgeAction).filter(id=self.params.get('knowledge_action_id')).update(
state=State.STARTED)
language = get_language()
self.run_chain_async(self.start_node, None, language)
while self.is_run():
pass
self.work_flow_post_handler.handler(self)
@staticmethod
def get_node_details(current_node, node, index):
if current_node == node:
return {
'name': node.node.properties.get('stepName'),
"index": index,
'run_time': 0,
'type': node.type,
'status': 202,
'err_message': ""
}
return node.get_details(index)
def run_chain(self, current_node, node_result_future=None):
QuerySet(KnowledgeAction).filter(id=self.params.get('knowledge_action_id')).update(
details=self.get_runtime_details(lambda node, index: self.get_node_details(current_node, node, index)))
if node_result_future is None:
node_result_future = self.run_node_future(current_node)
try:
result = self.hand_node_result(current_node, node_result_future)
return result
except Exception as e:
traceback.print_exc()
return None
def hand_node_result(self, current_node, node_result_future):
try:
current_result = node_result_future.result()
result = current_result.write_context(current_node, self)
if result is not None:
# 阻塞获取结果
list(result)
return current_result
except Exception as e:
traceback.print_exc()
self.status = 500
current_node.get_write_error_context(e)
self.answer += str(e)
QuerySet(KnowledgeAction).filter(id=self.params.get('knowledge_action_id')).update(state=State.FAILURE)
finally:
current_node.node_chunk.end()
QuerySet(KnowledgeAction).filter(id=self.params.get('knowledge_action_id')).update(
details=self.get_runtime_details())

View File

@ -0,0 +1,193 @@
# coding=utf-8
"""
@project: maxkb
@Author
@file workflow_manage.py
@date2024/1/9 17:40
@desc:
"""
from concurrent.futures import ThreadPoolExecutor
from typing import List
from django.db import close_old_connections
from django.utils.translation import get_language
from langchain_core.prompts import PromptTemplate
from application.flow.common import Workflow
from application.flow.i_step_node import WorkFlowPostHandler, INode
from application.flow.step_node import get_node
from application.flow.workflow_manage import WorkflowManage
from common.handle.base_to_response import BaseToResponse
from common.handle.impl.response.system_to_response import SystemToResponse
executor = ThreadPoolExecutor(max_workers=200)
class NodeResultFuture:
def __init__(self, r, e, status=200):
self.r = r
self.e = e
self.status = status
def result(self):
if self.status == 200:
return self.r
else:
raise self.e
def await_result(result, timeout=1):
try:
result.result(timeout)
return False
except Exception as e:
return True
class NodeChunkManage:
def __init__(self, work_flow):
self.node_chunk_list = []
self.current_node_chunk = None
self.work_flow = work_flow
def add_node_chunk(self, node_chunk):
self.node_chunk_list.append(node_chunk)
def contains(self, node_chunk):
return self.node_chunk_list.__contains__(node_chunk)
def pop(self):
if self.current_node_chunk is None:
try:
current_node_chunk = self.node_chunk_list.pop(0)
self.current_node_chunk = current_node_chunk
except IndexError as e:
pass
if self.current_node_chunk is not None:
try:
chunk = self.current_node_chunk.chunk_list.pop(0)
return chunk
except IndexError as e:
if self.current_node_chunk.is_end():
self.current_node_chunk = None
if self.work_flow.answer_is_not_empty():
chunk = self.work_flow.base_to_response.to_stream_chunk_response(
self.work_flow.params['chat_id'],
self.work_flow.params['chat_record_id'],
'\n\n', False, 0, 0)
self.work_flow.append_answer('\n\n')
return chunk
return self.pop()
return None
class LoopWorkflowManage(WorkflowManage):
def __init__(self, flow: Workflow,
params,
work_flow_post_handler: WorkFlowPostHandler,
parentWorkflowManage,
loop_params,
get_loop_context,
base_to_response: BaseToResponse = SystemToResponse(),
start_node_id=None,
start_node_data=None, chat_record=None, child_node=None):
self.parentWorkflowManage = parentWorkflowManage
self.loop_params = loop_params
self.get_loop_context = get_loop_context
self.loop_field_list = []
super().__init__(flow, params, work_flow_post_handler, base_to_response, None, None, None,
None,
None, None, start_node_id, start_node_data, chat_record, child_node)
def get_node_cls_by_id(self, node_id, up_node_id_list=None,
get_node_params=lambda node: node.properties.get('node_data')):
for node in self.flow.nodes:
if node.id == node_id:
node_instance = get_node(node.type, self.flow.workflow_mode)(node,
self.params, self, up_node_id_list,
get_node_params,
salt=self.get_index())
return node_instance
return None
def stream(self):
close_old_connections()
language = get_language()
self.run_chain_async(self.start_node, None, language)
return self.await_result(is_cleanup=False)
def get_index(self):
return self.loop_params.get('index')
def get_start_node(self):
start_node_list = [node for node in self.flow.nodes if
['loop-start-node'].__contains__(node.type)]
return start_node_list[0]
def get_reference_field(self, node_id: str, fields: List[str]):
"""
@param node_id: 节点id
@param fields: 字段
@return:
"""
if node_id == 'global':
return self.parentWorkflowManage.get_reference_field(node_id, fields)
elif node_id == 'chat':
return self.parentWorkflowManage.get_reference_field(node_id, fields)
elif node_id == 'loop':
loop_context = self.get_loop_context()
return INode.get_field(loop_context, fields)
else:
node = self.get_node_by_id(node_id)
if node:
return node.get_reference_field(fields)
return self.parentWorkflowManage.get_reference_field(node_id, fields)
def get_workflow_content(self):
context = {
'global': self.context,
'chat': self.chat_context,
'loop': self.get_loop_context(),
}
for node in self.node_context:
context[node.id] = node.context
return context
def init_fields(self):
super().init_fields()
loop_field_list = []
loop_start_node = self.flow.get_node('loop-start-node')
loop_input_field_list = loop_start_node.properties.get('loop_input_field_list')
node_name = loop_start_node.properties.get('stepName')
node_id = loop_start_node.id
if loop_input_field_list is not None:
for f in loop_input_field_list:
loop_field_list.append(
{'label': f.get('label'), 'value': f.get('field'), 'node_id': node_id, 'node_name': node_name})
self.loop_field_list = loop_field_list
def reset_prompt(self, prompt: str):
prompt = super().reset_prompt(prompt)
for field in self.loop_field_list:
chatLabel = f"loop.{field.get('value')}"
chatValue = f"context.get('loop').get('{field.get('value', '')}','')"
prompt = prompt.replace(chatLabel, chatValue)
prompt = self.parentWorkflowManage.reset_prompt(prompt)
return prompt
def generate_prompt(self, prompt: str):
"""
格式化生成提示词
@param prompt: 提示词信息
@return: 格式化后的提示词
"""
context = {**self.get_workflow_content(), **self.parentWorkflowManage.get_workflow_content()}
prompt = self.reset_prompt(prompt)
prompt_template = PromptTemplate.from_template(prompt, template_format='jinja2')
value = prompt_template.format(context=context)
return value

View File

@ -9,34 +9,52 @@
from .ai_chat_step_node import * from .ai_chat_step_node import *
from .application_node import BaseApplicationNode from .application_node import BaseApplicationNode
from .condition_node import * from .condition_node import *
from .data_source_local_node.impl.base_data_source_local_node import BaseDataSourceLocalNode
from .data_source_web_node.impl.base_data_source_web_node import BaseDataSourceWebNode
from .direct_reply_node import * from .direct_reply_node import *
from .document_extract_node import *
from .form_node import * from .form_node import *
from .function_lib_node import * from .image_generate_step_node import *
from .function_node import * from .image_to_video_step_node import BaseImageToVideoNode
from .image_understand_step_node import *
from .intent_node import *
from .knowledge_write_node.impl.base_knowledge_write_node import BaseKnowledgeWriteNode
from .loop_break_node import BaseLoopBreakNode
from .loop_continue_node import BaseLoopContinueNode
from .loop_node import *
from .loop_start_node import *
from .mcp_node import BaseMcpNode
from .parameter_extraction_node import BaseParameterExtractionNode
from .question_node import * from .question_node import *
from .reranker_node import * from .reranker_node import *
from .search_document_node import BaseSearchDocumentNode
from .document_extract_node import * from .search_knowledge_node import *
from .image_understand_step_node import *
from .image_generate_step_node import *
from .search_dataset_node import *
from .speech_to_text_step_node import BaseSpeechToTextNode from .speech_to_text_step_node import BaseSpeechToTextNode
from .start_node import * from .start_node import *
from .text_to_speech_step_node.impl.base_text_to_speech_node import BaseTextToSpeechNode from .text_to_speech_step_node.impl.base_text_to_speech_node import BaseTextToSpeechNode
from .text_to_video_step_node.impl.base_text_to_video_node import BaseTextToVideoNode
from .tool_lib_node import *
from .tool_node import *
from .variable_aggregation_node.impl.base_variable_aggregation_node import BaseVariableAggregationNode
from .variable_assign_node import BaseVariableAssignNode from .variable_assign_node import BaseVariableAssignNode
from .mcp_node import BaseMcpNode from .variable_splitting_node import BaseVariableSplittingNode
from .video_understand_step_node import BaseVideoUnderstandNode
from .document_split_node import BaseDocumentSplitNode
node_list = [BaseStartStepNode, BaseChatNode, BaseSearchDatasetNode, BaseQuestionNode, node_list = [BaseStartStepNode, BaseChatNode, BaseSearchKnowledgeNode, BaseSearchDocumentNode, BaseQuestionNode,
BaseConditionNode, BaseReplyNode, BaseConditionNode, BaseReplyNode,
BaseFunctionNodeNode, BaseFunctionLibNodeNode, BaseRerankerNode, BaseApplicationNode, BaseToolNodeNode, BaseToolLibNodeNode, BaseRerankerNode, BaseApplicationNode,
BaseDocumentExtractNode, BaseDocumentExtractNode,
BaseImageUnderstandNode, BaseFormNode, BaseSpeechToTextNode, BaseTextToSpeechNode, BaseImageUnderstandNode, BaseFormNode, BaseSpeechToTextNode, BaseTextToSpeechNode,
BaseImageGenerateNode, BaseVariableAssignNode, BaseMcpNode] BaseImageGenerateNode, BaseVariableAssignNode, BaseMcpNode, BaseTextToVideoNode, BaseImageToVideoNode,
BaseVideoUnderstandNode,
BaseIntentNode, BaseLoopNode, BaseLoopStartStepNode,
BaseLoopContinueNode,
BaseLoopBreakNode, BaseVariableSplittingNode, BaseParameterExtractionNode, BaseVariableAggregationNode,
BaseDataSourceLocalNode, BaseDataSourceWebNode, BaseKnowledgeWriteNode, BaseDocumentSplitNode]
node_map = {n.type: {w: n for w in n.support} for n in node_list}
def get_node(node_type): def get_node(node_type, workflow_model):
find_list = [node for node in node_list if node.type == node_type] return node_map.get(node_type).get(workflow_model)
if len(find_list) > 0:
return find_list[0]
return None

View File

@ -11,41 +11,55 @@ from typing import Type
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
class ChatNodeSerializer(serializers.Serializer): class ChatNodeSerializer(serializers.Serializer):
model_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Model id"))) model_id = serializers.CharField(required=True, label=_("Model id"))
system = serializers.CharField(required=False, allow_blank=True, allow_null=True, system = serializers.CharField(required=False, allow_blank=True, allow_null=True,
error_messages=ErrMessage.char(_("Role Setting"))) label=_("Role Setting"))
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word"))) prompt = serializers.CharField(required=True, label=_("Prompt word"))
# 多轮对话数量 # 多轮对话数量
dialogue_number = serializers.IntegerField(required=True, error_messages=ErrMessage.integer( dialogue_number = serializers.IntegerField(required=True, label=_("Number of multi-round conversations"))
_("Number of multi-round conversations")))
is_result = serializers.BooleanField(required=False, is_result = serializers.BooleanField(required=False,
error_messages=ErrMessage.boolean(_('Whether to return content'))) label=_('Whether to return content'))
model_params_setting = serializers.DictField(required=False, model_params_setting = serializers.DictField(required=False,
error_messages=ErrMessage.dict(_("Model parameter settings"))) label=_("Model parameter settings"))
model_setting = serializers.DictField(required=False, model_setting = serializers.DictField(required=False,
error_messages=ErrMessage.dict('Model settings')) label='Model settings')
dialogue_type = serializers.CharField(required=False, allow_blank=True, allow_null=True, dialogue_type = serializers.CharField(required=False, allow_blank=True, allow_null=True,
error_messages=ErrMessage.char(_("Context Type"))) label=_("Context Type"))
mcp_enable = serializers.BooleanField(required=False, mcp_enable = serializers.BooleanField(required=False, label=_("Whether to enable MCP"))
error_messages=ErrMessage.boolean(_("Whether to enable MCP"))) mcp_servers = serializers.JSONField(required=False, label=_("MCP Server"))
mcp_servers = serializers.JSONField(required=False, error_messages=ErrMessage.list(_("MCP Server"))) mcp_tool_id = serializers.CharField(required=False, allow_blank=True, allow_null=True, label=_("MCP Tool ID"))
mcp_tool_ids = serializers.ListField(child=serializers.UUIDField(), required=False, allow_empty=True,
label=_("MCP Tool IDs"), )
mcp_source = serializers.CharField(required=False, allow_blank=True, allow_null=True, label=_("MCP Source"))
tool_enable = serializers.BooleanField(required=False, default=False, label=_("Whether to enable tools"))
tool_ids = serializers.ListField(child=serializers.UUIDField(), required=False, allow_empty=True,
label=_("Tool IDs"), )
mcp_output_enable = serializers.BooleanField(required=False, default=True, label=_("Whether to enable MCP output"))
class IChatNode(INode): class IChatNode(INode):
type = 'ai-chat-node' type = 'ai-chat-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE_LOOP,
WorkflowMode.KNOWLEDGE]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return ChatNodeSerializer return ChatNodeSerializer
def _run(self): def _run(self):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data) if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data,
**{'history_chat_record': [], 'stream': True, 'chat_id': None, 'chat_record_id': None})
else:
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id,
chat_record_id, chat_record_id,
@ -54,5 +68,11 @@ class IChatNode(INode):
model_setting=None, model_setting=None,
mcp_enable=False, mcp_enable=False,
mcp_servers=None, mcp_servers=None,
mcp_tool_id=None,
mcp_tool_ids=None,
mcp_source=None,
tool_enable=False,
tool_ids=None,
mcp_output_enable=True,
**kwargs) -> NodeResult: **kwargs) -> NodeResult:
pass pass

View File

@ -6,39 +6,27 @@
@date2024/6/4 14:30 @date2024/6/4 14:30
@desc: @desc:
""" """
import asyncio
import json import json
import os
import re import re
import time import time
from functools import reduce from functools import reduce
from types import AsyncGeneratorType
from typing import List, Dict from typing import List, Dict
from django.db.models import QuerySet from django.db.models import QuerySet
from langchain.schema import HumanMessage, SystemMessage from langchain.schema import HumanMessage, SystemMessage
from langchain_core.messages import BaseMessage, AIMessage, AIMessageChunk, ToolMessage from langchain_core.messages import BaseMessage, AIMessage
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from application.flow.i_step_node import NodeResult, INode from application.flow.i_step_node import NodeResult, INode
from application.flow.step_node.ai_chat_step_node.i_chat_node import IChatNode from application.flow.step_node.ai_chat_step_node.i_chat_node import IChatNode
from application.flow.tools import Reasoning from application.flow.tools import Reasoning, mcp_response_generator
from setting.models import Model from common.utils.rsa_util import rsa_long_decrypt
from setting.models_provider import get_model_credential from common.utils.tool_code import ToolExecutor
from setting.models_provider.tools import get_model_instance_by_model_user_id from maxkb.const import CONFIG
from models_provider.models import Model
from models_provider.tools import get_model_credential, get_model_instance_by_model_workspace_id
from tools.models import Tool
tool_message_template = """
<details>
<summary>
<strong>Called MCP Tool: <em>%s</em></strong>
</summary>
```json
%s
```
</details>
"""
def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str, def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str,
reasoning_content: str): reasoning_content: str):
@ -102,38 +90,6 @@ def write_context_stream(node_variable: Dict, workflow_variable: Dict, node: INo
_write_context(node_variable, workflow_variable, node, workflow, answer, reasoning_content) _write_context(node_variable, workflow_variable, node, workflow, answer, reasoning_content)
async def _yield_mcp_response(chat_model, message_list, mcp_servers):
async with MultiServerMCPClient(json.loads(mcp_servers)) as client:
agent = create_react_agent(chat_model, client.get_tools())
response = agent.astream({"messages": message_list}, stream_mode='messages')
async for chunk in response:
if isinstance(chunk[0], ToolMessage):
content = tool_message_template % (chunk[0].name, chunk[0].content)
chunk[0].content = content
yield chunk[0]
if isinstance(chunk[0], AIMessageChunk):
yield chunk[0]
def mcp_response_generator(chat_model, message_list, mcp_servers):
loop = asyncio.new_event_loop()
try:
async_gen = _yield_mcp_response(chat_model, message_list, mcp_servers)
while True:
try:
chunk = loop.run_until_complete(anext_async(async_gen))
yield chunk
except StopAsyncIteration:
break
except Exception as e:
print(f'exception: {e}')
finally:
loop.close()
async def anext_async(agen):
return await agen.__anext__()
def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow): def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow):
""" """
写入上下文数据 写入上下文数据
@ -150,10 +106,11 @@ def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wor
reasoning_result = reasoning.get_reasoning_content(response) reasoning_result = reasoning.get_reasoning_content(response)
reasoning_result_end = reasoning.get_end_reasoning_content() reasoning_result_end = reasoning.get_end_reasoning_content()
content = reasoning_result.get('content') + reasoning_result_end.get('content') content = reasoning_result.get('content') + reasoning_result_end.get('content')
if 'reasoning_content' in response.response_metadata: meta = {**response.response_metadata, **response.additional_kwargs}
reasoning_content = response.response_metadata.get('reasoning_content', '') if 'reasoning_content' in meta:
reasoning_content = (meta.get('reasoning_content', '') or '')
else: else:
reasoning_content = reasoning_result.get('reasoning_content') + reasoning_result_end.get('reasoning_content') reasoning_content = (reasoning_result.get('reasoning_content') or '') + (reasoning_result_end.get('reasoning_content') or '')
_write_context(node_variable, workflow_variable, node, workflow, content, reasoning_content) _write_context(node_variable, workflow_variable, node, workflow, content, reasoning_content)
@ -186,7 +143,8 @@ class BaseChatNode(IChatNode):
self.context['answer'] = details.get('answer') self.context['answer'] = details.get('answer')
self.context['question'] = details.get('question') self.context['question'] = details.get('question')
self.context['reasoning_content'] = details.get('reasoning_content') self.context['reasoning_content'] = details.get('reasoning_content')
self.answer_text = details.get('answer') if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id, def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
model_params_setting=None, model_params_setting=None,
@ -194,6 +152,12 @@ class BaseChatNode(IChatNode):
model_setting=None, model_setting=None,
mcp_enable=False, mcp_enable=False,
mcp_servers=None, mcp_servers=None,
mcp_tool_id=None,
mcp_tool_ids=None,
mcp_source=None,
tool_enable=False,
tool_ids=None,
mcp_output_enable=True,
**kwargs) -> NodeResult: **kwargs) -> NodeResult:
if dialogue_type is None: if dialogue_type is None:
dialogue_type = 'WORKFLOW' dialogue_type = 'WORKFLOW'
@ -204,8 +168,9 @@ class BaseChatNode(IChatNode):
model_setting = {'reasoning_content_enable': False, 'reasoning_content_end': '</think>', model_setting = {'reasoning_content_enable': False, 'reasoning_content_end': '</think>',
'reasoning_content_start': '<think>'} 'reasoning_content_start': '<think>'}
self.context['model_setting'] = model_setting self.context['model_setting'] = model_setting
chat_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'), workspace_id = self.workflow_manage.get_body().get('workspace_id')
**model_params_setting) chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting)
history_message = self.get_history_message(history_chat_record, dialogue_number, dialogue_type, history_message = self.get_history_message(history_chat_record, dialogue_number, dialogue_type,
self.runtime_node_id) self.runtime_node_id)
self.context['history_message'] = history_message self.context['history_message'] = history_message
@ -216,24 +181,98 @@ class BaseChatNode(IChatNode):
message_list = self.generate_message_list(system, prompt, history_message) message_list = self.generate_message_list(system, prompt, history_message)
self.context['message_list'] = message_list self.context['message_list'] = message_list
if mcp_enable and mcp_servers is not None: # 处理 MCP 请求
r = mcp_response_generator(chat_model, message_list, mcp_servers) mcp_result = self._handle_mcp_request(
return NodeResult( mcp_enable, tool_enable, mcp_source, mcp_servers, mcp_tool_id, mcp_tool_ids, tool_ids, mcp_output_enable,
{'result': r, 'chat_model': chat_model, 'message_list': message_list, chat_model, message_list, history_message, question
'history_message': history_message, 'question': question.content}, {}, )
_write_context=write_context_stream) if mcp_result:
return mcp_result
if stream: if stream:
r = chat_model.stream(message_list) r = chat_model.stream(message_list)
return NodeResult({'result': r, 'chat_model': chat_model, 'message_list': message_list, return NodeResult({'result': r, 'chat_model': chat_model, 'message_list': message_list,
'history_message': history_message, 'question': question.content}, {}, 'history_message': [{'content': message.content, 'role': message.type} for message in
(history_message if history_message is not None else [])],
'question': question.content}, {},
_write_context=write_context_stream) _write_context=write_context_stream)
else: else:
r = chat_model.invoke(message_list) r = chat_model.invoke(message_list)
return NodeResult({'result': r, 'chat_model': chat_model, 'message_list': message_list, return NodeResult({'result': r, 'chat_model': chat_model, 'message_list': message_list,
'history_message': history_message, 'question': question.content}, {}, 'history_message': [{'content': message.content, 'role': message.type} for message in
(history_message if history_message is not None else [])],
'question': question.content}, {},
_write_context=write_context) _write_context=write_context)
def _handle_mcp_request(self, mcp_enable, tool_enable, mcp_source, mcp_servers, mcp_tool_id, mcp_tool_ids, tool_ids,
mcp_output_enable, chat_model, message_list, history_message, question):
if not mcp_enable and not tool_enable:
return None
mcp_servers_config = {}
# 迁移过来mcp_source是None
if mcp_source is None:
mcp_source = 'custom'
if mcp_enable:
# 兼容老数据
if not mcp_tool_ids:
mcp_tool_ids = []
if mcp_tool_id:
mcp_tool_ids = list(set(mcp_tool_ids + [mcp_tool_id]))
if mcp_source == 'custom' and mcp_servers is not None and '"stdio"' not in mcp_servers:
mcp_servers_config = json.loads(mcp_servers)
mcp_servers_config = self.handle_variables(mcp_servers_config)
elif mcp_tool_ids:
mcp_tools = QuerySet(Tool).filter(id__in=mcp_tool_ids).values()
for mcp_tool in mcp_tools:
if mcp_tool and mcp_tool['is_active']:
mcp_servers_config = {**mcp_servers_config, **json.loads(mcp_tool['code'])}
mcp_servers_config = self.handle_variables(mcp_servers_config)
if tool_enable:
if tool_ids and len(tool_ids) > 0: # 如果有工具ID则将其转换为MCP
self.context['tool_ids'] = tool_ids
for tool_id in tool_ids:
tool = QuerySet(Tool).filter(id=tool_id).first()
if not tool.is_active:
continue
executor = ToolExecutor()
if tool.init_params is not None:
params = json.loads(rsa_long_decrypt(tool.init_params))
else:
params = {}
tool_config = executor.get_tool_mcp_config(tool.code, params)
mcp_servers_config[str(tool.id)] = tool_config
if len(mcp_servers_config) > 0:
r = mcp_response_generator(chat_model, message_list, json.dumps(mcp_servers_config), mcp_output_enable)
return NodeResult(
{'result': r, 'chat_model': chat_model, 'message_list': message_list,
'history_message': [{'content': message.content, 'role': message.type} for message in
(history_message if history_message is not None else [])],
'question': question.content}, {},
_write_context=write_context_stream)
return None
def handle_variables(self, tool_params):
# 处理参数中的变量
for k, v in tool_params.items():
if type(v) == str:
tool_params[k] = self.workflow_manage.generate_prompt(tool_params[k])
if type(v) == dict:
self.handle_variables(v)
if (type(v) == list) and (type(v[0]) == str):
tool_params[k] = self.get_reference_content(v)
return tool_params
def get_reference_content(self, fields: List[str]):
return str(self.workflow_manage.get_reference_field(
fields[0],
fields[1:]))
@staticmethod @staticmethod
def get_history_message(history_chat_record, dialogue_number, dialogue_type, runtime_node_id): def get_history_message(history_chat_record, dialogue_number, dialogue_type, runtime_node_id):
start_index = len(history_chat_record) - dialogue_number start_index = len(history_chat_record) - dialogue_number
@ -271,9 +310,7 @@ class BaseChatNode(IChatNode):
"index": index, "index": index,
'run_time': self.context.get('run_time'), 'run_time': self.context.get('run_time'),
'system': self.context.get('system'), 'system': self.context.get('system'),
'history_message': [{'content': message.content, 'role': message.type} for message in 'history_message': self.context.get('history_message'),
(self.context.get('history_message') if self.context.get(
'history_message') is not None else [])],
'question': self.context.get('question'), 'question': self.context.get('question'),
'answer': self.context.get('answer'), 'answer': self.context.get('answer'),
'reasoning_content': self.context.get('reasoning_content'), 'reasoning_content': self.context.get('reasoning_content'),

View File

@ -3,29 +3,30 @@ from typing import Type
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
class ApplicationNodeSerializer(serializers.Serializer): class ApplicationNodeSerializer(serializers.Serializer):
application_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Application ID"))) application_id = serializers.CharField(required=True, label=_("Application ID"))
question_reference_address = serializers.ListField(required=True, question_reference_address = serializers.ListField(required=True,
error_messages=ErrMessage.list(_("User Questions"))) label=_("User Questions"))
api_input_field_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("API Input Fields"))) api_input_field_list = serializers.ListField(required=False, label=_("API Input Fields"))
user_input_field_list = serializers.ListField(required=False, user_input_field_list = serializers.ListField(required=False,
error_messages=ErrMessage.uuid(_("User Input Fields"))) label=_("User Input Fields"))
image_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("picture"))) image_list = serializers.ListField(required=False, label=_("picture"))
document_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("document"))) document_list = serializers.ListField(required=False, label=_("document"))
audio_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("Audio"))) audio_list = serializers.ListField(required=False, label=_("Audio"))
child_node = serializers.DictField(required=False, allow_null=True, child_node = serializers.DictField(required=False, allow_null=True,
error_messages=ErrMessage.dict(_("Child Nodes"))) label=_("Child Nodes"))
node_data = serializers.DictField(required=False, allow_null=True, error_messages=ErrMessage.dict(_("Form Data"))) node_data = serializers.DictField(required=False, allow_null=True, label=_("Form Data"))
class IApplicationNode(INode): class IApplicationNode(INode):
type = 'application-node' type = 'application-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return ApplicationNodeSerializer return ApplicationNodeSerializer
@ -75,7 +76,7 @@ class IApplicationNode(INode):
if 'file_id' not in audio: if 'file_id' not in audio:
raise ValueError( raise ValueError(
_("Parameter value error: The uploaded audio lacks file_id, and the audio upload fails.")) _("Parameter value error: The uploaded audio lacks file_id, and the audio upload fails."))
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data, return self.execute(**{**self.flow_params_serializer.data, **self.node_params_serializer.data},
app_document_list=app_document_list, app_image_list=app_image_list, app_document_list=app_document_list, app_image_list=app_image_list,
app_audio_list=app_audio_list, app_audio_list=app_audio_list,
message=str(question), **kwargs) message=str(question), **kwargs)

View File

@ -4,7 +4,7 @@ import re
import time import time
import uuid import uuid
from typing import Dict, List from typing import Dict, List
from django.utils.translation import gettext as _
from application.flow.common import Answer from application.flow.common import Answer
from application.flow.i_step_node import NodeResult, INode from application.flow.i_step_node import NodeResult, INode
from application.flow.step_node.application_node.i_application_node import IApplicationNode from application.flow.step_node.application_node.i_application_node import IApplicationNode
@ -55,7 +55,7 @@ def write_context_stream(node_variable: Dict, workflow_variable: Dict, node: INo
# 先把流转成字符串 # 先把流转成字符串
response_content = chunk.decode('utf-8')[6:] response_content = chunk.decode('utf-8')[6:]
response_content = json.loads(response_content) response_content = json.loads(response_content)
content = response_content.get('content', '') content = (response_content.get('content', '') or '')
runtime_node_id = response_content.get('runtime_node_id', '') runtime_node_id = response_content.get('runtime_node_id', '')
chat_record_id = response_content.get('chat_record_id', '') chat_record_id = response_content.get('chat_record_id', '')
child_node = response_content.get('child_node') child_node = response_content.get('child_node')
@ -63,7 +63,7 @@ def write_context_stream(node_variable: Dict, workflow_variable: Dict, node: INo
node_type = response_content.get('node_type') node_type = response_content.get('node_type')
real_node_id = response_content.get('real_node_id') real_node_id = response_content.get('real_node_id')
node_is_end = response_content.get('node_is_end', False) node_is_end = response_content.get('node_is_end', False)
_reasoning_content = response_content.get('reasoning_content', '') _reasoning_content = (response_content.get('reasoning_content', '') or '')
if node_type == 'form-node': if node_type == 'form-node':
is_interrupt_exec = True is_interrupt_exec = True
answer += content answer += content
@ -168,17 +168,33 @@ class BaseApplicationNode(IApplicationNode):
self.context['question'] = details.get('question') self.context['question'] = details.get('question')
self.context['type'] = details.get('type') self.context['type'] = details.get('type')
self.context['reasoning_content'] = details.get('reasoning_content') self.context['reasoning_content'] = details.get('reasoning_content')
self.answer_text = details.get('answer') if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def execute(self, application_id, message, chat_id, chat_record_id, stream, re_chat, client_id, client_type, def get_chat_asker(self, kwargs):
asker = kwargs.get('asker')
if asker:
if isinstance(asker, dict):
return asker
return {'username': asker}
return self.workflow_manage.work_flow_post_handler.chat_info.get_chat_user()
def execute(self, application_id, message, chat_id, chat_record_id, stream, re_chat,
chat_user_id,
chat_user_type,
app_document_list=None, app_image_list=None, app_audio_list=None, child_node=None, node_data=None, app_document_list=None, app_image_list=None, app_audio_list=None, child_node=None, node_data=None,
**kwargs) -> NodeResult: **kwargs) -> NodeResult:
from application.serializers.chat_message_serializers import ChatMessageSerializer from chat.serializers.chat import ChatSerializers
if application_id == self.workflow_manage.get_body().get('application_id'):
raise Exception(_("The sub application cannot use the current node"))
# 生成嵌入应用的chat_id # 生成嵌入应用的chat_id
current_chat_id = string_to_uuid(chat_id + application_id) current_chat_id = string_to_uuid(chat_id + application_id)
Chat.objects.get_or_create(id=current_chat_id, defaults={ Chat.objects.get_or_create(id=current_chat_id, defaults={
'application_id': application_id, 'application_id': application_id,
'abstract': message[0:1024] 'abstract': message[0:1024],
'chat_user_id': chat_user_id,
'chat_user_type': chat_user_type,
'asker': self.get_chat_asker(kwargs)
}) })
if app_document_list is None: if app_document_list is None:
app_document_list = [] app_document_list = []
@ -195,22 +211,26 @@ class BaseApplicationNode(IApplicationNode):
child_node_value = child_node.get('child_node') child_node_value = child_node.get('child_node')
application_node_dict = self.context.get('application_node_dict') application_node_dict = self.context.get('application_node_dict')
reset_application_node_dict(application_node_dict, runtime_node_id, node_data) reset_application_node_dict(application_node_dict, runtime_node_id, node_data)
response = ChatSerializers(data={
"chat_id": current_chat_id,
"chat_user_id": chat_user_id,
'chat_user_type': chat_user_type,
'application_id': application_id,
'debug': False
}).chat(instance=
{'message': message,
're_chat': re_chat,
'stream': stream,
'document_list': app_document_list,
'image_list': app_image_list,
'audio_list': app_audio_list,
'runtime_node_id': runtime_node_id,
'chat_record_id': record_id,
'child_node': child_node_value,
'node_data': node_data,
'form_data': kwargs}
)
response = ChatMessageSerializer(
data={'chat_id': current_chat_id, 'message': message,
're_chat': re_chat,
'stream': stream,
'application_id': application_id,
'client_id': client_id,
'client_type': client_type,
'document_list': app_document_list,
'image_list': app_image_list,
'audio_list': app_audio_list,
'runtime_node_id': runtime_node_id,
'chat_record_id': record_id,
'child_node': child_node_value,
'node_data': node_data,
'form_data': kwargs}).chat()
if response.status_code == 200: if response.status_code == 200:
if stream: if stream:
content_generator = response.streaming_content content_generator = response.streaming_content

View File

@ -11,20 +11,20 @@ from typing import Type
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode from application.flow.i_step_node import INode
from common.util.field_message import ErrMessage
class ConditionSerializer(serializers.Serializer): class ConditionSerializer(serializers.Serializer):
compare = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Comparator"))) compare = serializers.CharField(required=True, label=_("Comparator"))
value = serializers.CharField(required=True, error_messages=ErrMessage.char(_("value"))) value = serializers.CharField(required=True, label=_("value"))
field = serializers.ListField(required=True, error_messages=ErrMessage.char(_("Fields"))) field = serializers.ListField(required=True, label=_("Fields"))
class ConditionBranchSerializer(serializers.Serializer): class ConditionBranchSerializer(serializers.Serializer):
id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Branch id"))) id = serializers.CharField(required=True, label=_("Branch id"))
type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Branch Type"))) type = serializers.CharField(required=True, label=_("Branch Type"))
condition = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Condition or|and"))) condition = serializers.CharField(required=True, label=_("Condition or|and"))
conditions = ConditionSerializer(many=True) conditions = ConditionSerializer(many=True)
@ -37,3 +37,5 @@ class IConditionNode(INode):
return ConditionNodeParamsSerializer return ConditionNodeParamsSerializer
type = 'condition-node' type = 'condition-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP]

View File

@ -9,7 +9,7 @@
from typing import List from typing import List
from application.flow.i_step_node import NodeResult from application.flow.i_step_node import NodeResult
from application.flow.step_node.condition_node.compare import compare_handle_list from application.flow.compare import compare_handle_list
from application.flow.step_node.condition_node.i_condition_node import IConditionNode from application.flow.step_node.condition_node.i_condition_node import IConditionNode

View File

@ -0,0 +1,8 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file __init__.py.py
@date2025/11/11 10:06
@desc:
"""

View File

@ -0,0 +1,42 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file i_data_source_local_node.py
@date2025/11/11 10:06
@desc:
"""
from abc import abstractmethod
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult
class DataSourceLocalNodeParamsSerializer(serializers.Serializer):
file_type_list = serializers.ListField(child=serializers.CharField(label=('')), label='')
file_size_limit = serializers.IntegerField(required=True, label=_("Number of uploaded files"))
file_count_limit = serializers.IntegerField(required=True, label=_("Upload file size"))
class IDataSourceLocalNode(INode):
type = 'data-source-local-node'
@staticmethod
@abstractmethod
def get_form_list(node):
pass
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return DataSourceLocalNodeParamsSerializer
def _run(self):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, file_type_list, file_size_limit, file_count_limit, **kwargs) -> NodeResult:
pass
support = [WorkflowMode.KNOWLEDGE]

View File

@ -0,0 +1,8 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file __init__.py.py
@date2025/11/11 10:08
@desc:
"""

View File

@ -0,0 +1,51 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file base_data_source_local_node.py
@date2025/11/11 10:30
@desc:
"""
from application.flow.i_step_node import NodeResult
from application.flow.step_node.data_source_local_node.i_data_source_local_node import IDataSourceLocalNode
from common import forms
from common.forms import BaseForm
class BaseDataSourceLocalNodeForm(BaseForm):
api_key = forms.PasswordInputField('API Key', required=True)
class BaseDataSourceLocalNode(IDataSourceLocalNode):
def save_context(self, details, workflow_manage):
pass
@staticmethod
def get_form_list(node):
node_data = node.get('properties').get('node_data')
return [{
'field': 'file_list',
'input_type': 'LocalFileUpload',
'attrs': {
'file_count_limit': node_data.get('file_count_limit') or 10,
'file_size_limit': node_data.get('file_size_limit') or 100,
'file_type_list': node_data.get('file_type_list'),
},
'label': '',
}]
def execute(self, file_type_list, file_size_limit, file_count_limit, **kwargs) -> NodeResult:
return NodeResult({'file_list': self.workflow_manage.params.get('data_source', {}).get('file_list')},
self.workflow_manage.params.get('knowledge_base') or {})
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'type': self.node.type,
'file_list': self.context.get('file_list'),
'knowledge_base': self.workflow_params.get('knowledge_base'),
'status': self.status,
'err_message': self.err_message
}

View File

@ -1,8 +1,8 @@
# coding=utf-8 # coding=utf-8
""" """
@project: MaxKB @project: MaxKB
@Author @Authorniu
@file __init__.py.py @file __init__.py.py
@date2024/8/2 14:55 @date2025/11/12 13:43
@desc: @desc:
""" """

View File

@ -0,0 +1,28 @@
# coding=utf-8
"""
@project: MaxKB
@Authorniu
@file i_data_source_web_node.py
@date2025/11/12 13:47
@desc:
"""
from abc import abstractmethod
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult
class IDataSourceWebNode(INode):
type = 'data-source-web-node'
support = [WorkflowMode.KNOWLEDGE]
@staticmethod
@abstractmethod
def get_form_list(node):
pass
def _run(self):
return self.execute(**self.flow_params_serializer.data)
def execute(self, **kwargs) -> NodeResult:
pass

View File

@ -0,0 +1,8 @@
# coding=utf-8
"""
@project: MaxKB
@Authorniu
@file __init__.py
@date2025/11/12 13:44
@desc:
"""

View File

@ -0,0 +1,86 @@
# coding=utf-8
"""
@project: MaxKB
@Authorniu
@file base_data_source_web_node.py
@date2025/11/12 13:47
@desc:
"""
import traceback
from django.utils.translation import gettext_lazy as _
from application.flow.i_step_node import NodeResult
from application.flow.step_node.data_source_web_node.i_data_source_web_node import IDataSourceWebNode
from common import forms
from common.forms import BaseForm
from common.utils.fork import ForkManage, Fork, ChildLink
from common.utils.logger import maxkb_logger
class BaseDataSourceWebNodeForm(BaseForm):
source_url = forms.TextInputField(_('Web source url'), required=True, attrs={
'placeholder': _('Please enter the Web root address')})
selector = forms.TextInputField(_('Web knowledge selector'), required=False, attrs={
'placeholder': _('The default is body, you can enter .classname/#idname/tagname')})
def get_collect_handler():
results = []
def handler(child_link: ChildLink, response: Fork.Response):
if response.status == 200:
try:
document_name = child_link.tag.text if child_link.tag is not None and len(
child_link.tag.text.strip()) > 0 else child_link.url
results.append({
"name": document_name.strip(),
"content": response.content,
})
except Exception as e:
maxkb_logger.error(f'{str(e)}:{traceback.format_exc()}')
return handler, results
class BaseDataSourceWebNode(IDataSourceWebNode):
def save_context(self, details, workflow_manage):
pass
@staticmethod
def get_form_list(node):
return BaseDataSourceWebNodeForm().to_form_list()
def execute(self, **kwargs) -> NodeResult:
BaseDataSourceWebNodeForm().valid_form(self.workflow_params.get("data_source"))
data_source = self.workflow_params.get("data_source")
node_id = data_source.get("node_id")
source_url = data_source.get("source_url")
selector = data_source.get("selector") or "body"
collect_handler, document_list = get_collect_handler()
try:
ForkManage(source_url, selector.split(" ") if selector is not None else []).fork(3, set(), collect_handler)
return NodeResult({'document_list': document_list,'source_url': source_url, 'selector': selector},
self.workflow_manage.params.get('knowledge_base') or {})
except Exception as e:
maxkb_logger.error(_('data source web node:{node_id} error{error}{traceback}').format(
knowledge_id=node_id, error=str(e), traceback=traceback.format_exc()))
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'type': self.node.type,
'input_params': {"source_url": self.context.get("source_url"), "selector": self.context.get('selector')},
'output_params': self.context.get('document_list'),
'knowledge_base': self.workflow_params.get('knowledge_base'),
'status': self.status,
'err_message': self.err_message
}

View File

@ -10,18 +10,20 @@ from typing import Type
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.exception.app_exception import AppApiException from common.exception.app_exception import AppApiException
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
class ReplyNodeParamsSerializer(serializers.Serializer): class ReplyNodeParamsSerializer(serializers.Serializer):
reply_type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Response Type"))) reply_type = serializers.CharField(required=True, label=_("Response Type"))
fields = serializers.ListField(required=False, error_messages=ErrMessage.list(_("Reference Field"))) fields = serializers.ListField(required=False, label=_("Reference Field"))
content = serializers.CharField(required=False, allow_blank=True, allow_null=True, content = serializers.CharField(required=False, allow_blank=True, allow_null=True,
error_messages=ErrMessage.char(_("Direct answer content"))) label=_("Direct answer content"))
is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean(_('Whether to return content'))) is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
def is_valid(self, *, raise_exception=False): def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True) super().is_valid(raise_exception=True)
@ -37,12 +39,19 @@ class ReplyNodeParamsSerializer(serializers.Serializer):
class IReplyNode(INode): class IReplyNode(INode):
type = 'reply-node' type = 'reply-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE_LOOP,
WorkflowMode.KNOWLEDGE]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return ReplyNodeParamsSerializer return ReplyNodeParamsSerializer
def _run(self): def _run(self):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data) if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data,
**{'stream': True})
else:
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, reply_type, stream, fields=None, content=None, **kwargs) -> NodeResult: def execute(self, reply_type, stream, fields=None, content=None, **kwargs) -> NodeResult:
pass pass

View File

@ -15,7 +15,9 @@ from application.flow.step_node.direct_reply_node.i_reply_node import IReplyNode
class BaseReplyNode(IReplyNode): class BaseReplyNode(IReplyNode):
def save_context(self, details, workflow_manage): def save_context(self, details, workflow_manage):
self.context['answer'] = details.get('answer') self.context['answer'] = details.get('answer')
self.answer_text = details.get('answer') if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def execute(self, reply_type, stream, fields=None, content=None, **kwargs) -> NodeResult: def execute(self, reply_type, stream, fields=None, content=None, **kwargs) -> NodeResult:
if reply_type == 'referencing': if reply_type == 'referencing':
result = self.get_reference_content(fields) result = self.get_reference_content(fields)

View File

@ -5,17 +5,18 @@ from typing import Type
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
class DocumentExtractNodeSerializer(serializers.Serializer): class DocumentExtractNodeSerializer(serializers.Serializer):
document_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("document"))) document_list = serializers.ListField(required=False, label=_("document"))
class IDocumentExtractNode(INode): class IDocumentExtractNode(INode):
type = 'document-extract-node' type = 'document-extract-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE_LOOP,
WorkflowMode.KNOWLEDGE]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return DocumentExtractNodeSerializer return DocumentExtractNodeSerializer
@ -24,5 +25,5 @@ class IDocumentExtractNode(INode):
self.node_params_serializer.data.get('document_list')[1:]) self.node_params_serializer.data.get('document_list')[1:])
return self.execute(document=res, **self.flow_params_serializer.data) return self.execute(document=res, **self.flow_params_serializer.data)
def execute(self, document, chat_id, **kwargs) -> NodeResult: def execute(self, document, chat_id=None, **kwargs) -> NodeResult:
pass pass

View File

@ -1,72 +1,65 @@
# coding=utf-8 # coding=utf-8
import ast
import io import io
import mimetypes
from django.core.files.uploadedfile import InMemoryUploadedFile import uuid_utils.compat as uuid
from django.db.models import QuerySet from django.db.models import QuerySet
from application.flow.i_step_node import NodeResult from application.flow.i_step_node import NodeResult
from application.flow.step_node.document_extract_node.i_document_extract_node import IDocumentExtractNode from application.flow.step_node.document_extract_node.i_document_extract_node import IDocumentExtractNode
from dataset.models import File from knowledge.models import File, FileSourceType
from dataset.serializers.document_serializers import split_handles, parse_table_handle_list, FileBufferHandle from knowledge.serializers.document import split_handles, parse_table_handle_list, FileBufferHandle
from dataset.serializers.file_serializers import FileSerializer
def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
content_type, _ = mimetypes.guess_type(file_name)
if content_type is None:
# 如果未能识别,设置为默认的二进制文件类型
content_type = "application/octet-stream"
# 创建一个内存中的字节流对象
file_stream = io.BytesIO(file_bytes)
# 获取文件大小
file_size = len(file_bytes)
# 创建 InMemoryUploadedFile 对象
uploaded_file = InMemoryUploadedFile(
file=file_stream,
field_name=None,
name=file_name,
content_type=content_type,
size=file_size,
charset=None,
)
return uploaded_file
splitter = '\n`-----------------------------------`\n' splitter = '\n`-----------------------------------`\n'
class BaseDocumentExtractNode(IDocumentExtractNode): class BaseDocumentExtractNode(IDocumentExtractNode):
def save_context(self, details, workflow_manage): def save_context(self, details, workflow_manage):
self.context['content'] = details.get('content') self.context['content'] = details.get('content')
def execute(self, document, chat_id=None, **kwargs):
def execute(self, document, chat_id, **kwargs):
get_buffer = FileBufferHandle().get_buffer get_buffer = FileBufferHandle().get_buffer
self.context['document_list'] = document self.context['document_list'] = document
content = [] content = []
if document is None or not isinstance(document, list): if document is None or not isinstance(document, list):
return NodeResult({'content': ''}, {}) return NodeResult({'content': '', 'document_list': []}, {})
application = self.workflow_manage.work_flow_post_handler.chat_info.application # 安全获取 application
application_id = None
if (self.workflow_manage and
self.workflow_manage.work_flow_post_handler and
self.workflow_manage.work_flow_post_handler.chat_info):
application_id = self.workflow_manage.work_flow_post_handler.chat_info.application.id
knowledge_id = self.workflow_params.get('knowledge_id')
# doc文件中的图片保存 # doc文件中的图片保存
def save_image(image_list): def save_image(image_list):
for image in image_list: for image in image_list:
meta = { meta = {
'debug': False if application.id else True, 'debug': False if (application_id or knowledge_id) else True,
'chat_id': chat_id, 'chat_id': chat_id,
'application_id': str(application.id) if application.id else None, 'application_id': str(application_id) if application_id else None,
'knowledge_id': str(knowledge_id) if knowledge_id else None,
'file_id': str(image.id) 'file_id': str(image.id)
} }
file = bytes_to_uploaded_file(image.image, image.image_name) file_bytes = image.meta.pop('content')
FileSerializer(data={'file': file, 'meta': meta}).upload() new_file = File(
id=meta['file_id'],
file_name=image.file_name,
file_size=len(file_bytes),
source_type=FileSourceType.APPLICATION.value if meta[
'application_id'] else FileSourceType.KNOWLEDGE.value,
source_id=meta['application_id'] if meta['application_id'] else meta['knowledge_id'],
meta=meta
)
if not QuerySet(File).filter(id=new_file.id).exists():
new_file.save(file_bytes)
document_list = []
for doc in document: for doc in document:
file = QuerySet(File).filter(id=doc['file_id']).first() file = QuerySet(File).filter(id=doc['file_id']).first()
buffer = io.BytesIO(file.get_byte().tobytes()) buffer = io.BytesIO(file.get_bytes())
buffer.name = doc['name'] # this is the important line buffer.name = doc['name'] # this is the important line
for split_handle in (parse_table_handle_list + split_handles): for split_handle in (parse_table_handle_list + split_handles):
@ -75,9 +68,10 @@ class BaseDocumentExtractNode(IDocumentExtractNode):
buffer.seek(0) buffer.seek(0)
file_content = split_handle.get_content(buffer, save_image) file_content = split_handle.get_content(buffer, save_image)
content.append('### ' + doc['name'] + '\n' + file_content) content.append('### ' + doc['name'] + '\n' + file_content)
document_list.append({'id': str(file.id), 'name': doc['name'], 'content': file_content})
break break
return NodeResult({'content': splitter.join(content)}, {}) return NodeResult({'content': splitter.join(content), 'document_list': document_list}, {})
def get_details(self, index: int, **kwargs): def get_details(self, index: int, **kwargs):
content = self.context.get('content', '').split(splitter) content = self.context.get('content', '').split(splitter)

View File

@ -0,0 +1 @@
from .impl import *

View File

@ -0,0 +1,90 @@
# coding=utf-8
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult
class DocumentSplitNodeSerializer(serializers.Serializer):
document_list = serializers.ListField(required=False, label=_("document list"))
split_strategy = serializers.ChoiceField(
choices=['auto', 'custom', 'qa'], required=False, label=_("split strategy"), default='auto'
)
paragraph_title_relate_problem_type = serializers.ChoiceField(
choices=['custom', 'referencing'], required=False, label=_("paragraph title relate problem type"),
default='custom'
)
paragraph_title_relate_problem = serializers.BooleanField(
required=False, label=_("paragraph title relate problem"), default=False
)
paragraph_title_relate_problem_reference = serializers.ListField(
required=False, label=_("paragraph title relate problem reference"), child=serializers.CharField(), default=[]
)
document_name_relate_problem_type = serializers.ChoiceField(
choices=['custom', 'referencing'], required=False, label=_("document name relate problem type"),
default='custom'
)
document_name_relate_problem = serializers.BooleanField(
required=False, label=_("document name relate problem"), default=False
)
document_name_relate_problem_reference = serializers.ListField(
required=False, label=_("document name relate problem reference"), child=serializers.CharField(), default=[]
)
limit = serializers.IntegerField(required=False, label=_("limit"), default=4096)
limit_type = serializers.ChoiceField(
choices=['custom', 'referencing'], required=False, label=_("document name relate problem type"),
default='custom'
)
limit_reference = serializers.ListField(
required=False, label=_("limit reference"), child=serializers.CharField(), default=[]
)
chunk_size = serializers.IntegerField(required=False, label=_("chunk size"), default=256)
chunk_size_type = serializers.ChoiceField(
choices=['custom', 'referencing'], required=False, label=_("chunk size type"), default='custom'
)
chunk_size_reference = serializers.ListField(
required=False, label=_("chunk size reference"), child=serializers.CharField(), default=[]
)
patterns = serializers.ListField(
required=False, label=_("patterns"), child=serializers.CharField(), default=[]
)
patterns_type = serializers.ChoiceField(
choices=['custom', 'referencing'], required=False, label=_("patterns type"), default='custom'
)
patterns_reference = serializers.ListField(
required=False, label=_("patterns reference"), child=serializers.CharField(), default=[]
)
with_filter = serializers.BooleanField(
required=False, label=_("with filter"), default=False
)
with_filter_type = serializers.ChoiceField(
choices=['custom', 'referencing'], required=False, label=_("with filter type"), default='custom'
)
with_filter_reference = serializers.ListField(
required=False, label=_("with filter reference"), child=serializers.CharField(), default=[]
)
class IDocumentSplitNode(INode):
type = 'document-split-node'
support = [
WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE_LOOP, WorkflowMode.KNOWLEDGE
]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return DocumentSplitNodeSerializer
def _run(self):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, document_list, knowledge_id, split_strategy, paragraph_title_relate_problem_type,
paragraph_title_relate_problem, paragraph_title_relate_problem_reference,
document_name_relate_problem_type, document_name_relate_problem,
document_name_relate_problem_reference, limit, limit_type, limit_reference, chunk_size, chunk_size_type,
chunk_size_reference, patterns, patterns_type, patterns_reference, with_filter, with_filter_type,
with_filter_reference, **kwargs) -> NodeResult:
pass

View File

@ -0,0 +1 @@
from .base_document_split_node import BaseDocumentSplitNode

View File

@ -0,0 +1,190 @@
# coding=utf-8
import io
import mimetypes
from typing import List
from django.core.files.uploadedfile import InMemoryUploadedFile
from application.flow.i_step_node import NodeResult
from application.flow.step_node.document_split_node.i_document_split_node import IDocumentSplitNode
from common.chunk import text_to_chunk
from knowledge.serializers.document import default_split_handle, FileBufferHandle, md_qa_split_handle
def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
if file_name.startswith("http"):
file_name = "file.txt"
content_type, _ = mimetypes.guess_type(file_name)
if content_type is None:
# 如果未能识别,设置为默认的二进制文件类型
content_type = "application/octet-stream"
# 创建一个内存中的字节流对象
file_stream = io.BytesIO(file_bytes)
# 获取文件大小
file_size = len(file_bytes)
# 创建 InMemoryUploadedFile 对象
uploaded_file = InMemoryUploadedFile(
file=file_stream,
field_name=None,
name=file_name,
content_type=content_type,
size=file_size,
charset=None,
)
return uploaded_file
class BaseDocumentSplitNode(IDocumentSplitNode):
def save_context(self, details, workflow_manage):
self.context['content'] = details.get('content')
def get_reference_content(self, fields: List[str]):
return self.workflow_manage.get_reference_field(fields[0], fields[1:])
def execute(self, document_list, knowledge_id, split_strategy, paragraph_title_relate_problem_type,
paragraph_title_relate_problem, paragraph_title_relate_problem_reference,
document_name_relate_problem_type, document_name_relate_problem,
document_name_relate_problem_reference, limit, limit_type, limit_reference, chunk_size, chunk_size_type,
chunk_size_reference, patterns, patterns_type, patterns_reference, with_filter, with_filter_type,
with_filter_reference, **kwargs) -> NodeResult:
self.context['knowledge_id'] = knowledge_id
file_list = self.get_reference_content(document_list)
# 处理引用类型的参数
if patterns_type == 'referencing':
patterns = self.get_reference_content(patterns_reference)
if limit_type == 'referencing':
limit = self.get_reference_content(limit_reference)
if chunk_size_type == 'referencing':
chunk_size = self.get_reference_content(chunk_size_reference)
if with_filter_type == 'referencing':
with_filter = self.get_reference_content(with_filter_reference)
paragraph_list = []
for doc in file_list:
get_buffer = FileBufferHandle().get_buffer
file_mem = bytes_to_uploaded_file(doc['content'].encode('utf-8'), doc['name'])
if split_strategy == 'qa':
result = md_qa_split_handle.handle(file_mem, get_buffer, self._save_image)
else:
result = default_split_handle.handle(file_mem, patterns, with_filter, limit, get_buffer,
self._save_image)
# 统一处理结果为列表
results = result if isinstance(result, list) else [result]
for item in results:
self._process_split_result(
item, knowledge_id, doc.get('id'), doc.get('name'),
split_strategy, paragraph_title_relate_problem_type,
paragraph_title_relate_problem, paragraph_title_relate_problem_reference,
document_name_relate_problem_type, document_name_relate_problem,
document_name_relate_problem_reference, chunk_size
)
paragraph_list += results
self.context['paragraph_list'] = paragraph_list
self.context['document_list'] = file_list
self.context['limit'] = limit
self.context['chunk_size'] = chunk_size
self.context['with_filter'] = with_filter
self.context['patterns'] = patterns
self.context['split_strategy'] = split_strategy
return NodeResult({'paragraph_list': paragraph_list}, {})
def _save_image(self, image_list):
pass
def _process_split_result(
self, item, knowledge_id, source_file_id, file_name,
split_strategy, paragraph_title_relate_problem_type,
paragraph_title_relate_problem, paragraph_title_relate_problem_reference,
document_name_relate_problem_type, document_name_relate_problem,
document_name_relate_problem_reference, chunk_size
):
"""处理文档分割结果"""
item['meta'] = {
'knowledge_id': knowledge_id,
'source_file_id': source_file_id,
'source_url': file_name,
}
if item.get('name', 'file.txt') == 'file.txt':
item['name'] = file_name
item['source_file_id'] = source_file_id
item['paragraphs'] = item.pop('content', item.get('paragraphs', []))
for paragraph in item['paragraphs']:
paragraph['problem_list'] = self._generate_problem_list(
paragraph, file_name,
split_strategy, paragraph_title_relate_problem_type,
paragraph_title_relate_problem, paragraph_title_relate_problem_reference,
document_name_relate_problem_type, document_name_relate_problem,
document_name_relate_problem_reference
)
paragraph['is_active'] = True
paragraph['chunks'] = text_to_chunk(paragraph['content'], chunk_size)
def _generate_problem_list(
self, paragraph, document_name, split_strategy, paragraph_title_relate_problem_type,
paragraph_title_relate_problem, paragraph_title_relate_problem_reference,
document_name_relate_problem_type, document_name_relate_problem,
document_name_relate_problem_reference
):
if paragraph_title_relate_problem_type == 'referencing':
paragraph_title_relate_problem = self.get_reference_content(paragraph_title_relate_problem_reference)
if document_name_relate_problem_type == 'referencing':
document_name_relate_problem = self.get_reference_content(document_name_relate_problem_reference)
problem_list = [
item for p in paragraph.get('problem_list', []) for item in p.get('content', '').split('<br>')
if item.strip()
]
if split_strategy == 'auto':
if paragraph_title_relate_problem and paragraph.get('title'):
problem_list.append(paragraph.get('title'))
if document_name_relate_problem and document_name:
problem_list.append(document_name)
elif split_strategy == 'custom':
if paragraph_title_relate_problem and paragraph.get('title'):
problem_list.append(paragraph.get('title'))
if document_name_relate_problem and document_name:
problem_list.append(document_name)
elif split_strategy == 'qa':
if document_name_relate_problem and document_name:
problem_list.append(document_name)
return list(set(problem_list))
def get_details(self, index: int, **kwargs):
paragraph_list = self.context.get('paragraph_list', [])
# 每个文档保留前5个分段
limited_paragraph_list = []
for doc in paragraph_list:
if doc.get('paragraphs'):
doc_copy = doc.copy()
doc_copy['paragraphs'] = doc['paragraphs'][:5]
limited_paragraph_list.append(doc_copy)
else:
limited_paragraph_list.append(doc)
paragraph_list = limited_paragraph_list
return {
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'type': self.node.type,
'status': self.status,
'err_message': self.err_message,
'paragraph_list': paragraph_list,
'limit': self.context.get('limit'),
'chunk_size': self.context.get('chunk_size'),
'with_filter': self.context.get('with_filter'),
'patterns': self.context.get('patterns'),
'split_strategy': self.context.get('split_strategy'),
# 'document_list': self.context.get('document_list', []),
}

View File

@ -10,20 +10,22 @@ from typing import Type
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
class FormNodeParamsSerializer(serializers.Serializer): class FormNodeParamsSerializer(serializers.Serializer):
form_field_list = serializers.ListField(required=True, error_messages=ErrMessage.list(_("Form Configuration"))) form_field_list = serializers.ListField(required=True, label=_("Form Configuration"))
form_content_format = serializers.CharField(required=True, error_messages=ErrMessage.char(_('Form output content'))) form_content_format = serializers.CharField(required=True, label=_('Form output content'))
form_data = serializers.DictField(required=False, allow_null=True, error_messages=ErrMessage.dict(_("Form Data"))) form_data = serializers.DictField(required=False, allow_null=True, label=_("Form Data"))
class IFormNode(INode): class IFormNode(INode):
type = 'form-node' type = 'form-node'
view_type = 'single_view' view_type = 'single_view'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return FormNodeParamsSerializer return FormNodeParamsSerializer

View File

@ -16,6 +16,29 @@ from application.flow.common import Answer
from application.flow.i_step_node import NodeResult from application.flow.i_step_node import NodeResult
from application.flow.step_node.form_node.i_form_node import IFormNode from application.flow.step_node.form_node.i_form_node import IFormNode
multi_select_list = [
'MultiSelect',
'MultiRow'
]
def get_default_option(option_list, _type, value_field):
try:
if option_list is not None and isinstance(option_list, list) and len(option_list) > 0:
default_value_list = [o.get(value_field) for o in option_list if o.get('default')]
if len(default_value_list) == 0:
return [option_list[0].get(
value_field)] if multi_select_list.__contains__(_type) else option_list[0].get(
value_field)
else:
if multi_select_list.__contains__(_type):
return default_value_list
else:
return default_value_list[0]
except Exception as _:
pass
return []
def write_context(step_variable: Dict, global_variable: Dict, node, workflow): def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
if step_variable is not None: if step_variable is not None:
@ -28,6 +51,13 @@ def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
node.context['run_time'] = time.time() - node.context['start_time'] node.context['run_time'] = time.time() - node.context['start_time']
def generate_prompt(workflow_manage, _value):
try:
return workflow_manage.generate_prompt(_value)
except Exception as e:
return _value
class BaseFormNode(IFormNode): class BaseFormNode(IFormNode):
def save_context(self, details, workflow_manage): def save_context(self, details, workflow_manage):
form_data = details.get('form_data', None) form_data = details.get('form_data', None)
@ -38,11 +68,43 @@ class BaseFormNode(IFormNode):
self.context['start_time'] = details.get('start_time') self.context['start_time'] = details.get('start_time')
self.context['form_data'] = form_data self.context['form_data'] = form_data
self.context['is_submit'] = details.get('is_submit') self.context['is_submit'] = details.get('is_submit')
self.answer_text = details.get('result') if self.node_params.get('is_result', False):
self.answer_text = details.get('result')
if form_data is not None: if form_data is not None:
for key in form_data: for key in form_data:
self.context[key] = form_data[key] self.context[key] = form_data[key]
def reset_field(self, field):
reset_field = ['field', 'label', 'default_value']
for f in reset_field:
_value = field[f]
if _value is None:
continue
if isinstance(_value, str):
field[f] = generate_prompt(self.workflow_manage, _value)
elif f == 'label':
_label_value = _value.get('label')
_value['label'] = generate_prompt(self.workflow_manage, _label_value)
tooltip = _value.get('attrs').get('tooltip')
if tooltip is not None:
_value.get('attrs')['tooltip'] = generate_prompt(self.workflow_manage, tooltip)
if ['SingleSelect', 'MultiSelect', 'RadioCard', 'RadioRow', 'MultiRow'].__contains__(field.get('input_type')):
if field.get('assignment_method') == 'ref_variables':
option_list = self.workflow_manage.get_reference_field(field.get('option_list')[0],
field.get('option_list')[1:])
option_list = option_list if isinstance(option_list, list) else []
field['option_list'] = option_list
field['default_value'] = get_default_option(option_list, field.get('input_type'),
field.get('value_field'))
if ['JsonInput'].__contains__(field.get('input_type')):
if field.get('default_value_assignment_method') == 'ref_variables':
field['default_value'] = self.workflow_manage.get_reference_field(field.get('default_value')[0],
field.get('default_value')[1:])
return field
def execute(self, form_field_list, form_content_format, form_data, **kwargs) -> NodeResult: def execute(self, form_field_list, form_content_format, form_data, **kwargs) -> NodeResult:
if form_data is not None: if form_data is not None:
self.context['is_submit'] = True self.context['is_submit'] = True
@ -51,6 +113,7 @@ class BaseFormNode(IFormNode):
self.context[key] = form_data.get(key) self.context[key] = form_data.get(key)
else: else:
self.context['is_submit'] = False self.context['is_submit'] = False
form_field_list = [self.reset_field(field) for field in form_field_list]
form_setting = {"form_field_list": form_field_list, "runtime_node_id": self.runtime_node_id, form_setting = {"form_field_list": form_field_list, "runtime_node_id": self.runtime_node_id,
"chat_record_id": self.flow_params_serializer.data.get("chat_record_id"), "chat_record_id": self.flow_params_serializer.data.get("chat_record_id"),
"is_submit": self.context.get("is_submit", False)} "is_submit": self.context.get("is_submit", False)}
@ -58,7 +121,10 @@ class BaseFormNode(IFormNode):
context = self.workflow_manage.get_workflow_content() context = self.workflow_manage.get_workflow_content()
form_content_format = self.workflow_manage.reset_prompt(form_content_format) form_content_format = self.workflow_manage.reset_prompt(form_content_format)
prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2') prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2')
value = prompt_template.format(form=form, context=context) value = prompt_template.format(form=form, context=context, runtime_node_id=self.runtime_node_id,
chat_record_id=self.flow_params_serializer.data.get("chat_record_id"),
form_field_list=form_field_list)
return NodeResult( return NodeResult(
{'result': value, 'form_field_list': form_field_list, 'form_content_format': form_content_format}, {}, {'result': value, 'form_field_list': form_field_list, 'form_content_format': form_content_format}, {},
_write_context=write_context) _write_context=write_context)
@ -70,11 +136,13 @@ class BaseFormNode(IFormNode):
"chat_record_id": self.flow_params_serializer.data.get("chat_record_id"), "chat_record_id": self.flow_params_serializer.data.get("chat_record_id"),
'form_data': self.context.get('form_data', {}), 'form_data': self.context.get('form_data', {}),
"is_submit": self.context.get("is_submit", False)} "is_submit": self.context.get("is_submit", False)}
form = f'<form_rander>{json.dumps(form_setting,ensure_ascii=False)}</form_rander>' form = f'<form_rander>{json.dumps(form_setting, ensure_ascii=False)}</form_rander>'
context = self.workflow_manage.get_workflow_content() context = self.workflow_manage.get_workflow_content()
form_content_format = self.workflow_manage.reset_prompt(form_content_format) form_content_format = self.workflow_manage.reset_prompt(form_content_format)
prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2') prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2')
value = prompt_template.format(form=form, context=context) value = prompt_template.format(form=form, context=context, runtime_node_id=self.runtime_node_id,
chat_record_id=self.flow_params_serializer.data.get("chat_record_id"),
form_field_list=form_field_list)
return [Answer(value, self.view_type, self.runtime_node_id, self.workflow_params['chat_record_id'], None, return [Answer(value, self.view_type, self.runtime_node_id, self.workflow_params['chat_record_id'], None,
self.runtime_node_id, '')] self.runtime_node_id, '')]
@ -85,11 +153,13 @@ class BaseFormNode(IFormNode):
"chat_record_id": self.flow_params_serializer.data.get("chat_record_id"), "chat_record_id": self.flow_params_serializer.data.get("chat_record_id"),
'form_data': self.context.get('form_data', {}), 'form_data': self.context.get('form_data', {}),
"is_submit": self.context.get("is_submit", False)} "is_submit": self.context.get("is_submit", False)}
form = f'<form_rander>{json.dumps(form_setting,ensure_ascii=False)}</form_rander>' form = f'<form_rander>{json.dumps(form_setting, ensure_ascii=False)}</form_rander>'
context = self.workflow_manage.get_workflow_content() context = self.workflow_manage.get_workflow_content()
form_content_format = self.workflow_manage.reset_prompt(form_content_format) form_content_format = self.workflow_manage.reset_prompt(form_content_format)
prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2') prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2')
value = prompt_template.format(form=form, context=context) value = prompt_template.format(form=form, context=context, runtime_node_id=self.runtime_node_id,
chat_record_id=self.flow_params_serializer.data.get("chat_record_id"),
form_field_list=form_field_list)
return { return {
'name': self.node.properties.get('stepName'), 'name': self.node.properties.get('stepName'),
"index": index, "index": index,

View File

@ -1,149 +0,0 @@
# coding=utf-8
"""
@project: MaxKB
@Author
@file base_function_lib_node.py
@date2024/8/8 17:49
@desc:
"""
import json
import time
from typing import Dict
from django.db.models import QuerySet
from django.utils.translation import gettext as _
from application.flow.i_step_node import NodeResult
from application.flow.step_node.function_lib_node.i_function_lib_node import IFunctionLibNode
from common.exception.app_exception import AppApiException
from common.util.function_code import FunctionExecutor
from common.util.rsa_util import rsa_long_decrypt
from function_lib.models.function import FunctionLib
from smartdoc.const import CONFIG
function_executor = FunctionExecutor(CONFIG.get('SANDBOX'))
def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
if step_variable is not None:
for key in step_variable:
node.context[key] = step_variable[key]
if workflow.is_result(node, NodeResult(step_variable, global_variable)) and 'result' in step_variable:
result = str(step_variable['result']) + '\n'
yield result
node.answer_text = result
node.context['run_time'] = time.time() - node.context['start_time']
def get_field_value(debug_field_list, name, is_required):
result = [field for field in debug_field_list if field.get('name') == name]
if len(result) > 0:
return result[-1]['value']
if is_required:
raise AppApiException(500, _('Field: {name} No value set').format(name=name))
return None
def valid_reference_value(_type, value, name):
if _type == 'int':
instance_type = int | float
elif _type == 'float':
instance_type = float | int
elif _type == 'dict':
instance_type = dict
elif _type == 'array':
instance_type = list
elif _type == 'string':
instance_type = str
else:
raise Exception(_('Field: {name} Type: {_type} Value: {value} Unsupported types').format(name=name,
_type=_type))
if not isinstance(value, instance_type):
raise Exception(
_('Field: {name} Type: {_type} Value: {value} Type error').format(name=name, _type=_type,
value=value))
def convert_value(name: str, value, _type, is_required, source, node):
if not is_required and value is None:
return None
if not is_required and source == 'reference' and (value is None or len(value) == 0):
return None
if source == 'reference':
value = node.workflow_manage.get_reference_field(
value[0],
value[1:])
valid_reference_value(_type, value, name)
if _type == 'int':
return int(value)
if _type == 'float':
return float(value)
return value
try:
if _type == 'int':
return int(value)
if _type == 'float':
return float(value)
if _type == 'dict':
v = json.loads(value)
if isinstance(v, dict):
return v
raise Exception(_('type error'))
if _type == 'array':
v = json.loads(value)
if isinstance(v, list):
return v
raise Exception(_('type error'))
return value
except Exception as e:
raise Exception(
_('Field: {name} Type: {_type} Value: {value} Type error').format(name=name, _type=_type,
value=value))
def valid_function(function_lib, user_id):
if function_lib is None:
raise Exception(_('Function does not exist'))
if function_lib.permission_type == 'PRIVATE' and str(function_lib.user_id) != str(user_id):
raise Exception(_('No permission to use this function {name}').format(name=function_lib.name))
if not function_lib.is_active:
raise Exception(_('Function {name} is unavailable').format(name=function_lib.name))
class BaseFunctionLibNodeNode(IFunctionLibNode):
def save_context(self, details, workflow_manage):
self.context['result'] = details.get('result')
self.answer_text = str(details.get('result'))
def execute(self, function_lib_id, input_field_list, **kwargs) -> NodeResult:
function_lib = QuerySet(FunctionLib).filter(id=function_lib_id).first()
valid_function(function_lib, self.flow_params_serializer.data.get('user_id'))
params = {field.get('name'): convert_value(field.get('name'), field.get('value'), field.get('type'),
field.get('is_required'),
field.get('source'), self)
for field in
[{'value': get_field_value(input_field_list, field.get('name'), field.get('is_required'),
), **field}
for field in
function_lib.input_field_list]}
self.context['params'] = params
# 合并初始化参数
if function_lib.init_params is not None:
all_params = json.loads(rsa_long_decrypt(function_lib.init_params)) | params
else:
all_params = params
result = function_executor.exec_code(function_lib.code, all_params)
return NodeResult({'result': result}, {}, _write_context=write_context)
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
"index": index,
"result": self.context.get('result'),
"params": self.context.get('params'),
'run_time': self.context.get('run_time'),
'type': self.node.type,
'status': self.status,
'err_message': self.err_message
}

View File

@ -2,43 +2,51 @@
from typing import Type from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _
class ImageGenerateNodeSerializer(serializers.Serializer): class ImageGenerateNodeSerializer(serializers.Serializer):
model_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Model id"))) model_id = serializers.CharField(required=True, label=_("Model id"))
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word (positive)"))) prompt = serializers.CharField(required=True, label=_("Prompt word (positive)"))
negative_prompt = serializers.CharField(required=False, error_messages=ErrMessage.char(_("Prompt word (negative)")), negative_prompt = serializers.CharField(required=False, label=_("Prompt word (negative)"),
allow_null=True, allow_blank=True, ) allow_null=True, allow_blank=True, )
# 多轮对话数量 # 多轮对话数量
dialogue_number = serializers.IntegerField(required=False, default=0, dialogue_number = serializers.IntegerField(required=False, default=0,
error_messages=ErrMessage.integer(_("Number of multi-round conversations"))) label=_("Number of multi-round conversations"))
dialogue_type = serializers.CharField(required=False, default='NODE', dialogue_type = serializers.CharField(required=False, default='NODE',
error_messages=ErrMessage.char(_("Conversation storage type"))) label=_("Conversation storage type"))
is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean(_('Whether to return content'))) is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
model_params_setting = serializers.JSONField(required=False, default=dict, model_params_setting = serializers.JSONField(required=False, default=dict,
error_messages=ErrMessage.json(_("Model parameter settings"))) label=_("Model parameter settings"))
class IImageGenerateNode(INode): class IImageGenerateNode(INode):
type = 'image-generate-node' type = 'image-generate-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE,
WorkflowMode.KNOWLEDGE_LOOP]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return ImageGenerateNodeSerializer return ImageGenerateNodeSerializer
def _run(self): def _run(self):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data) if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data,
**{'history_chat_record': [], 'stream': True, 'chat_id': None, 'chat_record_id': None})
else:
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, model_id, prompt, negative_prompt, dialogue_number, dialogue_type, history_chat_record, chat_id, def execute(self, model_id, prompt, negative_prompt, dialogue_number, dialogue_type, history_chat_record,
model_params_setting, model_params_setting,
chat_record_id, chat_record_id,
**kwargs) -> NodeResult: **kwargs) -> NodeResult:

View File

@ -5,26 +5,29 @@ from typing import List
import requests import requests
from langchain_core.messages import BaseMessage, HumanMessage, AIMessage from langchain_core.messages import BaseMessage, HumanMessage, AIMessage
from application.flow.common import WorkflowMode
from application.flow.i_step_node import NodeResult from application.flow.i_step_node import NodeResult
from application.flow.step_node.image_generate_step_node.i_image_generate_node import IImageGenerateNode from application.flow.step_node.image_generate_step_node.i_image_generate_node import IImageGenerateNode
from common.util.common import bytes_to_uploaded_file from common.utils.common import bytes_to_uploaded_file
from dataset.serializers.file_serializers import FileSerializer from knowledge.models import FileSourceType
from setting.models_provider.tools import get_model_instance_by_model_user_id from oss.serializers.file import FileSerializer
from models_provider.tools import get_model_instance_by_model_workspace_id
class BaseImageGenerateNode(IImageGenerateNode): class BaseImageGenerateNode(IImageGenerateNode):
def save_context(self, details, workflow_manage): def save_context(self, details, workflow_manage):
self.context['answer'] = details.get('answer') self.context['answer'] = details.get('answer')
self.context['question'] = details.get('question') self.context['question'] = details.get('question')
self.answer_text = details.get('answer') if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def execute(self, model_id, prompt, negative_prompt, dialogue_number, dialogue_type, history_chat_record, chat_id, def execute(self, model_id, prompt, negative_prompt, dialogue_number, dialogue_type, history_chat_record,
model_params_setting, model_params_setting,
chat_record_id, chat_record_id,
**kwargs) -> NodeResult: **kwargs) -> NodeResult:
print(model_params_setting) workspace_id = self.workflow_manage.get_body().get('workspace_id')
application = self.workflow_manage.work_flow_post_handler.chat_info.application tti_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
tti_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'), **model_params_setting) **model_params_setting)
history_message = self.get_history_message(history_chat_record, dialogue_number) history_message = self.get_history_message(history_chat_record, dialogue_number)
self.context['history_message'] = history_message self.context['history_message'] = history_message
question = self.generate_prompt_question(prompt) question = self.generate_prompt_question(prompt)
@ -32,19 +35,16 @@ class BaseImageGenerateNode(IImageGenerateNode):
message_list = self.generate_message_list(question, history_message) message_list = self.generate_message_list(question, history_message)
self.context['message_list'] = message_list self.context['message_list'] = message_list
self.context['dialogue_type'] = dialogue_type self.context['dialogue_type'] = dialogue_type
print(message_list) self.context['negative_prompt'] = self.generate_prompt_question(negative_prompt)
image_urls = tti_model.generate_image(question, negative_prompt) image_urls = tti_model.generate_image(question, negative_prompt)
# 保存图片 # 保存图片
file_urls = [] file_urls = []
for image_url in image_urls: for image_url in image_urls:
file_name = 'generated_image.png' file_name = 'generated_image.png'
file = bytes_to_uploaded_file(requests.get(image_url).content, file_name) if isinstance(image_url, str) and image_url.startswith('http'):
meta = { image_url = requests.get(image_url).content
'debug': False if application.id else True, file = bytes_to_uploaded_file(image_url, file_name)
'chat_id': chat_id, file_url = self.upload_file(file)
'application_id': str(application.id) if application.id else None,
}
file_url = FileSerializer(data={'file': file, 'meta': meta}).upload()
file_urls.append(file_url) file_urls.append(file_url)
self.context['image_list'] = [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls] self.context['image_list'] = [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls]
answer = ' '.join([f"![Image]({path})" for path in file_urls]) answer = ' '.join([f"![Image]({path})" for path in file_urls])
@ -91,6 +91,42 @@ class BaseImageGenerateNode(IImageGenerateNode):
question question
] ]
def upload_file(self, file):
if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.upload_knowledge_file(file)
return self.upload_application_file(file)
def upload_knowledge_file(self, file):
knowledge_id = self.workflow_params.get('knowledge_id')
meta = {
'debug': False,
'knowledge_id': knowledge_id,
}
file_url = FileSerializer(data={
'file': file,
'meta': meta,
'source_id': knowledge_id,
'source_type': FileSourceType.KNOWLEDGE.value
}).upload()
return file_url
def upload_application_file(self, file):
application = self.workflow_manage.work_flow_post_handler.chat_info.application
chat_id = self.workflow_params.get('chat_id')
meta = {
'debug': False if application.id else True,
'chat_id': chat_id,
'application_id': str(application.id) if application.id else None,
}
file_url = FileSerializer(data={
'file': file,
'meta': meta,
'source_id': meta['application_id'],
'source_type': FileSourceType.APPLICATION.value
}).upload()
return file_url
@staticmethod @staticmethod
def reset_message_list(message_list: List[BaseMessage], answer_text): def reset_message_list(message_list: List[BaseMessage], answer_text):
result = [{'role': 'user' if isinstance(message, HumanMessage) else 'ai', 'content': message.content} for result = [{'role': 'user' if isinstance(message, HumanMessage) else 'ai', 'content': message.content} for
@ -116,5 +152,6 @@ class BaseImageGenerateNode(IImageGenerateNode):
'status': self.status, 'status': self.status,
'err_message': self.err_message, 'err_message': self.err_message,
'image_list': self.context.get('image_list'), 'image_list': self.context.get('image_list'),
'dialogue_type': self.context.get('dialogue_type') 'dialogue_type': self.context.get('dialogue_type'),
'negative_prompt': self.context.get('negative_prompt'),
} }

View File

@ -0,0 +1,3 @@
# coding=utf-8
from .impl import *

View File

@ -0,0 +1,71 @@
# coding=utf-8
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult
class ImageToVideoNodeSerializer(serializers.Serializer):
model_id = serializers.CharField(required=True, label=_("Model id"))
prompt = serializers.CharField(required=True, label=_("Prompt word (positive)"))
negative_prompt = serializers.CharField(required=False, label=_("Prompt word (negative)"),
allow_null=True, allow_blank=True, )
# 多轮对话数量
dialogue_number = serializers.IntegerField(required=False, default=0,
label=_("Number of multi-round conversations"))
dialogue_type = serializers.CharField(required=False, default='NODE',
label=_("Conversation storage type"))
is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
model_params_setting = serializers.JSONField(required=False, default=dict,
label=_("Model parameter settings"))
first_frame_url = serializers.ListField(required=True, label=_("First frame url"))
last_frame_url = serializers.ListField(required=False, label=_("Last frame url"))
class IImageToVideoNode(INode):
type = 'image-to-video-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE,
WorkflowMode.KNOWLEDGE_LOOP]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return ImageToVideoNodeSerializer
def _run(self):
first_frame_url = self.workflow_manage.get_reference_field(
self.node_params_serializer.data.get('first_frame_url')[0],
self.node_params_serializer.data.get('first_frame_url')[1:])
if first_frame_url is []:
raise ValueError(
_("First frame url cannot be empty"))
last_frame_url = None
if self.node_params_serializer.data.get('last_frame_url') is not None and self.node_params_serializer.data.get(
'last_frame_url') != []:
last_frame_url = self.workflow_manage.get_reference_field(
self.node_params_serializer.data.get('last_frame_url')[0],
self.node_params_serializer.data.get('last_frame_url')[1:])
node_params_data = {k: v for k, v in self.node_params_serializer.data.items()
if k not in ['first_frame_url', 'last_frame_url']}
if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.execute(first_frame_url=first_frame_url, last_frame_url=last_frame_url, **node_params_data, **self.flow_params_serializer.data,
**{'history_chat_record': [], 'stream': True, 'chat_id': None, 'chat_record_id': None})
else:
return self.execute(first_frame_url=first_frame_url, last_frame_url=last_frame_url,
**node_params_data, **self.flow_params_serializer.data)
def execute(self, model_id, prompt, negative_prompt, dialogue_number, dialogue_type, history_chat_record,
model_params_setting,
chat_record_id,
first_frame_url, last_frame_url,
**kwargs) -> NodeResult:
pass

View File

@ -0,0 +1,3 @@
# coding=utf-8
from .base_image_to_video_node import BaseImageToVideoNode

View File

@ -0,0 +1,184 @@
# coding=utf-8
import base64
from functools import reduce
from typing import List
import requests
from django.db.models import QuerySet
from langchain_core.messages import BaseMessage, HumanMessage, AIMessage
from application.flow.common import WorkflowMode
from application.flow.i_step_node import NodeResult
from application.flow.step_node.image_to_video_step_node.i_image_to_video_node import IImageToVideoNode
from common.utils.common import bytes_to_uploaded_file
from knowledge.models import FileSourceType, File
from oss.serializers.file import FileSerializer, mime_types
from models_provider.tools import get_model_instance_by_model_workspace_id
from django.utils.translation import gettext
class BaseImageToVideoNode(IImageToVideoNode):
def save_context(self, details, workflow_manage):
self.context['answer'] = details.get('answer')
self.context['question'] = details.get('question')
if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def execute(self, model_id, prompt, negative_prompt, dialogue_number, dialogue_type, history_chat_record,
model_params_setting,
chat_record_id,
first_frame_url, last_frame_url=None,
**kwargs) -> NodeResult:
workspace_id = self.workflow_manage.get_body().get('workspace_id')
ttv_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting)
history_message = self.get_history_message(history_chat_record, dialogue_number)
self.context['history_message'] = history_message
question = self.generate_prompt_question(prompt)
self.context['question'] = question
message_list = self.generate_message_list(question, history_message)
self.context['message_list'] = message_list
self.context['dialogue_type'] = dialogue_type
self.context['negative_prompt'] = self.generate_prompt_question(negative_prompt)
self.context['first_frame_url'] = first_frame_url
self.context['last_frame_url'] = last_frame_url
# 处理首尾帧图片 这块可以是url 也可以是file_id 如果是url 可以直接传递给模型 如果是file_id 需要传base64
# 判断是不是 url
first_frame_url = self.get_file_base64(first_frame_url)
last_frame_url = self.get_file_base64(last_frame_url)
video_urls = ttv_model.generate_video(question, negative_prompt, first_frame_url, last_frame_url)
# 保存图片
if video_urls is None or video_urls == '':
return NodeResult({'answer': gettext('Failed to generate video')}, {})
file_name = 'generated_video.mp4'
if isinstance(video_urls, str) and video_urls.startswith('http'):
video_urls = requests.get(video_urls).content
file = bytes_to_uploaded_file(video_urls, file_name)
file_url = self.upload_file(file)
video_label = f'<video src="{file_url}" controls style="max-width: 100%; width: 100%; height: auto; max-height: 60vh;"></video>'
video_list = [{'file_id': file_url.split('/')[-1], 'file_name': file_name, 'url': file_url}]
return NodeResult({'answer': video_label, 'chat_model': ttv_model, 'message_list': message_list,
'video': video_list,
'history_message': history_message, 'question': question}, {})
def get_file_base64(self, image_url):
try:
if isinstance(image_url, list):
image_url = image_url[0].get('file_id') if 'file_id' in image_url[0] else image_url[0].get('url')
if isinstance(image_url, str) and not image_url.startswith('http'):
file = QuerySet(File).filter(id=image_url).first()
file_bytes = file.get_bytes()
# 如果我不知道content_type 可以用 magic 库去检测
file_type = file.file_name.split(".")[-1].lower()
content_type = mime_types.get(file_type, 'application/octet-stream')
encoded_bytes = base64.b64encode(file_bytes)
return f'data:{content_type};base64,{encoded_bytes.decode()}'
return image_url
except Exception as e:
raise ValueError(
gettext("Failed to obtain the image"))
def upload_file(self, file):
if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.upload_knowledge_file(file)
return self.upload_application_file(file)
def upload_knowledge_file(self, file):
knowledge_id = self.workflow_params.get('knowledge_id')
meta = {
'debug': False,
'knowledge_id': knowledge_id
}
file_url = FileSerializer(data={
'file': file,
'meta': meta,
'source_id': knowledge_id,
'source_type': FileSourceType.KNOWLEDGE.value
}).upload()
return file_url
def upload_application_file(self, file):
application = self.workflow_manage.work_flow_post_handler.chat_info.application
chat_id = self.workflow_params.get('chat_id')
meta = {
'debug': False if application.id else True,
'chat_id': chat_id,
'application_id': str(application.id) if application.id else None,
}
file_url = FileSerializer(data={
'file': file,
'meta': meta,
'source_id': meta['application_id'],
'source_type': FileSourceType.APPLICATION.value
}).upload()
return file_url
def generate_history_ai_message(self, chat_record):
for val in chat_record.details.values():
if self.node.id == val['node_id'] and 'image_list' in val:
if val['dialogue_type'] == 'WORKFLOW':
return chat_record.get_ai_message()
image_list = val['image_list']
return AIMessage(content=[
*[{'type': 'image_url', 'image_url': {'url': f'{file_url}'}} for file_url in image_list]
])
return chat_record.get_ai_message()
def get_history_message(self, history_chat_record, dialogue_number):
start_index = len(history_chat_record) - dialogue_number
history_message = reduce(lambda x, y: [*x, *y], [
[self.generate_history_human_message(history_chat_record[index]),
self.generate_history_ai_message(history_chat_record[index])]
for index in
range(start_index if start_index > 0 else 0, len(history_chat_record))], [])
return history_message
def generate_history_human_message(self, chat_record):
for data in chat_record.details.values():
if self.node.id == data['node_id'] and 'image_list' in data:
image_list = data['image_list']
if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW':
return HumanMessage(content=chat_record.problem_text)
return HumanMessage(content=data['question'])
return HumanMessage(content=chat_record.problem_text)
def generate_prompt_question(self, prompt):
return self.workflow_manage.generate_prompt(prompt)
def generate_message_list(self, question: str, history_message):
return [
*history_message,
question
]
@staticmethod
def reset_message_list(message_list: List[BaseMessage], answer_text):
result = [{'role': 'user' if isinstance(message, HumanMessage) else 'ai', 'content': message.content} for
message
in
message_list]
result.append({'role': 'ai', 'content': answer_text})
return result
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'history_message': [{'content': message.content, 'role': message.type} for message in
(self.context.get('history_message') if self.context.get(
'history_message') is not None else [])],
'question': self.context.get('question'),
'answer': self.context.get('answer'),
'type': self.node.type,
'message_tokens': self.context.get('message_tokens'),
'answer_tokens': self.context.get('answer_tokens'),
'status': self.status,
'err_message': self.err_message,
'first_frame_url': self.context.get('first_frame_url'),
'last_frame_url': self.context.get('last_frame_url'),
'dialogue_type': self.context.get('dialogue_type'),
'negative_prompt': self.context.get('negative_prompt'),
}

View File

@ -4,31 +4,35 @@ from typing import Type
from rest_framework import serializers from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
class ImageUnderstandNodeSerializer(serializers.Serializer): class ImageUnderstandNodeSerializer(serializers.Serializer):
model_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Model id"))) model_id = serializers.CharField(required=True, label=_("Model id"))
system = serializers.CharField(required=False, allow_blank=True, allow_null=True, system = serializers.CharField(required=False, allow_blank=True, allow_null=True,
error_messages=ErrMessage.char(_("Role Setting"))) label=_("Role Setting"))
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word"))) prompt = serializers.CharField(required=True, label=_("Prompt word"))
# 多轮对话数量 # 多轮对话数量
dialogue_number = serializers.IntegerField(required=True, error_messages=ErrMessage.integer(_("Number of multi-round conversations"))) dialogue_number = serializers.IntegerField(required=True, label=_("Number of multi-round conversations"))
dialogue_type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Conversation storage type"))) dialogue_type = serializers.CharField(required=True, label=_("Conversation storage type"))
is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean(_('Whether to return content'))) is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
image_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("picture"))) image_list = serializers.ListField(required=False, label=_("picture"))
model_params_setting = serializers.JSONField(required=False, default=dict, model_params_setting = serializers.JSONField(required=False, default=dict,
error_messages=ErrMessage.json(_("Model parameter settings"))) label=_("Model parameter settings"))
class IImageUnderstandNode(INode): class IImageUnderstandNode(INode):
type = 'image-understand-node' type = 'image-understand-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE,
WorkflowMode.KNOWLEDGE_LOOP]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]: def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return ImageUnderstandNodeSerializer return ImageUnderstandNodeSerializer
@ -36,9 +40,14 @@ class IImageUnderstandNode(INode):
def _run(self): def _run(self):
res = self.workflow_manage.get_reference_field(self.node_params_serializer.data.get('image_list')[0], res = self.workflow_manage.get_reference_field(self.node_params_serializer.data.get('image_list')[0],
self.node_params_serializer.data.get('image_list')[1:]) self.node_params_serializer.data.get('image_list')[1:])
return self.execute(image=res, **self.node_params_serializer.data, **self.flow_params_serializer.data) if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.execute(image=res, **self.node_params_serializer.data, **self.flow_params_serializer.data,
**{'history_chat_record': [], 'stream': True, 'chat_record_id': None})
else:
return self.execute(image=res, **self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream, chat_id, def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream,
model_params_setting, model_params_setting,
chat_record_id, chat_record_id,
image, image,

View File

@ -1,8 +1,8 @@
# coding=utf-8 # coding=utf-8
import base64 import base64
import os
import time import time
from functools import reduce from functools import reduce
from imghdr import what
from typing import List, Dict from typing import List, Dict
from django.db.models import QuerySet from django.db.models import QuerySet
@ -10,9 +10,8 @@ from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage, AI
from application.flow.i_step_node import NodeResult, INode from application.flow.i_step_node import NodeResult, INode
from application.flow.step_node.image_understand_step_node.i_image_understand_node import IImageUnderstandNode from application.flow.step_node.image_understand_step_node.i_image_understand_node import IImageUnderstandNode
from dataset.models import File from knowledge.models import File
from setting.models_provider.tools import get_model_instance_by_model_user_id from models_provider.tools import get_model_instance_by_model_workspace_id
from imghdr import what
def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str): def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str):
@ -60,27 +59,27 @@ def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wor
def file_id_to_base64(file_id: str): def file_id_to_base64(file_id: str):
file = QuerySet(File).filter(id=file_id).first() file = QuerySet(File).filter(id=file_id).first()
file_bytes = file.get_byte() file_bytes = file.get_bytes()
base64_image = base64.b64encode(file_bytes).decode("utf-8") base64_image = base64.b64encode(file_bytes).decode("utf-8")
return [base64_image, what(None, file_bytes.tobytes())] return [base64_image, what(None, file_bytes)]
class BaseImageUnderstandNode(IImageUnderstandNode): class BaseImageUnderstandNode(IImageUnderstandNode):
def save_context(self, details, workflow_manage): def save_context(self, details, workflow_manage):
self.context['answer'] = details.get('answer') self.context['answer'] = details.get('answer')
self.context['question'] = details.get('question') self.context['question'] = details.get('question')
self.answer_text = details.get('answer') if self.node_params.get('is_result', False):
self.answer_text = details.get('answer')
def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream, chat_id, def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream,
model_params_setting, model_params_setting,
chat_record_id, chat_record_id,
image, image,
**kwargs) -> NodeResult: **kwargs) -> NodeResult:
# 处理不正确的参数 # 处理不正确的参数
if image is None or not isinstance(image, list): workspace_id = self.workflow_manage.get_body().get('workspace_id')
image = [] image_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
print(model_params_setting) **model_params_setting)
image_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'), **model_params_setting)
# 执行详情中的历史消息不需要图片内容 # 执行详情中的历史消息不需要图片内容
history_message = self.get_history_message_for_details(history_chat_record, dialogue_number) history_message = self.get_history_message_for_details(history_chat_record, dialogue_number)
self.context['history_message'] = history_message self.context['history_message'] = history_message
@ -90,7 +89,7 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
message_list = self.generate_message_list(image_model, system, prompt, message_list = self.generate_message_list(image_model, system, prompt,
self.get_history_message(history_chat_record, dialogue_number), image) self.get_history_message(history_chat_record, dialogue_number), image)
self.context['message_list'] = message_list self.context['message_list'] = message_list
self.context['image_list'] = image self.generate_context_image(image)
self.context['dialogue_type'] = dialogue_type self.context['dialogue_type'] = dialogue_type
if stream: if stream:
r = image_model.stream(message_list) r = image_model.stream(message_list)
@ -103,6 +102,12 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
'history_message': history_message, 'question': question.content}, {}, 'history_message': history_message, 'question': question.content}, {},
_write_context=write_context) _write_context=write_context)
def generate_context_image(self, image):
if isinstance(image, str) and image.startswith('http'):
self.context['image_list'] = [{'url': image}]
elif image is not None and len(image) > 0:
self.context['image_list'] = image
def get_history_message_for_details(self, history_chat_record, dialogue_number): def get_history_message_for_details(self, history_chat_record, dialogue_number):
start_index = len(history_chat_record) - dialogue_number start_index = len(history_chat_record) - dialogue_number
history_message = reduce(lambda x, y: [*x, *y], [ history_message = reduce(lambda x, y: [*x, *y], [
@ -126,11 +131,18 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
image_list = data['image_list'] image_list = data['image_list']
if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW': if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW':
return HumanMessage(content=chat_record.problem_text) return HumanMessage(content=chat_record.problem_text)
file_id_list = [image.get('file_id') for image in image_list]
file_id_list = []
url_list = []
for image in image_list:
if 'file_id' in image:
file_id_list.append(image.get('file_id'))
elif 'url' in image:
url_list.append(image.get('url'))
return HumanMessage(content=[ return HumanMessage(content=[
{'type': 'text', 'text': data['question']}, {'type': 'text', 'text': data['question']},
*[{'type': 'image_url', 'image_url': {'url': f'/api/file/{file_id}'}} for file_id in file_id_list] *[{'type': 'image_url', 'image_url': {'url': f'./oss/file/{file_id}'}} for file_id in file_id_list],
*[{'type': 'image_url', 'image_url': {'url': url}} for url in url_list]
]) ])
return HumanMessage(content=chat_record.problem_text) return HumanMessage(content=chat_record.problem_text)
@ -150,36 +162,58 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
image_list = data['image_list'] image_list = data['image_list']
if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW': if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW':
return HumanMessage(content=chat_record.problem_text) return HumanMessage(content=chat_record.problem_text)
image_base64_list = [file_id_to_base64(image.get('file_id')) for image in image_list] file_id_list = []
url_list = []
for image in image_list:
if 'file_id' in image:
file_id_list.append(image.get('file_id'))
elif 'url' in image:
url_list.append(image.get('url'))
image_base64_list = [file_id_to_base64(file_id) for file_id in file_id_list]
return HumanMessage( return HumanMessage(
content=[ content=[
{'type': 'text', 'text': data['question']}, {'type': 'text', 'text': data['question']},
*[{'type': 'image_url', 'image_url': {'url': f'data:image/{base64_image[1]};base64,{base64_image[0]}'}} for *[{'type': 'image_url',
base64_image in image_base64_list] 'image_url': {'url': f'data:image/{base64_image[1]};base64,{base64_image[0]}'}} for
base64_image in image_base64_list],
*[{'type': 'image_url', 'image_url': url} for url in url_list]
]) ])
return HumanMessage(content=chat_record.problem_text) return HumanMessage(content=chat_record.problem_text)
def generate_prompt_question(self, prompt): def generate_prompt_question(self, prompt):
return HumanMessage(self.workflow_manage.generate_prompt(prompt)) return HumanMessage(self.workflow_manage.generate_prompt(prompt))
def generate_message_list(self, image_model, system: str, prompt: str, history_message, image): def _process_images(self, image):
if image is not None and len(image) > 0: """
# 处理多张图片 处理图像数据转换为模型可识别的格式
images = [] """
images = []
if isinstance(image, str) and image.startswith('http'):
images.append({'type': 'image_url', 'image_url': {'url': image}})
elif image is not None and len(image) > 0:
for img in image: for img in image:
file_id = img['file_id'] if 'file_id' in img:
file = QuerySet(File).filter(id=file_id).first() file_id = img['file_id']
image_bytes = file.get_byte() file = QuerySet(File).filter(id=file_id).first()
base64_image = base64.b64encode(image_bytes).decode("utf-8") image_bytes = file.get_bytes()
image_format = what(None, image_bytes.tobytes()) base64_image = base64.b64encode(image_bytes).decode("utf-8")
images.append({'type': 'image_url', 'image_url': {'url': f'data:image/{image_format};base64,{base64_image}'}}) image_format = what(None, image_bytes)
messages = [HumanMessage( images.append(
content=[ {'type': 'image_url', 'image_url': {'url': f'data:image/{image_format};base64,{base64_image}'}})
{'type': 'text', 'text': self.workflow_manage.generate_prompt(prompt)}, elif 'url' in img and img['url'].startswith('http'):
*images images.append(
])] {'type': 'image_url', 'image_url': {'url': img["url"]}})
return images
def generate_message_list(self, image_model, system: str, prompt: str, history_message, image):
prompt_text = self.workflow_manage.generate_prompt(prompt)
images = self._process_images(image)
if images:
messages = [HumanMessage(content=[{'type': 'text', 'text': prompt_text}, *images])]
else: else:
messages = [HumanMessage(self.workflow_manage.generate_prompt(prompt))] messages = [HumanMessage(prompt_text)]
if system is not None and len(system) > 0: if system is not None and len(system) > 0:
return [ return [

View File

@ -0,0 +1,6 @@
# coding=utf-8
from .impl import *

View File

@ -0,0 +1,55 @@
# coding=utf-8
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult
class IntentBranchSerializer(serializers.Serializer):
id = serializers.CharField(required=True, label=_("Branch id"))
content = serializers.CharField(required=True, label=_("content"))
isOther = serializers.BooleanField(required=True, label=_("Branch Type"))
class IntentNodeSerializer(serializers.Serializer):
model_id = serializers.CharField(required=True, label=_("Model id"))
content_list = serializers.ListField(required=True, label=_("Text content"))
dialogue_number = serializers.IntegerField(required=True, label=
_("Number of multi-round conversations"))
model_params_setting = serializers.DictField(required=False,
label=_("Model parameter settings"))
branch = IntentBranchSerializer(many=True)
class IIntentNode(INode):
type = 'intent-node'
support = [WorkflowMode.APPLICATION, WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE,
WorkflowMode.KNOWLEDGE_LOOP]
def save_context(self, details, workflow_manage):
pass
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return IntentNodeSerializer
def _run(self):
question = self.workflow_manage.get_reference_field(
self.node_params_serializer.data.get('content_list')[0],
self.node_params_serializer.data.get('content_list')[1:],
)
if [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP].__contains__(
self.workflow_manage.flow.workflow_mode):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data,
**{'history_chat_record': [], 'stream': True, 'chat_id': None, 'chat_record_id': None,
'user_input': str(question)})
else:
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data,
user_input=str(question))
def execute(self, model_id, dialogue_number, history_chat_record, user_input, branch,
model_params_setting=None, **kwargs) -> NodeResult:
pass

View File

@ -0,0 +1,3 @@
from .base_intent_node import BaseIntentNode

View File

@ -0,0 +1,261 @@
# coding=utf-8
import json
import re
import time
from typing import List, Dict, Any
from functools import reduce
from django.db.models import QuerySet
from langchain.schema import HumanMessage, SystemMessage
from application.flow.i_step_node import INode, NodeResult
from application.flow.step_node.intent_node.i_intent_node import IIntentNode
from models_provider.models import Model
from models_provider.tools import get_model_instance_by_model_workspace_id, get_model_credential
from .prompt_template import PROMPT_TEMPLATE
def get_default_model_params_setting(model_id):
model = QuerySet(Model).filter(id=model_id).first()
credential = get_model_credential(model.provider, model.model_type, model.model_name)
model_params_setting = credential.get_model_params_setting_form(
model.model_name).get_default_form_data()
return model_params_setting
def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str):
chat_model = node_variable.get('chat_model')
message_tokens = chat_model.get_num_tokens_from_messages(node_variable.get('message_list'))
answer_tokens = chat_model.get_num_tokens(answer)
node.context['message_tokens'] = message_tokens
node.context['answer_tokens'] = answer_tokens
node.context['answer'] = answer
node.context['history_message'] = node_variable['history_message']
node.context['user_input'] = node_variable['user_input']
node.context['branch_id'] = node_variable.get('branch_id')
node.context['reason'] = node_variable.get('reason')
node.context['category'] = node_variable.get('category')
node.context['run_time'] = time.time() - node.context['start_time']
def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow):
response = node_variable.get('result')
answer = response.content
_write_context(node_variable, workflow_variable, node, workflow, answer)
class BaseIntentNode(IIntentNode):
def save_context(self, details, workflow_manage):
self.context['branch_id'] = details.get('branch_id')
self.context['category'] = details.get('category')
def execute(self, model_id, dialogue_number, history_chat_record, user_input, branch,
model_params_setting=None, **kwargs) -> NodeResult:
# 设置默认模型参数
if model_params_setting is None:
model_params_setting = get_default_model_params_setting(model_id)
# 获取模型实例
workspace_id = self.workflow_manage.get_body().get('workspace_id')
chat_model = get_model_instance_by_model_workspace_id(
model_id, workspace_id, **model_params_setting
)
# 获取历史对话
history_message = self.get_history_message(history_chat_record, dialogue_number)
self.context['history_message'] = history_message
# 保存问题到上下文
self.context['user_input'] = user_input
# 构建分类提示词
prompt = self.build_classification_prompt(user_input, branch)
# 生成消息列表
system = self.build_system_prompt()
message_list = self.generate_message_list(system, prompt, history_message)
self.context['message_list'] = message_list
# 调用模型进行分类
try:
r = chat_model.invoke(message_list)
classification_result = r.content.strip()
# 解析分类结果获取分支信息
matched_branch = self.parse_classification_result(classification_result, branch)
# 返回结果
return NodeResult({
'result': r,
'chat_model': chat_model,
'message_list': message_list,
'history_message': history_message,
'user_input': user_input,
'branch_id': matched_branch['id'],
'reason': self.parse_result_reason(r.content),
'category': matched_branch.get('content', matched_branch['id'])
}, {}, _write_context=write_context)
except Exception as e:
# 错误处理:返回"其他"分支
other_branch = self.find_other_branch(branch)
if other_branch:
return NodeResult({
'branch_id': other_branch['id'],
'category': other_branch.get('content', other_branch['id']),
'error': str(e)
}, {})
else:
raise Exception(f"error: {str(e)}")
@staticmethod
def get_history_message(history_chat_record, dialogue_number):
"""获取历史消息"""
start_index = len(history_chat_record) - dialogue_number
history_message = reduce(lambda x, y: [*x, *y], [
[history_chat_record[index].get_human_message(), history_chat_record[index].get_ai_message()]
for index in
range(start_index if start_index > 0 else 0, len(history_chat_record))], [])
for message in history_message:
if isinstance(message.content, str):
message.content = re.sub('<form_rander>[\d\D]*?<\/form_rander>', '', message.content)
return history_message
def build_system_prompt(self) -> str:
"""构建系统提示词"""
return "你是一个专业的意图识别助手,请根据用户输入和意图选项,准确识别用户的真实意图。"
def build_classification_prompt(self, user_input: str, branch: List[Dict]) -> str:
"""构建分类提示词"""
classification_list = []
other_branch = self.find_other_branch(branch)
# 添加其他分支
if other_branch:
classification_list.append({
"classificationId": 0,
"content": other_branch.get('content')
})
# 添加正常分支
classification_id = 1
for b in branch:
if not b.get('isOther'):
classification_list.append({
"classificationId": classification_id,
"content": b['content']
})
classification_id += 1
return PROMPT_TEMPLATE.format(
classification_list=classification_list,
user_input=user_input
)
def generate_message_list(self, system: str, prompt: str, history_message):
"""生成消息列表"""
if system is None or len(system) == 0:
return [*history_message, HumanMessage(self.workflow_manage.generate_prompt(prompt))]
else:
return [SystemMessage(self.workflow_manage.generate_prompt(system)), *history_message,
HumanMessage(self.workflow_manage.generate_prompt(prompt))]
def parse_classification_result(self, result: str, branch: List[Dict]) -> Dict[str, Any]:
"""解析分类结果"""
other_branch = self.find_other_branch(branch)
normal_intents = [
b
for b in branch
if not b.get('isOther')
]
def get_branch_by_id(category_id: int):
if category_id == 0:
return other_branch
elif 1 <= category_id <= len(normal_intents):
return normal_intents[category_id - 1]
return None
try:
result_json = json.loads(result)
classification_id = result_json.get('classificationId')
# 如果是 0 ,返回其他分支
matched_branch = get_branch_by_id(classification_id)
if matched_branch:
return matched_branch
except Exception as e:
# json 解析失败re 提取
numbers = re.findall(r'"classificationId":\s*(\d+)', result)
if numbers:
classification_id = int(numbers[0])
matched_branch = get_branch_by_id(classification_id)
if matched_branch:
return matched_branch
# 如果都解析失败返回“other”
return other_branch or (normal_intents[0] if normal_intents else {'id': 'unknown', 'content': 'unknown'})
def parse_result_reason(self, result: str):
"""解析分类的原因"""
try:
result_json = json.loads(result)
return result_json.get('reason', '')
except Exception as e:
reason_patterns = [
r'"reason":\s*"([^"]*)"', # 标准格式
r'"reason":\s*"([^"]*)', # 缺少结束引号
r'"reason":\s*([^,}\n]*)', # 没有引号包围的内容
]
for pattern in reason_patterns:
match = re.search(pattern, result, re.DOTALL)
if match:
reason = match.group(1).strip()
# 清理可能的尾部字符
reason = re.sub(r'["\s]*$', '', reason)
return reason
return ''
def find_other_branch(self, branch: List[Dict]) -> Dict[str, Any] | None:
"""查找其他分支"""
for b in branch:
if b.get('isOther'):
return b
return None
def get_details(self, index: int, **kwargs):
"""获取节点执行详情"""
return {
'name': self.node.properties.get('stepName'),
'index': index,
'run_time': self.context.get('run_time'),
'system': self.context.get('system'),
'history_message': [
{'content': message.content, 'role': message.type}
for message in (self.context.get('history_message') or [])
],
'user_input': self.context.get('user_input'),
'answer': self.context.get('answer'),
'branch_id': self.context.get('branch_id'),
'category': self.context.get('category'),
'type': self.node.type,
'message_tokens': self.context.get('message_tokens'),
'answer_tokens': self.context.get('answer_tokens'),
'status': self.status,
'err_message': self.err_message
}

View File

@ -0,0 +1,32 @@
PROMPT_TEMPLATE = """
# Role
You are an intention classification expert, good at being able to judge which classification the user's input belongs to.
## Skills
Skill 1: Clearly determine which of the following intention classifications the user's input belongs to.
Intention classification list:
{classification_list}
Note:
- Please determine the match only between the user's input content and the Intention classification list content, without judging or categorizing the match with the classification ID.
- **When classifying, you must give higher weight to the context and intent continuity shown in the historical conversation. Do not rely solely on the literal meaning of the current input; instead, prioritize the most consistent classification with the previous dialogue flow.**
## User Input
{user_input}
## Reply requirements
- The answer must be returned in JSON format.
- Strictly ensure that the output is in a valid JSON format.
- Do not add prefix ```json or suffix ```
- The answer needs to include the following fields such as:
{{
"classificationId": 0,
"reason": ""
}}
## Limit
- Please do not reply in text."""

View File

@ -0,0 +1,8 @@
# coding=utf-8
"""
@project: MaxKB
@Authorniu
@file __init__.py.py
@date2025/11/13 11:17
@desc:
"""

View File

@ -0,0 +1,43 @@
# coding=utf-8
"""
@project: MaxKB
@Authorniu
@file i_knowledge_write_node.py
@date2025/11/13 11:19
@desc:
"""
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode, NodeResult
class KnowledgeWriteNodeParamSerializer(serializers.Serializer):
document_list = serializers.ListField(required=True, child=serializers.CharField(required=True), allow_null=True,
label=_('document list'))
class IKnowledgeWriteNode(INode):
def save_context(self, details, workflow_manage):
pass
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return KnowledgeWriteNodeParamSerializer
def _run(self):
documents = self.workflow_manage.get_reference_field(
self.node_params_serializer.data.get('document_list')[0],
self.node_params_serializer.data.get('document_list')[1:],
)
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data, documents=documents)
def execute(self, documents, **kwargs) -> NodeResult:
pass
type = 'knowledge-write-node'
support = [WorkflowMode.KNOWLEDGE, WorkflowMode.KNOWLEDGE_LOOP]

View File

@ -1,8 +1,8 @@
# coding=utf-8 # coding=utf-8
""" """
@project: MaxKB @project: MaxKB
@Author @Authorniu
@file __init__.py.py @file __init__.py.py
@date2024/8/2 14:55 @date2025/11/13 11:18
@desc: @desc:
""" """

View File

@ -0,0 +1,329 @@
# coding=utf-8
"""
@project: MaxKB
@Authorniu
@file base_knowledge_write_node.py
@date2025/11/13 11:19
@desc:
"""
from functools import reduce
from typing import Dict, List, Any
import uuid_utils.compat as uuid
from django.db.models import QuerySet
from django.db.models.aggregates import Max
from rest_framework import serializers
from django.utils.translation import gettext_lazy as _
from application.flow.i_step_node import NodeResult
from application.flow.step_node.knowledge_write_node.i_knowledge_write_node import IKnowledgeWriteNode
from common.chunk import text_to_chunk
from common.utils.common import bulk_create_in_batches, filter_special_character
from knowledge.models import Document, KnowledgeType, Paragraph, File, FileSourceType, Problem, ProblemParagraphMapping, \
Tag, DocumentTag
from knowledge.serializers.common import ProblemParagraphObject, ProblemParagraphManage
from knowledge.serializers.document import DocumentSerializers
class ParagraphInstanceSerializer(serializers.Serializer):
content = serializers.CharField(required=True, label=_('content'), max_length=102400, min_length=1, allow_null=True,
allow_blank=True)
title = serializers.CharField(required=False, max_length=256, label=_('section title'), allow_null=True,
allow_blank=True)
problem_list = serializers.ListField(required=False, child=serializers.CharField(required=False, allow_blank=True))
is_active = serializers.BooleanField(required=False, label=_('Is active'))
chunks = serializers.ListField(required=False, child=serializers.CharField(required=True))
class TagInstanceSerializer(serializers.Serializer):
key = serializers.CharField(required=True, max_length=64, label=_('Tag Key'))
value = serializers.CharField(required=True, max_length=128, label=_('Tag Value'))
class KnowledgeWriteParamSerializer(serializers.Serializer):
name = serializers.CharField(required=True, label=_('document name'), max_length=128, min_length=1,
source=_('document name'))
meta = serializers.DictField(required=False)
tags = serializers.ListField(required=False, label=_('Tags'), child=TagInstanceSerializer())
paragraphs = ParagraphInstanceSerializer(required=False, many=True, allow_null=True)
source_file_id = serializers.UUIDField(required=False, allow_null=True)
def convert_uuid_to_str(obj):
if isinstance(obj, dict):
return {k: convert_uuid_to_str(v) for k, v in obj.items()}
elif isinstance(obj, list):
return [convert_uuid_to_str(i) for i in obj]
elif isinstance(obj, uuid.UUID):
return str(obj)
else:
return obj
def link_file(source_file_id, document_id):
if source_file_id is None:
return
source_file = QuerySet(File).filter(id=source_file_id).first()
if source_file:
file_content = source_file.get_bytes()
new_file = File(
id=uuid.uuid7(),
file_name=source_file.file_name,
file_size=source_file.file_size,
source_type=FileSourceType.DOCUMENT,
source_id=document_id, # 更新为当前知识库ID
meta=source_file.meta.copy() if source_file.meta else {}
)
# 保存文件内容和元数据
new_file.save(file_content)
def get_paragraph_problem_model(knowledge_id: str, document_id: str, instance: Dict):
paragraph = Paragraph(
id=uuid.uuid7(),
document_id=document_id,
content=filter_special_character(instance.get("content")),
knowledge_id=knowledge_id,
title=instance.get("title") if 'title' in instance else '',
chunks=[filter_special_character(c) for c in (instance.get('chunks') if 'chunks' in instance else text_to_chunk(
instance.get("content")))],
)
problem_paragraph_object_list = [ProblemParagraphObject(
knowledge_id, document_id, str(paragraph.id), problem
) for problem in (instance.get('problem_list') if 'problem_list' in instance else [])]
return {
'paragraph': paragraph,
'problem_paragraph_object_list': problem_paragraph_object_list,
}
def get_paragraph_model(document_model, paragraph_list: List):
knowledge_id = document_model.knowledge_id
paragraph_model_dict_list = [
get_paragraph_problem_model(knowledge_id, document_model.id, paragraph)
for paragraph in paragraph_list
]
paragraph_model_list = []
problem_paragraph_object_list = []
for paragraphs in paragraph_model_dict_list:
paragraph = paragraphs.get('paragraph')
for problem_model in paragraphs.get('problem_paragraph_object_list'):
problem_paragraph_object_list.append(problem_model)
paragraph_model_list.append(paragraph)
return {
'document': document_model,
'paragraph_model_list': paragraph_model_list,
'problem_paragraph_object_list': problem_paragraph_object_list,
}
def get_document_paragraph_model(knowledge_id: str, instance: Dict):
source_meta = {'source_file_id': instance.get("source_file_id")} if instance.get("source_file_id") else {}
meta = {**instance.get('meta'), **source_meta} if instance.get('meta') is not None else source_meta
meta = {**convert_uuid_to_str(meta), 'allow_download': True}
document_model = Document(
**{
'knowledge_id': knowledge_id,
'id': uuid.uuid7(),
'name': instance.get('name'),
'char_length': reduce(
lambda x, y: x + y,
[len(p.get('content')) for p in instance.get('paragraphs', [])],
0),
'meta': meta,
'type': instance.get('type') if instance.get('type') is not None else KnowledgeType.WORKFLOW
}
)
return get_paragraph_model(
document_model,
instance.get('paragraphs') if 'paragraphs' in instance else []
)
def save_knowledge_tags(knowledge_id: str, tags: List[Dict[str, Any]]):
existed_tags_dict = {
(key, value): str(tag_id)
for key, value, tag_id in QuerySet(Tag).filter(knowledge_id=knowledge_id).values_list("key", "value", "id")
}
tag_model_list = []
new_tag_dict = {}
for tag in tags:
key = tag.get("key")
value = tag.get("value")
if (key, value) not in existed_tags_dict:
tag_model = Tag(
id=uuid.uuid7(),
knowledge_id=knowledge_id,
key=key,
value=value
)
tag_model_list.append(tag_model)
new_tag_dict[(key, value)] = str(tag_model.id)
if tag_model_list:
Tag.objects.bulk_create(tag_model_list)
all_tag_dict = {**existed_tags_dict, **new_tag_dict}
return all_tag_dict, new_tag_dict
def batch_add_document_tag(document_tag_map: Dict[str, List[str]]):
"""
批量添加文档-标签关联
document_tag_map: {document_id: [tag_id1, tag_id2, ...]}
"""
all_document_ids = list(document_tag_map.keys())
all_tag_ids = list(set(tag_id for tag_ids in document_tag_map.values() for tag_id in tag_ids))
# 查询已存在的文档-标签关联
existed_relations = set(
QuerySet(DocumentTag).filter(
document_id__in=all_document_ids,
tag_id__in=all_tag_ids
).values_list('document_id', 'tag_id')
)
new_relations = [
DocumentTag(
id=uuid.uuid7(),
document_id=doc_id,
tag_id=tag_id,
)
for doc_id, tag_ids in document_tag_map.items()
for tag_id in tag_ids
if (doc_id, tag_id) not in existed_relations
]
if new_relations:
QuerySet(DocumentTag).bulk_create(new_relations)
class BaseKnowledgeWriteNode(IKnowledgeWriteNode):
def save_context(self, details, workflow_manage):
pass
def save(self, document_list):
serializer = KnowledgeWriteParamSerializer(data=document_list, many=True)
serializer.is_valid(raise_exception=True)
document_list = serializer.data
knowledge_id = self.workflow_params.get("knowledge_id")
workspace_id = self.workflow_params.get("workspace_id")
document_model_list = []
paragraph_model_list = []
problem_paragraph_object_list = []
# 所有标签
knowledge_tag_list = []
# 文档标签映射关系
document_tags_map = {}
knowledge_tag_dict = {}
for document in document_list:
document_paragraph_dict_model = get_document_paragraph_model(
knowledge_id,
document
)
document_instance = document_paragraph_dict_model.get('document')
link_file(document.get("source_file_id"), document_instance.id)
document_model_list.append(document_instance)
# 收集标签
single_document_tag_list = document.get("tags", [])
# 去重传入的标签
for tag in single_document_tag_list:
tag_key = (tag['key'], tag['value'])
if tag_key not in knowledge_tag_dict:
knowledge_tag_dict[tag_key] = tag
if single_document_tag_list:
document_tags_map[str(document_instance.id)] = single_document_tag_list
for paragraph in document_paragraph_dict_model.get("paragraph_model_list"):
paragraph_model_list.append(paragraph)
for problem_paragraph_object in document_paragraph_dict_model.get("problem_paragraph_object_list"):
problem_paragraph_object_list.append(problem_paragraph_object)
knowledge_tag_list = list(knowledge_tag_dict.values())
# 保存所有文档中含有的标签到知识库
if knowledge_tag_list:
all_tag_dict, new_tag_dict = save_knowledge_tags(knowledge_id, knowledge_tag_list)
# 构建文档-标签ID映射
document_tag_id_map = {}
# 为每个文档添加其对应的标签
for doc_id, doc_tags in document_tags_map.items():
doc_tag_ids = [
all_tag_dict[(tag.get("key"), tag.get("value"))]
for tag in doc_tags
if (tag.get("key"), tag.get("value")) in all_tag_dict
]
if doc_tag_ids:
document_tag_id_map[doc_id] = doc_tag_ids
if document_tag_id_map:
batch_add_document_tag(document_tag_id_map)
problem_model_list, problem_paragraph_mapping_list = (
ProblemParagraphManage(problem_paragraph_object_list, knowledge_id).to_problem_model_list()
)
QuerySet(Document).bulk_create(document_model_list) if len(document_model_list) > 0 else None
if len(paragraph_model_list) > 0:
for document in document_model_list:
max_position = Paragraph.objects.filter(document_id=document.id).aggregate(
max_position=Max('position')
)['max_position'] or 0
sub_list = [p for p in paragraph_model_list if p.document_id == document.id]
for i, paragraph in enumerate(sub_list):
paragraph.position = max_position + i + 1
QuerySet(Paragraph).bulk_create(sub_list if len(sub_list) > 0 else [])
bulk_create_in_batches(Problem, problem_model_list, batch_size=1000)
bulk_create_in_batches(ProblemParagraphMapping, problem_paragraph_mapping_list, batch_size=1000)
return document_model_list, knowledge_id, workspace_id
@staticmethod
def post_embedding(document_model_list, knowledge_id, workspace_id):
for document in document_model_list:
DocumentSerializers.Operate(data={
'knowledge_id': knowledge_id,
'document_id': document.id,
'workspace_id': workspace_id
}).refresh()
def execute(self, documents, **kwargs) -> NodeResult:
document_model_list, knowledge_id, workspace_id = self.save(documents)
self.post_embedding(document_model_list, knowledge_id, workspace_id)
write_content_list = [{
"name": document.get("name"),
"paragraphs": [{
"title": p.get("title"),
"content": p.get("content"),
} for p in document.get("paragraphs")[0:5]]
} for document in documents]
return NodeResult({'write_content': write_content_list}, {})
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
"index": index,
'run_time': self.context.get('run_time'),
'type': self.node.type,
'write_content': self.context.get("write_content"),
'status': self.status,
'err_message': self.err_message
}

View File

@ -0,0 +1,9 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file __init__.py.py
@date2025/9/15 12:08
@desc:
"""
from .impl import *

View File

@ -0,0 +1,41 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file i_loop_break_node.py
@date2025/9/15 12:14
@desc:
"""
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.common import WorkflowMode
from application.flow.i_step_node import INode
from application.flow.i_step_node import NodeResult
class ConditionSerializer(serializers.Serializer):
compare = serializers.CharField(required=True, label=_("Comparator"))
value = serializers.CharField(required=True, label=_("value"))
field = serializers.ListField(required=True, label=_("Fields"))
class LoopBreakNodeSerializer(serializers.Serializer):
condition = serializers.CharField(required=True, label=_("Condition or|and"))
condition_list = ConditionSerializer(many=True)
class ILoopBreakNode(INode):
type = 'loop-break-node'
support = [WorkflowMode.APPLICATION_LOOP, WorkflowMode.KNOWLEDGE_LOOP]
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return LoopBreakNodeSerializer
def _run(self):
return self.execute(**self.node_params_serializer.data)
def execute(self, condition, condition_list, **kwargs) -> NodeResult:
pass

View File

@ -0,0 +1,9 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file __init__.py.py
@date2025/9/15 12:16
@desc:
"""
from .base_loop_break_node import BaseLoopBreakNode

View File

@ -0,0 +1,59 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file base_loop_break_node.py
@date2025/9/15 12:17
@desc:
"""
import time
from typing import List, Dict
from application.flow.compare import compare_handle_list
from application.flow.i_step_node import NodeResult
from application.flow.step_node.loop_break_node.i_loop_break_node import ILoopBreakNode
def _write_context(step_variable: Dict, global_variable: Dict, node, workflow):
if step_variable.get("is_break"):
yield "BREAK"
node.context['run_time'] = time.time() - node.context['start_time']
class BaseLoopBreakNode(ILoopBreakNode):
def execute(self, condition, condition_list, **kwargs) -> NodeResult:
r = [self.assertion(row.get('field'), row.get('compare'), row.get('value')) for row in
condition_list]
is_break = all(r) if condition == 'and' else any(r)
if is_break:
self.node_params['is_result'] = True
self.context['is_break'] = is_break
return NodeResult({'is_break': is_break}, {},
_write_context=_write_context,
_is_interrupt=lambda n, v, w: is_break)
def assertion(self, field_list: List[str], compare: str, value):
try:
value = self.workflow_manage.generate_prompt(value)
except Exception as e:
pass
field_value = None
try:
field_value = self.workflow_manage.get_reference_field(field_list[0], field_list[1:])
except Exception as e:
pass
for compare_handler in compare_handle_list:
if compare_handler.support(field_list[0], field_list[1:], field_value, compare, value):
return compare_handler.compare(field_value, compare, value)
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
"index": index,
'is_break': self.context.get('is_break'),
'run_time': self.context.get('run_time'),
'type': self.node.type,
'status': self.status,
'err_message': self.err_message
}

View File

@ -0,0 +1,9 @@
# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file __init__.py.py
@date2025/9/15 12:08
@desc:
"""
from .impl import *

Some files were not shown because too many files have changed in this diff Show More