Compare commits

...

1557 Commits
main ... v2.0.0

Author SHA1 Message Date
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
1612 changed files with 96053 additions and 66660 deletions

View File

@ -1,2 +1,2 @@
.git*
.idea*
.idea*

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: "v2"

View File

@ -14,33 +14,19 @@ on:
- linux/amd64,linux/arm64
jobs:
build-and-push-python-pg-to-ghcr:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
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
uses: actions/checkout@v4
with:
ref: main
ref: ${{ github.ref_name }}
- name: Prepare
id: prepare
run: |
DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-python-pg
DOCKER_IMAGE=ghcr.io/1panel-dev/maxkb-base
DOCKER_PLATFORMS=${{ github.event.inputs.architecture }}
TAG_NAME=python3.11-pg15.8
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
TAG_NAME=python3.11-pg17.5
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::${TAG_NAME}
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --no-cache \
@ -51,8 +37,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
# Until https://github.com/tonistiigi/binfmt/issues/215
image: tonistiigi/binfmt:qemu-v7.0.0-28
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
@ -63,4 +48,4 @@ jobs:
password: ${{ secrets.GH_TOKEN }}
- name: Docker Buildx (build-and-push)
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:
dockerImageTag:
description: 'Docker Image Tag'
default: 'v1.0.1'
default: 'v2.0.2'
required: true
architecture:
description: 'Architecture'
@ -19,26 +19,12 @@ on:
jobs:
build-and-push-vector-model-to-ghcr:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
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
uses: actions/checkout@v4
with:
ref: main
ref: ${{ github.ref_name }}
- name: Prepare
id: prepare
run: |
@ -56,8 +42,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
# Until https://github.com/tonistiigi/binfmt/issues/215
image: tonistiigi/binfmt:qemu-v7.0.0-28
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry

View File

@ -1,13 +1,13 @@
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:
workflow_dispatch:
inputs:
dockerImageTag:
description: 'Image Tag'
default: 'v1.10.3-dev'
default: 'v2.0.0-dev'
required: true
dockerImageTagWithLatest:
description: '是否发布latest tag正式发版时选择测试版本切勿选择'
@ -36,11 +36,12 @@ on:
jobs:
build-and-push-to-fit2cloud-registry:
if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Check Disk Space
run: df -h
- name: Free Disk Space (Ubuntu)
if: ${{ contains(github.event.inputs.architecture, ',') }}
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
@ -48,14 +49,10 @@ jobs:
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
docker-images: false
swap-storage: false
- name: Check Disk Space
run: df -h
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- name: Checkout
uses: actions/checkout@v4
with:
@ -68,24 +65,19 @@ jobs:
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }}
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
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
fi
echo ::set-output name=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} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
# Until https://github.com/tonistiigi/binfmt/issues/215
image: tonistiigi/binfmt:qemu-v7.0.0-28
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
@ -100,15 +92,17 @@ jobs:
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
- name: Docker Buildx (build-and-push)
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
build-and-push-to-dockerhub:
if: ${{ contains(github.event.inputs.registry, 'dockerhub') }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Check Disk Space
run: df -h
- name: Free Disk Space (Ubuntu)
if: ${{ contains(github.event.inputs.architecture, ',') }}
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
@ -116,14 +110,10 @@ jobs:
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
docker-images: false
swap-storage: false
- name: Check Disk Space
run: df -h
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- name: Checkout
uses: actions/checkout@v4
with:
@ -136,24 +126,19 @@ jobs:
TAG_NAME=${{ github.event.inputs.dockerImageTag }}
TAG_NAME_WITH_LATEST=${{ github.event.inputs.dockerImageTagWithLatest }}
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
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
fi
echo ::set-output name=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} .
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
# Until https://github.com/tonistiigi/binfmt/issues/215
image: tonistiigi/binfmt:qemu-v7.0.0-28
cache-image: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
@ -167,4 +152,5 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Buildx (build-and-push)
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

8
.gitignore vendored
View File

@ -137,9 +137,9 @@ celerybeat.pid
# Environments
.env
.venv
env/
# env/
venv/
ENV/
# ENV/
env.bak/
venv.bak/
@ -184,4 +184,6 @@ data
.dev
poetry.lock
apps/setting/models_provider/impl/*/icon/
tmp/
tmp/
config.yml
config.yml

View File

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

View File

@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
support@fit2cloud.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@ -1,30 +0,0 @@
# Contributing
As a contributor, you should agree that:
- The producer can adjust the open-source agreement to be more strict or relaxed as deemed necessary.
- Your contributed code may be used for commercial purposes, including but not limited to its cloud business operations.
## Create pull request
PR are always welcome, even if they only contain small fixes like typos or a few lines of code. If there will be a significant effort, please document it as an issue and get a discussion going before starting to work on it.
Please submit a PR broken down into small changes bit by bit. A PR consisting of a lot of features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.
This [development guideline](https://github.com/1Panel-dev/MaxKB/wiki/3-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA) contains information about repository structure, how to set up development environment, how to run it, and more.
Note: If you split your pull request to small changes, please make sure any of the changes goes to master will not break anything. Otherwise, it can not be merged until this feature complete.
## Report issues
It is a great way to contribute by reporting an issue. Well-written and complete bug reports are always welcome! Please open an issue and follow the template to fill in required information.
Before opening any issue, please look up the existing issues to avoid submitting a duplication.
If you find a match, you can "subscribe" to it to get notified on updates. If you have additional helpful information about the issue, please leave a comment.
When reporting issues, always include:
* Which version you are using.
* Steps to reproduce the issue.
* Snapshots or log files if needed
Because the issues are open to the public, when submitting files, be sure to remove any sensitive information, e.g. user name, password, IP address, and company name. You can
replace those parts with "REDACTED" or other strings like "****".

674
LICENSE
View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

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>
<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://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>
<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.
- **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.
- **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.
- **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.
- **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.
@ -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:
```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:
@ -31,7 +32,7 @@ Access MaxKB web interface at `http://your_server_ip:8080` with default admin cr
- username: admin
- password: MaxKB@123..
中国用户如遇到 Docker 镜像 Pull 失败问题,请参照该 [离线安装文档](https://maxkb.cn/docs/installation/offline_installtion/) 进行安装。
中国用户如遇到 Docker 镜像 Pull 失败问题,请参照该 [离线安装文档](https://maxkb.cn/docs/v2/installation/offline_installtion/) 进行安装。
## Screenshots
@ -55,8 +56,6 @@ Access MaxKB web interface at `http://your_server_ip:8080` with default admin cr
## 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>

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>
<h3 align="center">基于大模型和 RAG 的知识库问答系统</h3>
<h4 align="center">Ready-to-use, flexible RAG Chatbot</h4>
<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: 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 align="center">
<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"><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://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://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>
<hr/>
MaxKB = Max Knowledge Base是一款开箱即用的 RAG Chatbot具备强大的工作流和 MCP 工具调用能力。它支持对接各种主流大语言模型LLMs广泛应用于智能客服、企业内部知识库、学术研究与教育等场景。
MaxKB = Max Knowledge Brain是一个强大易用的企业级智能体平台致力于解决企业 AI 落地面临的技术门槛高、部署成本高、迭代周期长等问题助力企业在人工智能时代赢得先机。秉承“开箱即用伴随成长”的设计理念MaxKB 支持企业快速接入主流大模型高效构建专属知识库并提供从基础问答RAG、复杂流程自动化工作流到智能体Agent的渐进式升级路径全面赋能智能客服、智能办公助手等多种应用场景。
- **开箱即用**:支持直接上传文档 / 自动爬取在线文档,支持文本自动拆分、向量化和 RAG检索增强生成有效减少大模型幻觉智能问答交互体验好
- **模型中立**支持对接各种大模型包括本地私有大模型DeepSeek R1 / Llama 3 / Qwen 2 等)、国内公共大模型(通义千问 / 腾讯混元 / 字节豆包 / 百度千帆 / 智谱 AI / Kimi 等和国外公共大模型OpenAI / Claude / Gemini 等);
- **RAG 检索增强生成**:高效搭建本地 AI 知识库,支持直接上传文档 / 自动爬取在线文档,支持文本自动拆分、向量化,有效减少大模型幻觉,提升问答效果;
- **灵活编排**:内置强大的工作流引擎、函数库和 MCP 工具调用能力,支持编排 AI 工作过程,满足复杂业务场景下的需求;
- **无缝嵌入**:支持零编码快速嵌入到第三方业务系统,让已有系统快速拥有智能问答能力,提高用户满意度。
- **无缝嵌入**:支持零编码快速嵌入到第三方业务系统,让已有系统快速拥有智能问答能力,提高用户满意度;
- **模型中立**支持对接各种大模型包括本地私有大模型DeepSeek R1 / Qwen 3 等)、国内公共大模型(通义千问 / 腾讯混元 / 字节豆包 / 百度千帆 / 智谱 AI / Kimi 等和国外公共大模型OpenAI / Claude / Gemini 等)。
MaxKB 三分钟视频介绍https://www.bilibili.com/video/BV18JypYeEkj/
@ -27,10 +27,10 @@ MaxKB 三分钟视频介绍https://www.bilibili.com/video/BV18JypYeEkj/
```
# 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 机器
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
# 密码: 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
- 如果是内网环境,推荐使用 [离线安装包](https://community.fit2cloud.com/#/products/maxkb/downloads) 进行安装部署;
- MaxKB 产品版本分为社区版和专业版,详情请参见:[MaxKB 产品版本对比](https://maxkb.cn/pricing.html)
- 如果您需要向团队介绍 MaxKB可以使用这个 [官方 PPT 材料](https://maxkb.cn/download/introduce-maxkb_202503.pdf)。
- MaxKB 不同产品产品版本的对比请参见:[MaxKB 产品版本对比](https://maxkb.cn/price)
- 如果您需要向团队介绍 MaxKB可以使用这个 [官方 PPT 材料](https://fit2cloud.com/maxkb/download/introduce-maxkb_202507.pdf)。
如你有更多问题,可以查看使用手册,或者通过论坛与我们交流。
@ -86,4 +86,4 @@ Licensed under The GNU General Public License version 3 (GPLv3) (the "License")
<https://www.gnu.org/licenses/gpl-3.0.html>
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

View File

@ -1,17 +0,0 @@
# 安全说明
如果您发现安全问题,请直接联系我们:
- support@fit2cloud.com
- 400-052-0755
感谢您的支持!
# Security Policy
All security bugs should be reported to the contact as below:
- support@fit2cloud.com
- 400-052-0755
Thanks for your support!

View File

@ -1,39 +0,0 @@
<h3 align="center">MaxKB 应用案例,持续更新中...</h3>
------------------------------
- [MaxKB 应用案例:中国农业大学-小鹉哥](https://mp.weixin.qq.com/s/4g_gySMBQZCJ9OZ-yBkmvw)
- [MaxKB 应用案例:东北财经大学-小银杏](https://mp.weixin.qq.com/s/3BoxkY7EMomMmmvFYxvDIA)
- [MaxKB 应用案例:中铁水务](https://mp.weixin.qq.com/s/voNAddbK2CJOrJJs1ewZ8g)
- [MaxKB 应用案例:解放军总医院](https://mp.weixin.qq.com/s/ETrZC-vrA4Aap0eF-15EeQ)
- [MaxKB 应用案例:无锡市数据局](https://mp.weixin.qq.com/s/enfUFLevvL_La74PQ0kIXw)
- [MaxKB 应用案例:中核西仪研究院-西仪睿答](https://mp.weixin.qq.com/s/CbKr4mev8qahKLAtV6Dxdg)
- [MaxKB 应用案例:南京中医药大学](https://mp.weixin.qq.com/s/WUmAKYbZjp3272HIecpRFA)
- [MaxKB 应用案例:西北电力设计院-AI数字助理Memex](https://mp.weixin.qq.com/s/ezHFdB7C7AVL9MTtDwYGSA)
- [MaxKB 应用案例:西安国际医院中心医院-国医小助](https://mp.weixin.qq.com/s/DSOUvwrQrxbqQxKBilTCFQ)
- [MaxKB 应用案例华莱士智能AI客服助手上线啦](https://www.bilibili.com/video/BV1hQtVeXEBL)
- [MaxKB 应用案例:把医疗行业知识转化为知识库问答助手!](https://www.bilibili.com/video/BV157wme9EgB)
- [MaxKB 应用案例会展AI智能客服体验](https://www.bilibili.com/video/BV1J7BqY6EKA)
- [MaxKB 应用案例孩子要上幼儿园了AI 智能助手择校好帮手](https://www.bilibili.com/video/BV1wKrhYvEer)
- [MaxKB 应用案例产品使用指南AI助手新手小白也能轻松搞定](https://www.bilibili.com/video/BV1Yz6gYtEqX)
- [MaxKB 应用案例生物医药AI客服智能体验!](https://www.bilibili.com/video/BV13JzvYsE3e)
- [MaxKB 应用案例高校行政管理AI小助手](https://www.bilibili.com/video/BV1yvBMYvEdy)
- [MaxKB 应用案例:岳阳市人民医院-OA小助手](https://mp.weixin.qq.com/s/O94Qo3UH-MiUtDdWCVg8sQ)
- [MaxKB 应用案例:常熟市第一人民医院](https://mp.weixin.qq.com/s/s5XXGTR3_MUo41NbJ8WzZQ)
- [MaxKB 应用案例:华北水利水电大学](https://mp.weixin.qq.com/s/PoOFAcMCr9qJdvSj8c08qg)
- [MaxKB 应用案例:唐山海事局-“小海”AI语音助手](https://news.qq.com/rain/a/20250223A030BE00)
- [MaxKB 应用案例:湖南汉寿政务](http://hsds.hsdj.gov.cn:19999/ui/chat/a2c976736739aadc)
- [MaxKB 应用案例:广州市妇女儿童医疗中心-AI医疗数据分类分级小助手](https://mp.weixin.qq.com/s/YHUMkUOAaUomBV8bswpK3g)
- [MaxKB 应用案例:苏州热工研究院有限公司-维修大纲评估质量自查AI小助手](https://mp.weixin.qq.com/s/Ts5FQdnv7Tu9Jp7bvofCVA)
- [MaxKB 应用案例:国核自仪系统工程有限公司-NuCON AI帮](https://mp.weixin.qq.com/s/HNPc7u5xVfGLJr8IQz3vjQ)
- [MaxKB 应用案例深圳通开启Deep Seek智能应用新篇章](https://mp.weixin.qq.com/s/SILN0GSescH9LyeQqYP0VQ)
- [MaxKB 应用案例南通智慧出行领跑长三角首款接入DeepSeek的"畅行南通"APP上线AI新场景](https://mp.weixin.qq.com/s/WEC9UQ6msY0VS8LhTZh-Ew)
- [MaxKB 应用案例:中船动力人工智能"智慧动力云助手"及首批数字员工正式上线](https://mp.weixin.qq.com/s/OGcEkjh9DzGO1Tkc9nr7qg)
- [MaxKB 应用案例AI+矿山DeepSeek助力绿色智慧矿山智慧“升级”](https://mp.weixin.qq.com/s/SZstxTvVoLZg0ECbZbfpIA)
- [MaxKB 应用案例DeepSeek落地弘盛铜业国产大模型点亮"黑灯工厂"新引擎](https://mp.weixin.qq.com/s/Eczdx574MS5RMF7WfHN7_A)
- [MaxKB 应用案例:拥抱智能时代!中国五矿以 “AI+”赋能企业发展](https://mp.weixin.qq.com/s/D5vBtlX2E81pWE3_2OgWSw)
- [MaxKB 应用案例DeepSeek赋能中冶武勘AI智能体](https://mp.weixin.qq.com/s/8m0vxGcWXNdZazziQrLyxg)
- [MaxKB 应用案例重磅陕西广电网络“秦岭云”平台实现DeepSeek本地化部署](https://mp.weixin.qq.com/s/ZKmEU_wWShK1YDomKJHQeA)
- [MaxKB 应用案例粤海集团完成DeepSeek私有化部署助力集团智能化管理](https://mp.weixin.qq.com/s/2JbVp0-kr9Hfp-0whH4cvg)
- [MaxKB 应用案例建筑材料工业信息中心完成DeepSeek本地化部署推动行业数智化转型新发展](https://mp.weixin.qq.com/s/HThGSnND3qDF8ySEqiM4jw)
- [MaxKB 应用案例一起DeepSeek福建设计以AI大模型开启新篇章](https://mp.weixin.qq.com/s/m67e-H7iQBg3d24NM82UjA)

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,211 @@
# 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,
)
]
@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,135 @@
# 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="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 dataset.models import Paragraph
from knowledge.models import Paragraph
class ParagraphPipelineModel:
def __init__(self, _id: str, document_id: str, dataset_id: str, content: str, title: str, status: str,
is_active: bool, comprehensive_score: float, similarity: float, dataset_name: str, document_name: str,
hit_handling_method: str, directly_return_similarity: float, meta: dict = None):
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, knowledge_name: str,
document_name: str,
hit_handling_method: str, directly_return_similarity: float, knowledge_type, meta: dict = None):
self.id = _id
self.document_id = document_id
self.dataset_id = dataset_id
self.knowledge_id = knowledge_id
self.content = content
self.title = title
self.status = status,
self.is_active = is_active
self.comprehensive_score = comprehensive_score
self.similarity = similarity
self.dataset_name = dataset_name
self.knowledge_name = knowledge_name
self.document_name = document_name
self.hit_handling_method = hit_handling_method
self.directly_return_similarity = directly_return_similarity
self.meta = meta
self.knowledge_type = knowledge_type
def to_dict(self):
return {
'id': self.id,
'document_id': self.document_id,
'dataset_id': self.dataset_id,
'knowledge_id': self.knowledge_id,
'content': self.content,
'title': self.title,
'status': self.status,
'is_active': self.is_active,
'comprehensive_score': self.comprehensive_score,
'similarity': self.similarity,
'dataset_name': self.dataset_name,
'knowledge_name': self.knowledge_name,
'document_name': self.document_name,
'knowledge_type': self.knowledge_type,
'meta': self.meta,
}
@ -57,7 +60,8 @@ class ParagraphPipelineModel:
self.paragraph = {}
self.comprehensive_score = None
self.document_name = None
self.dataset_name = None
self.knowledge_name = None
self.knowledge_type = None
self.hit_handling_method = None
self.directly_return_similarity = 0.9
self.meta = {}
@ -66,7 +70,7 @@ class ParagraphPipelineModel:
if isinstance(paragraph, Paragraph):
self.paragraph = {'id': paragraph.id,
'document_id': paragraph.document_id,
'dataset_id': paragraph.dataset_id,
'knowledge_id': paragraph.knowledge_id,
'content': paragraph.content,
'title': paragraph.title,
'status': paragraph.status,
@ -76,8 +80,12 @@ class ParagraphPipelineModel:
self.paragraph = paragraph
return self
def add_dataset_name(self, dataset_name):
self.dataset_name = dataset_name
def add_knowledge_name(self, knowledge_name):
self.knowledge_name = knowledge_name
return self
def add_knowledge_type(self, knowledge_type):
self.knowledge_type = knowledge_type
return self
def add_document_name(self, document_name):
@ -106,12 +114,13 @@ class ParagraphPipelineModel:
def build(self):
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('status'),
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.knowledge_type,
self.meta)

View File

@ -17,12 +17,14 @@ from common.handle.impl.response.system_to_response import SystemToResponse
class PipelineManage:
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.context = {'message_tokens': 0, 'answer_tokens': 0}
self.base_to_response = base_to_response
self.debug = debug
def run(self, context: Dict = None):
self.context['start_time'] = time.time()
@ -44,6 +46,7 @@ class PipelineManage:
def __init__(self):
self.step_list: List[Type[IBaseChatPipelineStep]] = []
self.base_to_response = SystemToResponse()
self.debug = False
def append_step(self, step: Type[IBaseChatPipelineStep]):
self.step_list.append(step)
@ -53,5 +56,9 @@ class PipelineManage:
self.base_to_response = base_to_response
return self
def add_debug(self, debug):
self.debug = debug
return 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.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.util.field_message import ErrMessage
class ModelField(serializers.Field):
@ -45,7 +44,7 @@ class PostResponseHandler:
@abstractmethod
def handler(self, chat_id, chat_record_id, paragraph_list: List[ParagraphPipelineModel], problem_text: str,
answer_text,
manage, step, padding_problem_text: str = None, client_id=None, **kwargs):
manage, step, padding_problem_text: str = None, **kwargs):
pass
@ -53,35 +52,36 @@ class IChatStep(IBaseChatPipelineStep):
class InstanceSerializer(serializers.Serializer):
# 对话列表
message_list = serializers.ListField(required=True, child=MessageField(required=True),
error_messages=ErrMessage.list(_("Conversation list")))
model_id = serializers.UUIDField(required=False, allow_null=True, error_messages=ErrMessage.uuid(_("Model id")))
label=_("Conversation list"))
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
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,
error_messages=ErrMessage.base(_("Post-processor")))
label=_("Post-processor"))
# 补全问题
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")))
client_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Client id")))
client_type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Client Type")))
stream = serializers.BooleanField(required=False, label=_("Streaming Output"))
chat_user_id = serializers.CharField(required=True, label=_("Chat user id"))
chat_user_type = serializers.CharField(required=True, label=_("Chat user Type"))
# 未查询到引用分段
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,
error_messages=ErrMessage.dict(_("Model settings")))
label=_("Model settings"))
model_params_setting = serializers.DictField(required=False, allow_null=True,
error_messages=ErrMessage.dict(_("Model parameter settings")))
label=_("Model parameter settings"))
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)
@ -102,9 +102,9 @@ class IChatStep(IBaseChatPipelineStep):
chat_id, problem_text,
post_response_handler: PostResponseHandler,
model_id: str = None,
user_id: str = None,
workspace_id: str = None,
paragraph_list=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):
pass

View File

@ -9,7 +9,7 @@
import logging
import time
import traceback
import uuid
import uuid_utils.compat as uuid
from typing import List
from django.db.models import QuerySet
@ -18,22 +18,24 @@ from django.utils.translation import gettext as _
from langchain.chat_models.base import BaseChatModel
from langchain.schema import BaseMessage
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 application.chat_pipeline.I_base_chat_pipeline import ParagraphPipelineModel
from application.chat_pipeline.pipeline_manage import PipelineManage
from application.chat_pipeline.step.chat_step.i_chat_step import IChatStep, PostResponseHandler
from application.flow.tools import Reasoning
from application.models.api_key_model import ApplicationPublicAccessClient
from common.constants.authentication_type import AuthenticationType
from setting.models_provider.tools import get_model_instance_by_model_user_id
from application.models import ApplicationChatUserStats, ChatUserType
from common.utils.logger import maxkb_logger
from models_provider.tools import get_model_instance_by_model_workspace_id
def add_access_num(client_id=None, client_type=None, application_id=None):
if client_type == AuthenticationType.APPLICATION_ACCESS_TOKEN.value and application_id is not None:
application_public_access_client = (QuerySet(ApplicationPublicAccessClient).filter(client_id=client_id,
application_id=application_id)
def add_access_num(chat_user_id=None, chat_user_type=None, application_id=None):
if [ChatUserType.ANONYMOUS_USER.value, ChatUserType.CHAT_USER.value].__contains__(
chat_user_type) and application_id is not None:
application_public_access_client = (QuerySet(ApplicationChatUserStats).filter(chat_user_id=chat_user_id,
chat_user_type=chat_user_type,
application_id=application_id)
.first())
if application_public_access_client is not None:
application_public_access_client.access_num = application_public_access_client.access_num + 1
@ -63,7 +65,7 @@ def event_content(response,
message_list: List[BaseMessage],
problem_text: str,
padding_problem_text: str = None,
client_id=None, client_type=None,
chat_user_id=None, chat_user_type=None,
is_ai_chat: bool = None,
model_setting=None):
if model_setting is None:
@ -124,26 +126,24 @@ def event_content(response,
request_token = 0
response_token = 0
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,
all_text, manage, step, padding_problem_text, client_id,
reasoning_content=reasoning_content if reasoning_content_enable else ''
, asker=asker)
all_text, manage, step, padding_problem_text,
reasoning_content=reasoning_content if reasoning_content_enable else '')
yield manage.get_base_to_response().to_stream_chunk_response(chat_id, str(chat_record_id), 'ai-chat-node',
[], '', True,
request_token, response_token,
{'node_is_end': True, 'view_type': 'many_view',
'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:
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)
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,
all_text, manage, step, padding_problem_text, client_id, reasoning_content='',
asker=asker)
add_access_num(client_id, client_type, manage.context.get('application_id'))
all_text, manage, step, padding_problem_text, reasoning_content='')
if not manage.debug:
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',
[], all_text,
False,
@ -160,27 +160,28 @@ class BaseChatStep(IChatStep):
problem_text,
post_response_handler: PostResponseHandler,
model_id: str = None,
user_id: str = None,
workspace_id: str = None,
paragraph_list=None,
manage: PipelineManage = None,
padding_problem_text: str = None,
stream: bool = True,
client_id=None, client_type=None,
chat_user_id=None, chat_user_type=None,
no_references_setting=None,
model_params_setting=None,
model_setting=None,
**kwargs):
chat_model = get_model_instance_by_model_user_id(model_id, user_id,
**model_params_setting) if model_id is not None else None
chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting) if model_id is not None else None
if stream:
return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model,
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)
else:
return self.execute_block(message_list, chat_id, problem_text, post_response_handler, chat_model,
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)
def get_details(self, manage, **kwargs):
@ -197,7 +198,8 @@ class BaseChatStep(IChatStep):
@staticmethod
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
in
message_list]
@ -235,16 +237,17 @@ class BaseChatStep(IChatStep):
paragraph_list=None,
manage: PipelineManage = None,
padding_problem_text: str = None,
client_id=None, client_type=None,
chat_user_id=None, chat_user_type=None,
no_references_setting=None,
model_setting=None):
chat_result, is_ai_chat = self.get_stream_result(message_list, chat_model, paragraph_list,
no_references_setting, problem_text)
chat_record_id = uuid.uuid1()
chat_record_id = uuid.uuid7()
r = StreamingHttpResponse(
streaming_content=event_content(chat_result, chat_id, chat_record_id, paragraph_list,
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')
r['Cache-Control'] = 'no-cache'
@ -280,14 +283,14 @@ class BaseChatStep(IChatStep):
paragraph_list=None,
manage: PipelineManage = 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):
reasoning_content_enable = model_setting.get('reasoning_content_enable', False)
reasoning_content_start = model_setting.get('reasoning_content_start', '<think>')
reasoning_content_end = model_setting.get('reasoning_content_end', '</think>')
reasoning = Reasoning(reasoning_content_start,
reasoning_content_end)
chat_record_id = uuid.uuid1()
chat_record_id = uuid.uuid7()
# 调用模型
try:
chat_result, is_ai_chat = self.get_block_result(message_list, chat_model, paragraph_list,
@ -307,12 +310,11 @@ class BaseChatStep(IChatStep):
else:
reasoning_content = reasoning_result.get('reasoning_content') + reasoning_result_end.get(
'reasoning_content')
asker = manage.context.get('form_data', {}).get('asker', None)
post_response_handler.handler(chat_id, chat_record_id, paragraph_list, problem_text,
content, manage, self, padding_problem_text, client_id,
reasoning_content=reasoning_content if reasoning_content_enable else '',
asker=asker)
add_access_num(client_id, client_type, manage.context.get('application_id'))
content, manage, self, padding_problem_text,
reasoning_content=reasoning_content)
if not manage.debug:
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),
content, True,
request_token, response_token,
@ -325,10 +327,9 @@ class BaseChatStep(IChatStep):
except Exception as e:
all_text = 'Exception:' + str(e)
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,
all_text, manage, self, padding_problem_text, client_id, reasoning_content='',
asker=asker)
add_access_num(client_id, client_type, manage.context.get('application_id'))
all_text, manage, self, padding_problem_text, reasoning_content='')
if not manage.debug:
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,
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.pipeline_manage import PipelineManage
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.util.field_message import ErrMessage
class IGenerateHumanMessageStep(IBaseChatPipelineStep):
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),
error_messages=ErrMessage.list(_("Paragraph List")))
label=_("Paragraph List"))
# 历史对答
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(
_("Maximum length of the knowledge base paragraph")))
max_paragraph_char_number = serializers.IntegerField(required=True,
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,
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]:
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 \
IGenerateHumanMessageStep
from application.models import ChatRecord
from common.util.split_model import flat_map
from common.utils.common import flat_map
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.models import ChatRecord
from common.field.common import InstanceField
from common.util.field_message import ErrMessage
class IResetProblemStep(IBaseChatPipelineStep):
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),
error_messages=ErrMessage.list(_("History Questions")))
label=_("History Questions"))
# 大语言模型
model_id = serializers.UUIDField(required=False, allow_null=True, error_messages=ErrMessage.uuid(_("Model id")))
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("User ID")))
model_id = serializers.UUIDField(required=False, allow_null=True, label=_("Model id"))
workspace_id = serializers.CharField(required=True, label=_("User ID"))
problem_optimization_prompt = serializers.CharField(required=False, max_length=102400,
error_messages=ErrMessage.char(
_("Question completion prompt")))
label=_("Question completion prompt"))
def get_step_serializer(self, manage: PipelineManage) -> Type[serializers.Serializer]:
return self.InstanceSerializer
@ -52,6 +50,6 @@ class IResetProblemStep(IBaseChatPipelineStep):
@abstractmethod
def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None,
problem_optimization_prompt=None,
user_id=None,
workspace_id=None,
**kwargs):
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.models import ChatRecord
from common.util.split_model import flat_map
from setting.models_provider.tools import get_model_instance_by_model_user_id
from common.utils.split_model import flat_map
from models_provider.tools import get_model_instance_by_model_workspace_id
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")
@ -23,9 +23,9 @@ prompt = _(
class BaseResetProblemStep(IResetProblemStep):
def execute(self, problem_text: str, history_chat_record: List[ChatRecord] = None, model_id: str = None,
problem_optimization_prompt=None,
user_id=None,
workspace_id=None,
**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:
return problem_text
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.pipeline_manage import PipelineManage
from common.util.field_message import ErrMessage
class ISearchDatasetStep(IBaseChatPipelineStep):
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,
error_messages=ErrMessage.char(_("System completes question text")))
label=_("System completes question text"))
# 需要查询的数据集id列表
dataset_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
error_messages=ErrMessage.list(_("Dataset id list")))
knowledge_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
label=_("Dataset id list"))
# 需要排除的文档id
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
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,
error_messages=ErrMessage.integer(_("Reference segment number")))
label=_("Reference segment number"))
# 相似度 0-1之间
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=[
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
message=_("The type only supports embedding|keywords|blend"), code=500)
], error_messages=ErrMessage.char(_("Retrieval Mode")))
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("User ID")))
], label=_("Retrieval Mode"))
workspace_id = serializers.CharField(required=True, label=_("Workspace ID"))
def get_step_serializer(self, manage: PipelineManage) -> Type[InstanceSerializer]:
return self.InstanceSerializer
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
self.context['paragraph_list'] = paragraph_list
@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,
search_mode: str = None,
user_id=None,
workspace_id=None,
manage: PipelineManage = None,
**kwargs) -> List[ParagraphPipelineModel]:
"""
关于 用户和补全问题 说明: 补全问题如果有就使用补全问题去查询 反之就用用户原始问题查询
:param similarity: 相关性
:param top_n: 查询多少条
:param problem_text: 用户问题
:param dataset_id_list: 需要查询的数据集id列表
:param knowledge_id_list: 需要查询的数据集id列表
:param exclude_document_id_list: 需要排除的文档id
:param exclude_paragraph_id_list: 需要排除段落id
:param padding_problem_text 补全问题
:param search_mode 检索模式
:param user_id 用户id
:param workspace_id 工作空间id
:return: 段落列表
"""
pass

View File

@ -16,51 +16,52 @@ from rest_framework.utils.formatting import lazy_format
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 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.util.file_util import get_file_content
from dataset.models import Paragraph, DataSet
from embedding.models import SearchMode
from setting.models import Model
from setting.models_provider import get_model
from smartdoc.conf import PROJECT_DIR
from common.utils.common import get_file_content
from knowledge.models import Paragraph, Knowledge
from knowledge.models import SearchMode
from maxkb.conf import PROJECT_DIR
from models_provider.models import Model
from models_provider.tools import get_model, get_model_by_id
def get_model_by_id(_id, user_id):
model = QuerySet(Model).filter(id=_id).first()
if model is None:
raise Exception(_("Model does not exist"))
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):
dataset_list = QuerySet(DataSet).filter(id__in=dataset_id_list)
if len(set([dataset.embedding_mode_id for dataset in dataset_list])) > 1:
raise Exception(_("The vector model of the associated knowledge base is inconsistent and the segmentation cannot be recalled."))
if len(dataset_list) == 0:
def get_embedding_id(knowledge_id_list):
knowledge_list = QuerySet(Knowledge).filter(id__in=knowledge_id_list)
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."))
if len(knowledge_list) == 0:
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):
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,
search_mode: str = None,
user_id=None,
workspace_id=None,
manage=None,
**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 []
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 = get_model_by_id(model_id, user_id)
model_id = get_embedding_id(knowledge_id_list)
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
embedding_model = ModelManage.get_model(model_id, lambda _id: get_model(model))
embedding_value = embedding_model.embed_query(exec_problem_text)
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, exclude_document_id_list,
exclude_paragraph_id_list, True, top_n, similarity, SearchMode(search_mode))
if embedding_list is None:
return []
@ -78,7 +79,8 @@ class BaseSearchDatasetStep(ISearchDatasetStep):
.add_paragraph(paragraph)
.add_similarity(find_embedding.get('similarity'))
.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_hit_handling_method(paragraph.get('hit_handling_method'))
.add_directly_return_similarity(paragraph.get('directly_return_similarity'))
@ -102,7 +104,7 @@ class BaseSearchDatasetStep(ISearchDatasetStep):
paragraph_list = native_search(QuerySet(Paragraph).filter(id__in=paragraph_id_list),
get_file_content(
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)
# 如果向量库中存在脏数据 直接删除
if len(paragraph_list) != len(paragraph_id_list):

View File

@ -7,6 +7,21 @@
@desc:
"""
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']
class Answer:
def __init__(self, content, view_type, runtime_node_id, chat_record_id, child_node, real_node_id,
@ -42,3 +57,207 @@ class NodeChunk:
def is_end(self):
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 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]]
def __init__(self, nodes: List[Node], edges: List[Edge]):
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()}
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):
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)
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()
@staticmethod
def is_valid_node_params(node: Node):
from application.flow.step_node import get_node
get_node(node.type)(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

@ -18,13 +18,11 @@ from rest_framework import serializers
from rest_framework.exceptions import ValidationError, ErrorDetail
from application.flow.common import Answer, NodeChunk
from application.models import ChatRecord
from application.models.api_key_model import ApplicationPublicAccessClient
from common.constants.authentication_type import AuthenticationType
from application.models import ApplicationChatUserStats
from application.models import ChatRecord, ChatUserType
from common.field.common import InstanceField
from common.util.field_message import ErrMessage
chat_cache = cache.caches['chat_cache']
chat_cache = cache
def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
@ -46,16 +44,14 @@ def is_interrupt(node, step_variable: Dict, global_variable: Dict):
class WorkFlowPostHandler:
def __init__(self, chat_info, client_id, client_type):
def __init__(self, chat_info):
self.chat_info = chat_info
self.client_id = client_id
self.client_type = client_type
def handler(self, chat_id,
chat_record_id,
answer,
workflow):
question = workflow.params['question']
def handler(self, workflow):
workflow_body = workflow.get_body()
question = workflow_body.get('question')
chat_record_id = workflow_body.get('chat_record_id')
chat_id = workflow_body.get('chat_id')
details = workflow.get_runtime_details()
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])
@ -84,15 +80,16 @@ class WorkFlowPostHandler:
answer_text_list=answer_text_list,
run_time=time.time() - workflow.context['start_time'],
index=0)
asker = workflow.context.get('asker', None)
self.chat_info.append_chat_record(chat_record, self.client_id, asker)
# 重新设置缓存
chat_cache.set(chat_id,
self.chat_info, timeout=60 * 30)
if self.client_type == AuthenticationType.APPLICATION_ACCESS_TOKEN.value:
application_public_access_client = (QuerySet(ApplicationPublicAccessClient)
.filter(client_id=self.client_id,
application_id=self.chat_info.application.id).first())
self.chat_info.append_chat_record(chat_record)
self.chat_info.set_cache()
if not self.chat_info.debug and [ChatUserType.ANONYMOUS_USER.value, ChatUserType.CHAT_USER.value].__contains__(
workflow_body.get('chat_user_type')):
application_public_access_client = (QuerySet(ApplicationChatUserStats)
.filter(chat_user_id=workflow_body.get('chat_user_id'),
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:
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
@ -123,31 +120,36 @@ class NodeResult:
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(
child=serializers.CharField(required=True, error_messages=ErrMessage.char("节点字段")), required=True,
error_messages=ErrMessage.list("节点字段数组"))
child=serializers.CharField(required=True, label="节点字段"), required=True,
label="节点字段数组")
class FlowParamsSerializer(serializers.Serializer):
# 历史对答
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"))
re_chat = serializers.BooleanField(required=True, error_messages=ErrMessage.boolean("换个答案"))
workspace_id = serializers.CharField(required=True, label="工作空间id")
application_id = serializers.CharField(required=True, label="应用id")
re_chat = serializers.BooleanField(required=True, label="换个答案")
debug = serializers.BooleanField(required=True, label="是否debug")
class INode:

View File

@ -10,26 +10,24 @@ from .ai_chat_step_node import *
from .application_node import BaseApplicationNode
from .condition_node import *
from .direct_reply_node import *
from .document_extract_node import *
from .form_node import *
from .function_lib_node import *
from .function_node import *
from .image_generate_step_node import *
from .image_understand_step_node import *
from .mcp_node import BaseMcpNode
from .question_node import *
from .reranker_node import *
from .document_extract_node import *
from .image_understand_step_node import *
from .image_generate_step_node import *
from .search_dataset_node import *
from .search_knowledge_node import *
from .speech_to_text_step_node import BaseSpeechToTextNode
from .start_node import *
from .text_to_speech_step_node.impl.base_text_to_speech_node import BaseTextToSpeechNode
from .tool_lib_node import *
from .tool_node import *
from .variable_assign_node import BaseVariableAssignNode
from .mcp_node import BaseMcpNode
node_list = [BaseStartStepNode, BaseChatNode, BaseSearchDatasetNode, BaseQuestionNode,
node_list = [BaseStartStepNode, BaseChatNode, BaseSearchKnowledgeNode, BaseQuestionNode,
BaseConditionNode, BaseReplyNode,
BaseFunctionNodeNode, BaseFunctionLibNodeNode, BaseRerankerNode, BaseApplicationNode,
BaseToolNodeNode, BaseToolLibNodeNode, BaseRerankerNode, BaseApplicationNode,
BaseDocumentExtractNode,
BaseImageUnderstandNode, BaseFormNode, BaseSpeechToTextNode, BaseTextToSpeechNode,
BaseImageGenerateNode, BaseVariableAssignNode, BaseMcpNode]

View File

@ -12,30 +12,28 @@ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
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,
error_messages=ErrMessage.char(_("Role Setting")))
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word")))
label=_("Role Setting"))
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"))
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,
error_messages=ErrMessage.dict(_("Model parameter settings")))
label=_("Model parameter settings"))
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,
error_messages=ErrMessage.char(_("Context Type")))
label=_("Context Type"))
mcp_enable = serializers.BooleanField(required=False,
error_messages=ErrMessage.boolean(_("Whether to enable MCP")))
mcp_servers = serializers.JSONField(required=False, error_messages=ErrMessage.list(_("MCP Server")))
label=_("Whether to enable MCP"))
mcp_servers = serializers.JSONField(required=False, label=_("MCP Server"))
class IChatNode(INode):

View File

@ -8,10 +8,10 @@
"""
import asyncio
import json
import logging
import re
import time
from functools import reduce
from types import AsyncGeneratorType
from typing import List, Dict
from django.db.models import QuerySet
@ -23,9 +23,9 @@ from langgraph.prebuilt import create_react_agent
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.tools import Reasoning
from setting.models import Model
from setting.models_provider import get_model_credential
from setting.models_provider.tools import get_model_instance_by_model_user_id
from models_provider.models import Model
from models_provider.tools import get_model_credential, get_model_instance_by_model_workspace_id
from common.utils.logger import maxkb_logger
tool_message_template = """
<details>
@ -40,6 +40,7 @@ tool_message_template = """
"""
def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str,
reasoning_content: str):
chat_model = node_variable.get('chat_model')
@ -102,18 +103,19 @@ def write_context_stream(node_variable: Dict, workflow_variable: Dict, node: INo
_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]
client = MultiServerMCPClient(json.loads(mcp_servers))
tools = await client.get_tools()
agent = create_react_agent(chat_model, 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()
@ -126,10 +128,11 @@ def mcp_response_generator(chat_model, message_list, mcp_servers):
except StopAsyncIteration:
break
except Exception as e:
print(f'exception: {e}')
maxkb_logger.error(f'Exception: {e}')
finally:
loop.close()
async def anext_async(agen):
return await agen.__anext__()
@ -150,8 +153,9 @@ def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wor
reasoning_result = reasoning.get_reasoning_content(response)
reasoning_result_end = reasoning.get_end_reasoning_content()
content = reasoning_result.get('content') + reasoning_result_end.get('content')
if 'reasoning_content' in response.response_metadata:
reasoning_content = response.response_metadata.get('reasoning_content', '')
meta = {**response.response_metadata, **response.additional_kwargs}
if 'reasoning_content' in meta:
reasoning_content = meta.get('reasoning_content', '')
else:
reasoning_content = reasoning_result.get('reasoning_content') + reasoning_result_end.get('reasoning_content')
_write_context(node_variable, workflow_variable, node, workflow, content, reasoning_content)
@ -186,7 +190,8 @@ class BaseChatNode(IChatNode):
self.context['answer'] = details.get('answer')
self.context['question'] = details.get('question')
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,
model_params_setting=None,
@ -204,8 +209,9 @@ class BaseChatNode(IChatNode):
model_setting = {'reasoning_content_enable': False, 'reasoning_content_end': '</think>',
'reasoning_content_start': '<think>'}
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'),
**model_params_setting)
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, dialogue_type,
self.runtime_node_id)
self.context['history_message'] = history_message
@ -216,7 +222,7 @@ class BaseChatNode(IChatNode):
message_list = self.generate_message_list(system, prompt, history_message)
self.context['message_list'] = message_list
if mcp_enable and mcp_servers is not None:
if mcp_enable and mcp_servers is not None and '"stdio"' not in mcp_servers:
r = mcp_response_generator(chat_model, message_list, mcp_servers)
return NodeResult(
{'result': r, 'chat_model': chat_model, 'message_list': message_list,

View File

@ -4,24 +4,23 @@ from typing import Type
from rest_framework import serializers
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 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,
error_messages=ErrMessage.list(_("User Questions")))
api_input_field_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("API Input Fields")))
label=_("User Questions"))
api_input_field_list = serializers.ListField(required=False, label=_("API Input Fields"))
user_input_field_list = serializers.ListField(required=False,
error_messages=ErrMessage.uuid(_("User Input Fields")))
image_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("picture")))
document_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("document")))
audio_list = serializers.ListField(required=False, error_messages=ErrMessage.list(_("Audio")))
label=_("User Input Fields"))
image_list = serializers.ListField(required=False, label=_("picture"))
document_list = serializers.ListField(required=False, label=_("document"))
audio_list = serializers.ListField(required=False, label=_("Audio"))
child_node = serializers.DictField(required=False, allow_null=True,
error_messages=ErrMessage.dict(_("Child Nodes")))
node_data = serializers.DictField(required=False, allow_null=True, error_messages=ErrMessage.dict(_("Form Data")))
label=_("Child Nodes"))
node_data = serializers.DictField(required=False, allow_null=True, label=_("Form Data"))
class IApplicationNode(INode):
@ -75,7 +74,7 @@ class IApplicationNode(INode):
if 'file_id' not in audio:
raise ValueError(
_("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_audio_list=app_audio_list,
message=str(question), **kwargs)

View File

@ -4,7 +4,7 @@ import re
import time
import uuid
from typing import Dict, List
from django.utils.translation import gettext as _
from application.flow.common import Answer
from application.flow.i_step_node import NodeResult, INode
from application.flow.step_node.application_node.i_application_node import IApplicationNode
@ -168,17 +168,24 @@ class BaseApplicationNode(IApplicationNode):
self.context['question'] = details.get('question')
self.context['type'] = details.get('type')
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 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,
**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
current_chat_id = string_to_uuid(chat_id + application_id)
Chat.objects.get_or_create(id=current_chat_id, defaults={
'application_id': application_id,
'abstract': message[0:1024]
'abstract': message[0:1024],
'chat_user_id': chat_user_id,
'chat_user_type': chat_user_type
})
if app_document_list is None:
app_document_list = []
@ -195,22 +202,26 @@ class BaseApplicationNode(IApplicationNode):
child_node_value = child_node.get('child_node')
application_node_dict = self.context.get('application_node_dict')
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 stream:
content_generator = response.streaming_content

View File

@ -12,19 +12,18 @@ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.i_step_node import INode
from common.util.field_message import ErrMessage
class ConditionSerializer(serializers.Serializer):
compare = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Comparator")))
value = serializers.CharField(required=True, error_messages=ErrMessage.char(_("value")))
field = serializers.ListField(required=True, error_messages=ErrMessage.char(_("Fields")))
compare = serializers.CharField(required=True, label=_("Comparator"))
value = serializers.CharField(required=True, label=_("value"))
field = serializers.ListField(required=True, label=_("Fields"))
class ConditionBranchSerializer(serializers.Serializer):
id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Branch id")))
type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Branch Type")))
condition = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Condition or|and")))
id = serializers.CharField(required=True, label=_("Branch id"))
type = serializers.CharField(required=True, label=_("Branch Type"))
condition = serializers.CharField(required=True, label=_("Condition or|and"))
conditions = ConditionSerializer(many=True)

View File

@ -12,16 +12,17 @@ from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.exception.app_exception import AppApiException
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _
class ReplyNodeParamsSerializer(serializers.Serializer):
reply_type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Response Type")))
fields = serializers.ListField(required=False, error_messages=ErrMessage.list(_("Reference Field")))
reply_type = serializers.CharField(required=True, label=_("Response Type"))
fields = serializers.ListField(required=False, label=_("Reference Field"))
content = serializers.CharField(required=False, allow_blank=True, allow_null=True,
error_messages=ErrMessage.char(_("Direct answer content")))
is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean(_('Whether to return content')))
label=_("Direct answer content"))
is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)

View File

@ -15,7 +15,9 @@ from application.flow.step_node.direct_reply_node.i_reply_node import IReplyNode
class BaseReplyNode(IReplyNode):
def save_context(self, details, workflow_manage):
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:
if reply_type == 'referencing':
result = self.get_reference_content(fields)

View File

@ -6,11 +6,10 @@ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
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):

View File

@ -7,9 +7,9 @@ from django.db.models import QuerySet
from application.flow.i_step_node import NodeResult
from application.flow.step_node.document_extract_node.i_document_extract_node import IDocumentExtractNode
from dataset.models import File
from dataset.serializers.document_serializers import split_handles, parse_table_handle_list, FileBufferHandle
from dataset.serializers.file_serializers import FileSerializer
from knowledge.models import File, FileSourceType
from knowledge.serializers.document import split_handles, parse_table_handle_list, FileBufferHandle
from oss.serializers.file import FileSerializer
def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
@ -37,11 +37,11 @@ def bytes_to_uploaded_file(file_bytes, file_name="file.txt"):
splitter = '\n`-----------------------------------`\n'
class BaseDocumentExtractNode(IDocumentExtractNode):
def save_context(self, details, workflow_manage):
self.context['content'] = details.get('content')
def execute(self, document, chat_id, **kwargs):
get_buffer = FileBufferHandle().get_buffer
@ -61,12 +61,18 @@ class BaseDocumentExtractNode(IDocumentExtractNode):
'application_id': str(application.id) if application.id else None,
'file_id': str(image.id)
}
file = bytes_to_uploaded_file(image.image, image.image_name)
FileSerializer(data={'file': file, 'meta': meta}).upload()
file_bytes = image.meta.pop('content')
f = bytes_to_uploaded_file(file_bytes, image.file_name)
FileSerializer(data={
'file': f,
'meta': meta,
'source_id': meta['application_id'],
'source_type': FileSourceType.APPLICATION.value
}).upload()
for doc in document:
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
for split_handle in (parse_table_handle_list + split_handles):

View File

@ -11,14 +11,14 @@ from typing import Type
from rest_framework import serializers
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 FormNodeParamsSerializer(serializers.Serializer):
form_field_list = serializers.ListField(required=True, error_messages=ErrMessage.list(_("Form Configuration")))
form_content_format = serializers.CharField(required=True, error_messages=ErrMessage.char(_('Form output content')))
form_data = serializers.DictField(required=False, allow_null=True, error_messages=ErrMessage.dict(_("Form Data")))
form_field_list = serializers.ListField(required=True, label=_("Form Configuration"))
form_content_format = serializers.CharField(required=True, label=_('Form output content'))
form_data = serializers.DictField(required=False, allow_null=True, label=_("Form Data"))
class IFormNode(INode):

View File

@ -38,7 +38,8 @@ class BaseFormNode(IFormNode):
self.context['start_time'] = details.get('start_time')
self.context['form_data'] = form_data
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:
for key in form_data:
self.context[key] = form_data[key]
@ -70,7 +71,7 @@ class BaseFormNode(IFormNode):
"chat_record_id": self.flow_params_serializer.data.get("chat_record_id"),
'form_data': self.context.get('form_data', {}),
"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()
form_content_format = self.workflow_manage.reset_prompt(form_content_format)
prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2')
@ -85,7 +86,7 @@ class BaseFormNode(IFormNode):
"chat_record_id": self.flow_params_serializer.data.get("chat_record_id"),
'form_data': self.context.get('form_data', {}),
"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()
form_content_format = self.workflow_manage.reset_prompt(form_content_format)
prompt_template = PromptTemplate.from_template(form_content_format, template_format='jinja2')

View File

@ -2,31 +2,31 @@
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
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):
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, )
# 多轮对话数量
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',
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,
error_messages=ErrMessage.json(_("Model parameter settings")))
label=_("Model parameter settings"))
class IImageGenerateNode(INode):

View File

@ -7,24 +7,27 @@ from langchain_core.messages import BaseMessage, HumanMessage, AIMessage
from application.flow.i_step_node import NodeResult
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 dataset.serializers.file_serializers import FileSerializer
from setting.models_provider.tools import get_model_instance_by_model_user_id
from common.utils.common import bytes_to_uploaded_file
from knowledge.models import FileSourceType
from oss.serializers.file import FileSerializer
from models_provider.tools import get_model_instance_by_model_workspace_id
class BaseImageGenerateNode(IImageGenerateNode):
def save_context(self, details, workflow_manage):
self.context['answer'] = details.get('answer')
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,
model_params_setting,
chat_record_id,
**kwargs) -> NodeResult:
print(model_params_setting)
application = self.workflow_manage.work_flow_post_handler.chat_info.application
tti_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'), **model_params_setting)
workspace_id = self.workflow_manage.get_body().get('workspace_id')
tti_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)
@ -32,19 +35,26 @@ class BaseImageGenerateNode(IImageGenerateNode):
message_list = self.generate_message_list(question, history_message)
self.context['message_list'] = message_list
self.context['dialogue_type'] = dialogue_type
print(message_list)
self.context['negative_prompt'] = negative_prompt
image_urls = tti_model.generate_image(question, negative_prompt)
# 保存图片
file_urls = []
for image_url in image_urls:
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'):
image_url = requests.get(image_url).content
file = bytes_to_uploaded_file(image_url, file_name)
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}).upload()
file_url = FileSerializer(data={
'file': file,
'meta': meta,
'source_id': meta['application_id'],
'source_type': FileSourceType.APPLICATION.value
}).upload()
file_urls.append(file_url)
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])
@ -116,5 +126,6 @@ class BaseImageGenerateNode(IImageGenerateNode):
'status': self.status,
'err_message': self.err_message,
'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

@ -5,26 +5,27 @@ from typing import Type
from rest_framework import serializers
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 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,
error_messages=ErrMessage.char(_("Role Setting")))
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word")))
label=_("Role Setting"))
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,
error_messages=ErrMessage.json(_("Model parameter settings")))
label=_("Model parameter settings"))
class IImageUnderstandNode(INode):

View File

@ -1,8 +1,8 @@
# coding=utf-8
import base64
import os
import time
from functools import reduce
from imghdr import what
from typing import List, Dict
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.step_node.image_understand_step_node.i_image_understand_node import IImageUnderstandNode
from dataset.models import File
from setting.models_provider.tools import get_model_instance_by_model_user_id
from imghdr import what
from knowledge.models import File
from models_provider.tools import get_model_instance_by_model_workspace_id
def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str):
@ -60,16 +59,17 @@ def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wor
def file_id_to_base64(file_id: str):
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")
return [base64_image, what(None, file_bytes.tobytes())]
return [base64_image, what(None, file_bytes)]
class BaseImageUnderstandNode(IImageUnderstandNode):
def save_context(self, details, workflow_manage):
self.context['answer'] = details.get('answer')
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,
model_params_setting,
@ -79,8 +79,9 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
# 处理不正确的参数
if image is None or not isinstance(image, list):
image = []
print(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)
workspace_id = self.workflow_manage.get_body().get('workspace_id')
image_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting)
# 执行详情中的历史消息不需要图片内容
history_message = self.get_history_message_for_details(history_chat_record, dialogue_number)
self.context['history_message'] = history_message
@ -129,7 +130,7 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
file_id_list = [image.get('file_id') for image in image_list]
return HumanMessage(content=[
{'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]
])
return HumanMessage(content=chat_record.problem_text)
@ -154,7 +155,8 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
return HumanMessage(
content=[
{'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',
'image_url': {'url': f'data:image/{base64_image[1]};base64,{base64_image[0]}'}} for
base64_image in image_base64_list]
])
return HumanMessage(content=chat_record.problem_text)
@ -169,10 +171,11 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
for img in image:
file_id = img['file_id']
file = QuerySet(File).filter(id=file_id).first()
image_bytes = file.get_byte()
image_bytes = file.get_bytes()
base64_image = base64.b64encode(image_bytes).decode("utf-8")
image_format = what(None, image_bytes.tobytes())
images.append({'type': 'image_url', 'image_url': {'url': f'data:image/{image_format};base64,{base64_image}'}})
image_format = what(None, image_bytes)
images.append(
{'type': 'image_url', 'image_url': {'url': f'data:image/{image_format};base64,{base64_image}'}})
messages = [HumanMessage(
content=[
{'type': 'text', 'text': self.workflow_manage.generate_prompt(prompt)},

View File

@ -2,24 +2,23 @@
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
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 McpNodeSerializer(serializers.Serializer):
mcp_servers = serializers.JSONField(required=True,
error_messages=ErrMessage.char(_("Mcp servers")))
label=_("Mcp servers"))
mcp_server = serializers.CharField(required=True,
error_messages=ErrMessage.char(_("Mcp server")))
label=_("Mcp server"))
mcp_tool = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Mcp tool")))
mcp_tool = serializers.CharField(required=True, label=_("Mcp tool"))
tool_params = serializers.DictField(required=True,
error_messages=ErrMessage.char(_("Tool parameters")))
label=_("Tool parameters"))
class IMcpNode(INode):

View File

@ -4,6 +4,7 @@ import json
from typing import List
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_mcp_adapters.sessions import create_session
from application.flow.i_step_node import NodeResult
from application.flow.step_node.mcp_node.i_mcp_node import IMcpNode
@ -14,20 +15,22 @@ class BaseMcpNode(IMcpNode):
self.context['result'] = details.get('result')
self.context['tool_params'] = details.get('tool_params')
self.context['mcp_tool'] = details.get('mcp_tool')
self.answer_text = details.get('result')
if self.node_params.get('is_result', False):
self.answer_text = details.get('result')
def execute(self, mcp_servers, mcp_server, mcp_tool, tool_params, **kwargs) -> NodeResult:
servers = json.loads(mcp_servers)
params = json.loads(json.dumps(tool_params))
params = self.handle_variables(params)
async def call_tool(s, session, t, a):
async with MultiServerMCPClient(s) as client:
s = await client.sessions[session].call_tool(t, a)
return s
async def call_tool(t, a):
client = MultiServerMCPClient(servers)
async with create_session(client.connections[mcp_server]) as s:
return await s.call_tool(t, a)
res = asyncio.run(call_tool(servers, mcp_server, mcp_tool, params))
return NodeResult({'result': [content.text for content in res.content], 'tool_params': params, 'mcp_tool': mcp_tool}, {})
res = asyncio.run(call_tool(mcp_tool, params))
return NodeResult(
{'result': [content.text for content in res.content], 'tool_params': params, 'mcp_tool': mcp_tool}, {})
def handle_variables(self, tool_params):
# 处理参数中的变量

View File

@ -8,23 +8,25 @@
"""
from typing import Type
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
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 QuestionNodeSerializer(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,
error_messages=ErrMessage.char(_("Role Setting")))
prompt = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Prompt word")))
label=_("Role Setting"))
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"))
is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean(_('Whether to return content')))
model_params_setting = serializers.DictField(required=False, error_messages=ErrMessage.integer(_("Model parameter settings")))
is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
model_params_setting = serializers.DictField(required=False,
label=_("Model parameter settings"))
class IQuestionNode(INode):

View File

@ -17,9 +17,8 @@ from langchain_core.messages import BaseMessage
from application.flow.i_step_node import NodeResult, INode
from application.flow.step_node.question_node.i_question_node import IQuestionNode
from setting.models import Model
from setting.models_provider import get_model_credential
from setting.models_provider.tools import get_model_instance_by_model_user_id
from models_provider.models import Model
from models_provider.tools import get_model_instance_by_model_workspace_id, get_model_credential
def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, workflow, answer: str):
@ -80,15 +79,17 @@ class BaseQuestionNode(IQuestionNode):
self.context['answer'] = details.get('answer')
self.context['message_tokens'] = details.get('message_tokens')
self.context['answer_tokens'] = details.get('answer_tokens')
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,
model_params_setting=None,
**kwargs) -> NodeResult:
if model_params_setting is None:
model_params_setting = get_default_model_params_setting(model_id)
chat_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'),
**model_params_setting)
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
question = self.generate_prompt_question(prompt)

View File

@ -11,19 +11,19 @@ from typing import Type
from rest_framework import serializers
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 RerankerSettingSerializer(serializers.Serializer):
# 需要查询的条数
top_n = serializers.IntegerField(required=True,
error_messages=ErrMessage.integer(_("Reference segment number")))
label=_("Reference segment number"))
# 相似度 0-1之间
similarity = serializers.FloatField(required=True, max_value=2, min_value=0,
error_messages=ErrMessage.float(_("Reference segment number")))
label=_("Reference segment number"))
max_paragraph_char_number = serializers.IntegerField(required=True,
error_messages=ErrMessage.float(_("Maximum number of words in a quoted segment")))
label=_("Maximum number of words in a quoted segment"))
class RerankerStepNodeSerializer(serializers.Serializer):
@ -32,6 +32,8 @@ class RerankerStepNodeSerializer(serializers.Serializer):
question_reference_address = serializers.ListField(required=True)
reranker_model_id = serializers.UUIDField(required=True)
reranker_reference_list = serializers.ListField(required=True, child=serializers.ListField(required=True))
show_knowledge = serializers.BooleanField(required=True,
label=_("The results are displayed in the knowledge sources"))
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)
@ -55,6 +57,6 @@ class IRerankerNode(INode):
reranker_list=reranker_list)
def execute(self, question, reranker_setting, reranker_list, reranker_model_id,
def execute(self, question, reranker_setting, reranker_list, reranker_model_id,show_knowledge,
**kwargs) -> NodeResult:
pass

View File

@ -12,7 +12,7 @@ from langchain_core.documents import Document
from application.flow.i_step_node import NodeResult
from application.flow.step_node.reranker_node.i_reranker_node import IRerankerNode
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
def merge_reranker_list(reranker_list, result=None):
@ -24,11 +24,9 @@ def merge_reranker_list(reranker_list, result=None):
elif isinstance(document, dict):
content = document.get('title', '') + document.get('content', '')
title = document.get("title")
dataset_name = document.get("dataset_name")
document_name = document.get('document_name')
result.append(
Document(page_content=str(document) if len(content) == 0 else content,
metadata={'title': title, 'dataset_name': dataset_name, 'document_name': document_name}))
metadata={'title': title, **document}))
else:
result.append(Document(page_content=str(document), metadata={}))
return result
@ -71,16 +69,18 @@ class BaseRerankerNode(IRerankerNode):
self.context['result_list'] = details.get('result_list')
self.context['result'] = details.get('result')
def execute(self, question, reranker_setting, reranker_list, reranker_model_id,
def execute(self, question, reranker_setting, reranker_list, reranker_model_id, show_knowledge,
**kwargs) -> NodeResult:
self.context['show_knowledge'] = show_knowledge
documents = merge_reranker_list(reranker_list)
top_n = reranker_setting.get('top_n', 3)
self.context['document_list'] = [{'page_content': document.page_content, 'metadata': document.metadata} for
document in documents]
self.context['question'] = question
reranker_model = get_model_instance_by_model_user_id(reranker_model_id,
self.flow_params_serializer.data.get('user_id'),
top_n=top_n)
workspace_id = self.workflow_manage.get_body().get('workspace_id')
reranker_model = get_model_instance_by_model_workspace_id(reranker_model_id,
workspace_id,
top_n=top_n)
result = reranker_model.compress_documents(
documents,
question)
@ -92,6 +92,7 @@ class BaseRerankerNode(IRerankerNode):
def get_details(self, index: int, **kwargs):
return {
'show_knowledge': self.context.get('show_knowledge'),
'name': self.node.properties.get('stepName'),
"index": index,
'document_list': self.context.get('document_list'),

View File

@ -13,34 +13,37 @@ from django.core import validators
from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.util.common import flat_map
from common.util.field_message import ErrMessage
from common.utils.common import flat_map
from django.utils.translation import gettext_lazy as _
class DatasetSettingSerializer(serializers.Serializer):
# 需要查询的条数
top_n = serializers.IntegerField(required=True,
error_messages=ErrMessage.integer(_("Reference segment number")))
label=_("Reference segment number"))
# 相似度 0-1之间
similarity = serializers.FloatField(required=True, max_value=2, min_value=0,
error_messages=ErrMessage.float(_('similarity')))
label=_('similarity'))
search_mode = serializers.CharField(required=True, validators=[
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
message=_("The type only supports embedding|keywords|blend"), code=500)
], error_messages=ErrMessage.char(_("Retrieval Mode")))
], label=_("Retrieval Mode"))
max_paragraph_char_number = serializers.IntegerField(required=True,
error_messages=ErrMessage.float(_("Maximum number of words in a quoted segment")))
label=_("Maximum number of words in a quoted segment"))
class SearchDatasetStepNodeSerializer(serializers.Serializer):
# 需要查询的数据集id列表
dataset_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
error_messages=ErrMessage.list(_("Dataset id list")))
dataset_setting = DatasetSettingSerializer(required=True)
knowledge_id_list = serializers.ListField(required=True, child=serializers.UUIDField(required=True),
label=_("Dataset id list"))
knowledge_setting = DatasetSettingSerializer(required=True)
question_reference_address = serializers.ListField(required=True)
show_knowledge = serializers.BooleanField(required=True,
label=_("The results are displayed in the knowledge sources"))
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)
@ -52,8 +55,8 @@ def get_paragraph_list(chat_record, node_id):
'paragraph_list', []) is not None and key == node_id])
class ISearchDatasetStepNode(INode):
type = 'search-dataset-node'
class ISearchKnowledgeStepNode(INode):
type = 'search-knowledge-node'
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return SearchDatasetStepNodeSerializer
@ -73,7 +76,7 @@ class ISearchDatasetStepNode(INode):
return self.execute(**self.node_params_serializer.data, question=str(question),
exclude_paragraph_id_list=exclude_paragraph_id_list)
def execute(self, dataset_id_list, dataset_setting, question,
def execute(self, dataset_id_list, dataset_setting, question, show_knowledge,
exclude_paragraph_id_list=None,
**kwargs) -> NodeResult:
pass

View File

@ -6,4 +6,4 @@
@date2024/6/11 15:35
@desc:
"""
from .base_search_dataset_node import BaseSearchDatasetNode
from .base_search_knowledge_node import BaseSearchKnowledgeNode

View File

@ -9,26 +9,28 @@
import os
from typing import List, Dict
from django.db.models import QuerySet
from django.db import connection
from django.db.models import QuerySet
from application.flow.i_step_node import NodeResult
from application.flow.step_node.search_dataset_node.i_search_dataset_node import ISearchDatasetStepNode
from application.flow.step_node.search_knowledge_node.i_search_knowledge_node import ISearchKnowledgeStepNode
from common.config.embedding_config import VectorStore
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.util.file_util import get_file_content
from dataset.models import Document, Paragraph, DataSet
from embedding.models import SearchMode
from setting.models_provider.tools import get_model_instance_by_model_user_id
from smartdoc.conf import PROJECT_DIR
from common.utils.common import get_file_content
from knowledge.models import Document, Paragraph, Knowledge, SearchMode
from maxkb.conf import PROJECT_DIR
from models_provider.tools import get_model_instance_by_model_workspace_id
def get_embedding_id(dataset_id_list):
dataset_list = QuerySet(DataSet).filter(id__in=dataset_id_list)
if len(set([dataset.embedding_mode_id for dataset in dataset_list])) > 1:
dataset_list = QuerySet(Knowledge).filter(id__in=dataset_id_list)
if len(set([dataset.embedding_model_id for dataset in dataset_list])) > 1:
raise Exception("关联知识库的向量模型不一致,无法召回分段。")
if len(dataset_list) == 0:
raise Exception("知识库设置错误,请重新设置知识库")
return dataset_list[0].embedding_mode_id
return dataset_list[0].embedding_model_id
def get_none_result(question):
@ -44,10 +46,10 @@ def reset_title(title):
return f"#### {title}\n"
class BaseSearchDatasetNode(ISearchDatasetStepNode):
class BaseSearchKnowledgeNode(ISearchKnowledgeStepNode):
def save_context(self, details, workflow_manage):
result = details.get('paragraph_list', [])
dataset_setting = self.node_params_serializer.data.get('dataset_setting')
knowledge_setting = self.node_params_serializer.data.get('knowledge_setting')
directly_return = '\n'.join(
[f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in result if
paragraph.get('is_hit_handling_method')])
@ -57,26 +59,34 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
self.context['is_hit_handling_method_list'] = [row for row in result if row.get('is_hit_handling_method')]
self.context['data'] = '\n'.join(
[f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in
result])[0:dataset_setting.get('max_paragraph_char_number', 5000)]
result])[0:knowledge_setting.get('max_paragraph_char_number', 5000)]
self.context['directly_return'] = directly_return
def execute(self, dataset_id_list, dataset_setting, question,
def execute(self, knowledge_id_list, knowledge_setting, question, show_knowledge,
exclude_paragraph_id_list=None,
**kwargs) -> NodeResult:
self.context['question'] = question
if len(dataset_id_list) == 0:
self.context['show_knowledge'] = show_knowledge
get_knowledge_list_of_authorized = DatabaseModelManage.get_model('get_knowledge_list_of_authorized')
chat_user_type = self.workflow_manage.get_body().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(self.workflow_manage.get_body().get('chat_user_id'),
knowledge_id_list)
if len(knowledge_id_list) == 0:
return get_none_result(question)
model_id = get_embedding_id(dataset_id_list)
embedding_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'))
model_id = get_embedding_id(knowledge_id_list)
workspace_id = self.workflow_manage.get_body().get('workspace_id')
embedding_model = get_model_instance_by_model_workspace_id(model_id, workspace_id)
embedding_value = embedding_model.embed_query(question)
vector = VectorStore.get_embedding_vector()
exclude_document_id_list = [str(document.id) for document in
QuerySet(Document).filter(
dataset_id__in=dataset_id_list,
knowledge_id__in=knowledge_id_list,
is_active=False)]
embedding_list = vector.query(question, embedding_value, dataset_id_list, exclude_document_id_list,
exclude_paragraph_id_list, True, dataset_setting.get('top_n'),
dataset_setting.get('similarity'), SearchMode(dataset_setting.get('search_mode')))
embedding_list = vector.query(question, embedding_value, knowledge_id_list, exclude_document_id_list,
exclude_paragraph_id_list, True, knowledge_setting.get('top_n'),
knowledge_setting.get('similarity'),
SearchMode(knowledge_setting.get('search_mode')))
# 手动关闭数据库连接
connection.close()
if embedding_list is None:
@ -88,7 +98,7 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
'is_hit_handling_method_list': [row for row in result if row.get('is_hit_handling_method')],
'data': '\n'.join(
[f"{reset_title(paragraph.get('title', ''))}{paragraph.get('content')}" for paragraph in
result])[0:dataset_setting.get('max_paragraph_char_number', 5000)],
result])[0:knowledge_setting.get('max_paragraph_char_number', 5000)],
'directly_return': '\n'.join(
[paragraph.get('content') for paragraph in
result if
@ -111,7 +121,7 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
'update_time': paragraph.get('update_time').strftime("%Y-%m-%d %H:%M:%S"),
'create_time': paragraph.get('create_time').strftime("%Y-%m-%d %H:%M:%S"),
'id': str(paragraph.get('id')),
'dataset_id': str(paragraph.get('dataset_id')),
'knowledge_id': str(paragraph.get('knowledge_id')),
'document_id': str(paragraph.get('document_id'))
}
@ -123,7 +133,7 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
paragraph_list = native_search(QuerySet(Paragraph).filter(id__in=paragraph_id_list),
get_file_content(
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)
# 如果向量库中存在脏数据 直接删除
if len(paragraph_list) != len(paragraph_id_list):
@ -136,6 +146,7 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode):
def get_details(self, index: int, **kwargs):
return {
'name': self.node.properties.get('stepName'),
'show_knowledge': self.context.get('show_knowledge'),
'question': self.context.get('question'),
"index": index,
'run_time': self.context.get('run_time'),

View File

@ -5,16 +5,17 @@ from typing import Type
from rest_framework import serializers
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 SpeechToTextNodeSerializer(serializers.Serializer):
stt_model_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Model id")))
stt_model_id = serializers.CharField(required=True, label=_("Model id"))
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'))
audio_list = serializers.ListField(required=True, error_messages=ErrMessage.list(_("The audio file cannot be empty")))
audio_list = serializers.ListField(required=True,
label=_("The audio file cannot be empty"))
class ISpeechToTextNode(INode):
@ -28,7 +29,8 @@ class ISpeechToTextNode(INode):
self.node_params_serializer.data.get('audio_list')[1:])
for audio in res:
if 'file_id' not in audio:
raise ValueError(_("Parameter value error: The uploaded audio lacks file_id, and the audio upload fails"))
raise ValueError(
_("Parameter value error: The uploaded audio lacks file_id, and the audio upload fails"))
return self.execute(audio=res, **self.node_params_serializer.data, **self.flow_params_serializer.data)

View File

@ -1,27 +1,27 @@
# coding=utf-8
import os
import tempfile
import time
import io
from typing import List, Dict
from concurrent.futures import ThreadPoolExecutor
from django.db.models import QuerySet
from pydub import AudioSegment
from concurrent.futures import ThreadPoolExecutor
from application.flow.i_step_node import NodeResult, INode
from application.flow.i_step_node import NodeResult
from application.flow.step_node.speech_to_text_step_node.i_speech_to_text_node import ISpeechToTextNode
from common.util.common import split_and_transcribe, any_to_mp3
from dataset.models import File
from setting.models_provider.tools import get_model_instance_by_model_user_id
from common.utils.common import split_and_transcribe, any_to_mp3
from knowledge.models import File
from models_provider.tools import get_model_instance_by_model_workspace_id
class BaseSpeechToTextNode(ISpeechToTextNode):
def save_context(self, details, workflow_manage):
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, stt_model_id, chat_id, audio, **kwargs) -> NodeResult:
stt_model = get_model_instance_by_model_user_id(stt_model_id, self.flow_params_serializer.data.get('user_id'))
workspace_id = self.workflow_manage.get_body().get('workspace_id')
stt_model = get_model_instance_by_model_workspace_id(stt_model_id, workspace_id)
audio_list = audio
self.context['audio_list'] = audio
@ -30,7 +30,7 @@ class BaseSpeechToTextNode(ISpeechToTextNode):
# 根据file_name 吧文件转成mp3格式
file_format = file.file_name.split('.')[-1]
with tempfile.NamedTemporaryFile(delete=False, suffix=f'.{file_format}') as temp_file:
temp_file.write(file.get_byte().tobytes())
temp_file.write(file.get_bytes())
temp_file_path = temp_file.name
with tempfile.NamedTemporaryFile(delete=False, suffix='.mp3') as temp_amr_file:
temp_mp3_path = temp_amr_file.name

View File

@ -17,41 +17,52 @@ from application.flow.step_node.start_node.i_start_node import IStarNode
def get_default_global_variable(input_field_list: List):
return {item.get('variable'): item.get('default_value') for item in input_field_list if
item.get('default_value', None) is not None}
return {
item.get('variable') or item.get('field'): item.get('default_value')
for item in input_field_list
if item.get('default_value', None) is not None
}
def get_global_variable(node):
body = node.workflow_manage.get_body()
history_chat_record = node.flow_params_serializer.data.get('history_chat_record', [])
history_context = [{'question': chat_record.problem_text, 'answer': chat_record.answer_text} for chat_record in
history_chat_record]
chat_id = node.flow_params_serializer.data.get('chat_id')
return {'time': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 'start_time': time.time(),
'history_context': history_context, 'chat_id': str(chat_id), **node.workflow_manage.form_data}
'history_context': history_context, 'chat_id': str(chat_id), **node.workflow_manage.form_data,
'chat_user_id': body.get('chat_user_id'),
'chat_user_type': body.get('chat_user_type'),
'chat_user': body.get('chat_user')}
class BaseStartStepNode(IStarNode):
def save_context(self, details, workflow_manage):
base_node = self.workflow_manage.get_base_node()
default_global_variable = get_default_global_variable(base_node.properties.get('input_field_list', []))
workflow_variable = {**default_global_variable, **get_global_variable(self)}
default_global_variable = get_default_global_variable(base_node.properties.get('user_input_field_list', []))
default_api_global_variable = get_default_global_variable(base_node.properties.get('api_input_field_list', []))
workflow_variable = {**default_global_variable, **default_api_global_variable, **get_global_variable(self)}
self.context['question'] = details.get('question')
self.context['run_time'] = details.get('run_time')
self.context['document'] = details.get('document_list')
self.context['image'] = details.get('image_list')
self.context['audio'] = details.get('audio_list')
self.context['other'] = details.get('other_list')
self.status = details.get('status')
self.err_message = details.get('err_message')
for key, value in workflow_variable.items():
workflow_manage.context[key] = value
for item in details.get('global_fields', []):
workflow_manage.context[item.get('key')] = item.get('value')
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
pass
def execute(self, question, **kwargs) -> NodeResult:
base_node = self.workflow_manage.get_base_node()
default_global_variable = get_default_global_variable(base_node.properties.get('input_field_list', []))
workflow_variable = {**default_global_variable, **get_global_variable(self)}
default_global_variable = get_default_global_variable(base_node.properties.get('user_input_field_list', []))
default_api_global_variable = get_default_global_variable(base_node.properties.get('api_input_field_list', []))
workflow_variable = {**default_global_variable, **default_api_global_variable, **get_global_variable(self)}
"""
开始节点 初始化全局变量
"""
@ -59,7 +70,9 @@ class BaseStartStepNode(IStarNode):
'question': question,
'image': self.workflow_manage.image_list,
'document': self.workflow_manage.document_list,
'audio': self.workflow_manage.audio_list
'audio': self.workflow_manage.audio_list,
'other': self.workflow_manage.other_list,
}
return NodeResult(node_variable, workflow_variable)
@ -83,5 +96,6 @@ class BaseStartStepNode(IStarNode):
'image_list': self.context.get('image'),
'document_list': self.context.get('document'),
'audio_list': self.context.get('audio'),
'other_list': self.context.get('other'),
'global_fields': global_fields
}

View File

@ -5,18 +5,19 @@ from typing import Type
from rest_framework import serializers
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 TextToSpeechNodeSerializer(serializers.Serializer):
tts_model_id = serializers.CharField(required=True, error_messages=ErrMessage.char(_("Model id")))
tts_model_id = serializers.CharField(required=True, label=_("Model id"))
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'))
content_list = serializers.ListField(required=True, error_messages=ErrMessage.list(_("Text content")))
content_list = serializers.ListField(required=True, label=_("Text content"))
model_params_setting = serializers.DictField(required=False,
error_messages=ErrMessage.integer(_("Model parameter settings")))
label=_("Model parameter settings"))
class ITextToSpeechNode(INode):

View File

@ -4,12 +4,13 @@ import mimetypes
from django.core.files.uploadedfile import InMemoryUploadedFile
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.i_step_node import NodeResult
from application.flow.step_node.text_to_speech_step_node.i_text_to_speech_node import ITextToSpeechNode
from dataset.models import File
from dataset.serializers.file_serializers import FileSerializer
from setting.models_provider.tools import get_model_instance_by_model_user_id
from common.utils.common import _remove_empty_lines
from knowledge.models import FileSourceType
from models_provider.tools import get_model_instance_by_model_workspace_id
from oss.serializers.file import FileSerializer
from pydub import AudioSegment
def bytes_to_uploaded_file(file_bytes, file_name="generated_audio.mp3"):
@ -37,30 +38,77 @@ def bytes_to_uploaded_file(file_bytes, file_name="generated_audio.mp3"):
class BaseTextToSpeechNode(ITextToSpeechNode):
def save_context(self, details, workflow_manage):
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, tts_model_id, chat_id,
content, model_params_setting=None,
**kwargs) -> NodeResult:
self.context['content'] = content
model = get_model_instance_by_model_user_id(tts_model_id, self.flow_params_serializer.data.get('user_id'),
**model_params_setting)
audio_byte = model.text_to_speech(content)
# 需要把这个音频文件存储到数据库中
file_name = 'generated_audio.mp3'
file = bytes_to_uploaded_file(audio_byte, file_name)
max_length=1024, **kwargs) -> NodeResult:
# 分割文本为合理片段
content = _remove_empty_lines(content)
content_chunks = [content[i:i + max_length]
for i in range(0, len(content), max_length)]
# 生成并收集所有音频片段
audio_segments = []
temp_files = []
for i, chunk in enumerate(content_chunks):
self.context['content'] = chunk
workspace_id = self.workflow_manage.get_body().get('workspace_id')
model = get_model_instance_by_model_workspace_id(
tts_model_id, workspace_id, **model_params_setting)
audio_byte = model.text_to_speech(chunk)
# 保存为临时音频文件用于合并
temp_file = io.BytesIO(audio_byte)
audio_segment = AudioSegment.from_file(temp_file)
audio_segments.append(audio_segment)
temp_files.append(temp_file)
# 合并所有音频片段
combined_audio = AudioSegment.empty()
for segment in audio_segments:
combined_audio += segment
# 将合并后的音频转为字节流
output_buffer = io.BytesIO()
combined_audio.export(output_buffer, format="mp3")
combined_bytes = output_buffer.getvalue()
# 存储合并后的音频文件
file_name = 'combined_audio.mp3'
file = bytes_to_uploaded_file(combined_bytes, file_name)
application = self.workflow_manage.work_flow_post_handler.chat_info.application
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}).upload()
# 拼接一个audio标签的src属性
audio_label = f'<audio src="{file_url}" controls style = "width: 300px; height: 43px"></audio>'
file_url = FileSerializer(data={
'file': file,
'meta': meta,
'source_id': meta['application_id'],
'source_type': FileSourceType.APPLICATION.value
}).upload()
# 生成音频标签
audio_label = f'<audio src="{file_url}" controls style="width: 300px; height: 43px"></audio>'
file_id = file_url.split('/')[-1]
audio_list = [{'file_id': file_id, 'file_name': file_name, 'url': file_url}]
return NodeResult({'answer': audio_label, 'result': audio_list}, {})
# 关闭所有临时文件
for temp_file in temp_files:
temp_file.close()
output_buffer.close()
return NodeResult({
'answer': audio_label,
'result': audio_list
}, {})
def get_details(self, index: int, **kwargs):
return {

View File

@ -9,34 +9,34 @@
from typing import Type
from django.db.models import QuerySet
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.field.common import ObjectField
from common.util.field_message import ErrMessage
from function_lib.models.function import FunctionLib
from django.utils.translation import gettext_lazy as _
from tools.models.tool import Tool
class InputField(serializers.Serializer):
name = serializers.CharField(required=True, error_messages=ErrMessage.char(_('Variable Name')))
value = ObjectField(required=True, error_messages=ErrMessage.char(_("Variable Value")), model_type_list=[str, list])
name = serializers.CharField(required=True, label=_('Variable Name'))
value = ObjectField(required=True, label=_("Variable Value"), model_type_list=[str, list])
class FunctionLibNodeParamsSerializer(serializers.Serializer):
function_lib_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_('Library ID')))
tool_lib_id = serializers.UUIDField(required=True, label=_('Library ID'))
input_field_list = InputField(required=True, many=True)
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):
super().is_valid(raise_exception=True)
f_lib = QuerySet(FunctionLib).filter(id=self.data.get('function_lib_id')).first()
f_lib = QuerySet(Tool).filter(id=self.data.get('tool_lib_id')).first()
if f_lib is None:
raise Exception(_('The function has been deleted'))
class IFunctionLibNode(INode):
type = 'function-lib-node'
class IToolLibNode(INode):
type = 'tool-lib-node'
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return FunctionLibNodeParamsSerializer
@ -44,5 +44,5 @@ class IFunctionLibNode(INode):
def _run(self):
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
def execute(self, function_lib_id, input_field_list, **kwargs) -> NodeResult:
def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
pass

View File

@ -6,4 +6,4 @@
@date2024/8/8 17:48
@desc:
"""
from .base_function_lib_node import BaseFunctionLibNodeNode
from .base_tool_lib_node import BaseToolLibNodeNode

View File

@ -14,14 +14,15 @@ 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 application.flow.step_node.tool_lib_node.i_tool_lib_node import IToolLibNode
from common.database_model_manage.database_model_manage import DatabaseModelManage
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
from common.utils.rsa_util import rsa_long_decrypt
from common.utils.tool_code import ToolExecutor
from maxkb.const import CONFIG
from tools.models import Tool
function_executor = FunctionExecutor(CONFIG.get('SANDBOX'))
function_executor = ToolExecutor(CONFIG.get('SANDBOX'))
def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
@ -45,27 +46,34 @@ def get_field_value(debug_field_list, name, is_required):
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))
try:
if _type == 'int':
instance_type = int | float
elif _type == 'float':
instance_type = float | int
elif _type == 'dict':
value = json.loads(value) if isinstance(value, str) else value
instance_type = dict
elif _type == 'array':
value = json.loads(value) if isinstance(value, str) else value
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))
except:
return value
if not isinstance(value, instance_type):
raise Exception(
_('Field: {name} Type: {_type} Value: {value} Type error').format(name=name, _type=_type,
value=value))
raise Exception(_(
'Field: {name} Type: {_type} Value: {value} Type error'
).format(name=name, _type=_type, value=value))
return value
def convert_value(name: str, value, _type, is_required, source, node):
if not is_required and value is None:
if not is_required and (value is None or (isinstance(value, str) and len(value) == 0)):
return None
if not is_required and source == 'reference' and (value is None or len(value) == 0):
return None
@ -73,7 +81,8 @@ def convert_value(name: str, value, _type, is_required, source, node):
value = node.workflow_manage.get_reference_field(
value[0],
value[1:])
valid_reference_value(_type, value, name)
value = valid_reference_value(_type, value, name)
if _type == 'int':
return int(value)
if _type == 'float':
@ -101,23 +110,28 @@ def convert_value(name: str, value, _type, is_required, source, node):
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))
def valid_function(tool_lib, workspace_id):
if tool_lib is None:
raise Exception(_('Tool does not exist'))
get_authorized_tool = DatabaseModelManage.get_model("get_authorized_tool")
if tool_lib and tool_lib.workspace_id != workspace_id and get_authorized_tool is not None:
tool_lib = get_authorized_tool(QuerySet(Tool).filter(id=tool_lib.id), workspace_id).first()
if tool_lib is None:
raise Exception(_("Tool does not exist"))
if not tool_lib.is_active:
raise Exception(_("Tool is not active"))
class BaseFunctionLibNodeNode(IFunctionLibNode):
class BaseToolLibNodeNode(IToolLibNode):
def save_context(self, details, workflow_manage):
self.context['result'] = details.get('result')
self.answer_text = str(details.get('result'))
if self.node_params.get('is_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'))
def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
workspace_id = self.workflow_manage.get_body().get('workspace_id')
tool_lib = QuerySet(Tool).filter(id=tool_lib_id).first()
valid_function(tool_lib, workspace_id)
params = {field.get('name'): convert_value(field.get('name'), field.get('value'), field.get('type'),
field.get('is_required'),
field.get('source'), self)
@ -125,15 +139,15 @@ class BaseFunctionLibNodeNode(IFunctionLibNode):
[{'value': get_field_value(input_field_list, field.get('name'), field.get('is_required'),
), **field}
for field in
function_lib.input_field_list]}
tool_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
if tool_lib.init_params is not None:
all_params = json.loads(rsa_long_decrypt(tool_lib.init_params)) | params
else:
all_params = params
result = function_executor.exec_code(function_lib.code, all_params)
result = function_executor.exec_code(tool_lib.code, all_params)
return NodeResult({'result': result}, {}, _write_context=write_context)
def get_details(self, index: int, **kwargs):

View File

@ -15,23 +15,23 @@ from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.exception.app_exception import AppApiException
from common.field.common import ObjectField
from common.util.field_message import ErrMessage
from django.utils.translation import gettext_lazy as _
from rest_framework.utils.formatting import lazy_format
class InputField(serializers.Serializer):
name = serializers.CharField(required=True, error_messages=ErrMessage.char(_('Variable Name')))
is_required = serializers.BooleanField(required=True, error_messages=ErrMessage.boolean(_("Is this field required")))
type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("type")), validators=[
name = serializers.CharField(required=True, label=_('Variable Name'))
is_required = serializers.BooleanField(required=True, label=_("Is this field required"))
type = serializers.CharField(required=True, label=_("type"), validators=[
validators.RegexValidator(regex=re.compile("^string|int|dict|array|float$"),
message=_("The field only supports string|int|dict|array|float"), code=500)
])
source = serializers.CharField(required=True, error_messages=ErrMessage.char(_("source")), validators=[
source = serializers.CharField(required=True, label=_("source"), validators=[
validators.RegexValidator(regex=re.compile("^custom|reference$"),
message=_("The field only supports custom|reference"), code=500)
])
value = ObjectField(required=True, error_messages=ErrMessage.char(_("Variable Value")), model_type_list=[str, list])
value = ObjectField(required=True, label=_("Variable Value"), model_type_list=[str, list])
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)
@ -43,15 +43,16 @@ class InputField(serializers.Serializer):
class FunctionNodeParamsSerializer(serializers.Serializer):
input_field_list = InputField(required=True, many=True)
code = serializers.CharField(required=True, error_messages=ErrMessage.char(_("function")))
is_result = serializers.BooleanField(required=False, error_messages=ErrMessage.boolean(_('Whether to return content')))
code = serializers.CharField(required=True, label=_("function"))
is_result = serializers.BooleanField(required=False,
label=_('Whether to return content'))
def is_valid(self, *, raise_exception=False):
super().is_valid(raise_exception=True)
class IFunctionNode(INode):
type = 'function-node'
class IToolNode(INode):
type = 'tool-node'
def get_node_params_serializer_class(self) -> Type[serializers.Serializer]:
return FunctionNodeParamsSerializer

View File

@ -6,4 +6,4 @@
@date2024/8/13 11:19
@desc:
"""
from .base_function_node import BaseFunctionNodeNode
from .base_tool_node import BaseToolNodeNode

View File

@ -8,16 +8,16 @@
"""
import json
import time
from typing import Dict
from application.flow.i_step_node import NodeResult
from application.flow.step_node.function_node.i_function_node import IFunctionNode
from common.exception.app_exception import AppApiException
from common.util.function_code import FunctionExecutor
from smartdoc.const import CONFIG
from django.utils.translation import gettext as _
function_executor = FunctionExecutor(CONFIG.get('SANDBOX'))
from application.flow.i_step_node import NodeResult
from application.flow.step_node.tool_node.i_tool_node import IToolNode
from common.utils.tool_code import ToolExecutor
from maxkb.const import CONFIG
function_executor = ToolExecutor(CONFIG.get('SANDBOX'))
def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
@ -32,30 +32,41 @@ def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
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(500, f'字段:{name}类型:{_type} 不支持的类型')
try:
if _type == 'int':
instance_type = int | float
elif _type == 'float':
instance_type = float | int
elif _type == 'dict':
value = json.loads(value) if isinstance(value, str) else value
instance_type = dict
elif _type == 'array':
value = json.loads(value) if isinstance(value, str) else value
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))
except:
return value
if not isinstance(value, instance_type):
raise Exception(f'字段:{name}类型:{_type}值:{value}类型错误')
raise Exception(_(
'Field: {name} Type: {_type} Value: {value} Type error'
).format(name=name, _type=_type, value=value))
return value
def convert_value(name: str, value, _type, is_required, source, node):
if not is_required and value is None:
if not is_required and (value is None or (isinstance(value, str) and 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)
value = valid_reference_value(_type, value, name)
if _type == 'int':
return int(value)
if _type == 'float':
@ -81,10 +92,11 @@ def convert_value(name: str, value, _type, is_required, source, node):
raise Exception(f'字段:{name}类型:{_type}值:{value}类型错误')
class BaseFunctionNodeNode(IFunctionNode):
class BaseToolNodeNode(IToolNode):
def save_context(self, details, workflow_manage):
self.context['result'] = details.get('result')
self.answer_text = str(details.get('result'))
if self.node_params.get('is_result', False):
self.answer_text = str(details.get('result'))
def execute(self, input_field_list, code, **kwargs) -> NodeResult:
params = {field.get('name'): convert_value(field.get('name'), field.get('value'), field.get('type'),

View File

@ -6,12 +6,11 @@ from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from application.flow.i_step_node import INode, NodeResult
from common.util.field_message import ErrMessage
class VariableAssignNodeParamsSerializer(serializers.Serializer):
variable_list = serializers.ListField(required=True,
error_messages=ErrMessage.list(_("Reference Field")))
label=_("Reference Field"))
class IVariableAssignNode(INode):

View File

@ -13,7 +13,7 @@ from django.http import StreamingHttpResponse
from langchain_core.messages import BaseMessageChunk, BaseMessage
from application.flow.i_step_node import WorkFlowPostHandler
from common.response import result
from common.result import result
class Reasoning:

View File

@ -15,165 +15,21 @@ from functools import reduce
from typing import List, Dict
from django.db import close_old_connections
from django.db.models import QuerySet
from django.utils import translation
from django.utils.translation import get_language
from django.utils.translation import gettext as _
from langchain_core.prompts import PromptTemplate
from rest_framework import status
from rest_framework.exceptions import ErrorDetail, ValidationError
from application.flow import tools
from application.flow.common import Workflow
from application.flow.i_step_node import INode, WorkFlowPostHandler, NodeResult
from application.flow.step_node import get_node
from common.exception.app_exception import AppApiException
from common.handle.base_to_response import BaseToResponse
from common.handle.impl.response.system_to_response import SystemToResponse
from function_lib.models.function import FunctionLib
from setting.models import Model
from setting.models_provider import get_model_credential
executor = ThreadPoolExecutor(max_workers=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))
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']
class Flow:
def __init__(self, nodes: List[Node], edges: List[Edge]):
self.nodes = nodes
self.edges = edges
@staticmethod
def new_instance(flow_obj: Dict):
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 Flow(nodes, edges)
def get_start_node(self):
start_node_list = [node for node in self.nodes if node.id == 'start-node']
return start_node_list[0]
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()
@staticmethod
def is_valid_node_params(node: Node):
get_node(node.type)(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 get_next_nodes(self, node: Node):
edge_list = [edge for edge in self.edges if edge.sourceNodeId == node.id]
node_list = reduce(lambda x, y: [*x, *y],
[[node for node in self.nodes if node.id == edge.targetNodeId] for edge in edge_list],
[])
if len(node_list) == 0 and not end_nodes.__contains__(node.type):
raise AppApiException(500,
_("The next node that does not exist"))
return node_list
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(FunctionLib).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'))
class NodeResultFuture:
def __init__(self, r, e, status=200):
self.r = r
@ -234,10 +90,11 @@ class NodeChunkManage:
class WorkflowManage:
def __init__(self, flow: Flow, params, work_flow_post_handler: WorkFlowPostHandler,
def __init__(self, flow: Workflow, params, work_flow_post_handler: WorkFlowPostHandler,
base_to_response: BaseToResponse = SystemToResponse(), form_data=None, image_list=None,
document_list=None,
audio_list=None,
other_list=None,
start_node_id=None,
start_node_data=None, chat_record=None, child_node=None):
if form_data is None:
@ -248,12 +105,15 @@ class WorkflowManage:
document_list = []
if audio_list is None:
audio_list = []
if other_list is None:
other_list = []
self.start_node_id = start_node_id
self.start_node = None
self.form_data = form_data
self.image_list = image_list
self.document_list = document_list
self.audio_list = audio_list
self.other_list = other_list
self.params = params
self.flow = flow
self.context = {}
@ -294,8 +154,8 @@ class WorkflowManage:
if global_fields is not None:
for global_field in global_fields:
global_field_list.append({**global_field, 'node_id': node_id, 'node_name': node_name})
field_list.sort(key=lambda f: len(f.get('node_name')), reverse=True)
global_field_list.sort(key=lambda f: len(f.get('node_name')), reverse=True)
field_list.sort(key=lambda f: len(f.get('node_name') + f.get('value')), reverse=True)
global_field_list.sort(key=lambda f: len(f.get('node_name') + f.get('value')), reverse=True)
self.field_list = field_list
self.global_field_list = global_field_list
@ -363,9 +223,7 @@ class WorkflowManage:
'\n\n'.join([a.get('content') for a in answer]) for answer in
answer_text_list)
answer_list = reduce(lambda pre, _n: [*pre, *_n], answer_text_list, [])
self.work_flow_post_handler.handler(self.params['chat_id'], self.params['chat_record_id'],
answer_text,
self)
self.work_flow_post_handler.handler(self)
return self.base_to_response.to_block_response(self.params['chat_id'],
self.params['chat_record_id'], answer_text, True
, message_tokens, answer_tokens,
@ -380,6 +238,9 @@ class WorkflowManage:
self.run_chain_async(current_node, node_result_future, language)
return tools.to_stream_response_simple(self.await_result())
def get_body(self):
return self.params
def is_run(self, timeout=0.5):
future_list_len = len(self.future_list)
try:
@ -416,9 +277,7 @@ class WorkflowManage:
'message_tokens' in row and row.get('message_tokens') is not None])
answer_tokens = sum([row.get('answer_tokens') for row in details.values() if
'answer_tokens' in row and row.get('answer_tokens') is not None])
self.work_flow_post_handler.handler(self.params['chat_id'], self.params['chat_record_id'],
self.answer,
self)
self.work_flow_post_handler.handler(self)
yield self.base_to_response.to_stream_chunk_response(self.params['chat_id'],
self.params['chat_record_id'],
'',
@ -595,15 +454,14 @@ class WorkflowManage:
"""
是否有下一个可运行的节点
"""
if node_result is not None and node_result.is_assertion_result():
for edge in self.flow.edges:
next_edge_node_list = self.flow.get_next_edge_nodes(current_node.id) or []
for next_edge_node in next_edge_node_list:
if node_result is not None and node_result.is_assertion_result():
edge = next_edge_node.edge
if (edge.sourceNodeId == current_node.id and
f"{edge.sourceNodeId}_{node_result.node_variable.get('branch_id')}_right" == edge.sourceAnchorId):
return True
else:
for edge in self.flow.edges:
if edge.sourceNodeId == current_node.id:
return True
return len(next_edge_node_list) > 0
def has_next_node(self, node_result: NodeResult | None):
"""
@ -653,26 +511,6 @@ class WorkflowManage:
return [[]]
return [[item.to_dict() for item in r] for r in result]
def get_next_node(self):
"""
获取下一个可运行的所有节点
"""
if self.current_node is None:
node = self.get_start_node()
node_instance = get_node(node.type)(node, self.params, self)
return node_instance
if self.current_result is not None and self.current_result.is_assertion_result():
for edge in self.flow.edges:
if (edge.sourceNodeId == self.current_node.id and
f"{edge.sourceNodeId}_{self.current_result.node_variable.get('branch_id')}_right" == edge.sourceAnchorId):
return self.get_node_cls_by_id(edge.targetNodeId)
else:
for edge in self.flow.edges:
if edge.sourceNodeId == self.current_node.id:
return self.get_node_cls_by_id(edge.targetNodeId)
return None
@staticmethod
def dependent_node(up_node_id, node):
if not node.node_chunk.is_end():
@ -709,14 +547,14 @@ class WorkflowManage:
if current_node_result.is_interrupt_exec(current_node):
return []
node_list = []
next_edge_node_list = self.flow.get_next_edge_nodes(current_node.id) or []
if current_node_result is not None and current_node_result.is_assertion_result():
for edge in self.flow.edges:
if (edge.sourceNodeId == current_node.id and
for edge_node in next_edge_node_list:
edge = edge_node.edge
next_node = edge_node.node
if (
f"{edge.sourceNodeId}_{current_node_result.node_variable.get('branch_id')}_right" == edge.sourceAnchorId):
next_node = [node for node in self.flow.nodes if node.id == edge.targetNodeId]
if len(next_node) == 0:
continue
if next_node[0].properties.get('condition', "AND") == 'AND':
if next_node.properties.get('condition', "AND") == 'AND':
if self.dependent_node_been_executed(edge.targetNodeId):
node_list.append(
self.get_node_cls_by_id(edge.targetNodeId,
@ -726,20 +564,19 @@ class WorkflowManage:
self.get_node_cls_by_id(edge.targetNodeId,
[*current_node.up_node_id_list, current_node.node.id]))
else:
for edge in self.flow.edges:
if edge.sourceNodeId == current_node.id:
next_node = [node for node in self.flow.nodes if node.id == edge.targetNodeId]
if len(next_node) == 0:
continue
if next_node[0].properties.get('condition', "AND") == 'AND':
if self.dependent_node_been_executed(edge.targetNodeId):
node_list.append(
self.get_node_cls_by_id(edge.targetNodeId,
[*current_node.up_node_id_list, current_node.node.id]))
else:
for edge_node in next_edge_node_list:
edge = edge_node.edge
next_node = edge_node.node
if next_node.properties.get('condition', "AND") == 'AND':
if self.dependent_node_been_executed(edge.targetNodeId):
node_list.append(
self.get_node_cls_by_id(edge.targetNodeId,
[*current_node.up_node_id_list, current_node.node.id]))
else:
node_list.append(
self.get_node_cls_by_id(edge.targetNodeId,
[*current_node.up_node_id_list, current_node.node.id]))
return node_list
def get_reference_field(self, node_id: str, fields: List[str]):

View File

@ -1,10 +1,20 @@
# Generated by Django 4.1.10 on 2024-03-18 16:02
# Generated by Django 5.2.4 on 2025-07-14 11:45
from django.db.models import QuerySet
import application.models.application
import application.models.application_chat
import common.encoder.encoder
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import uuid
import mptt.fields
import uuid_utils.compat
from django.db import migrations, models
def insert_default_data(apps, schema_editor):
# 创建一个根模块(没有父节点)
QuerySet(application.models.application.ApplicationFolder).create(id='default', name='根目录',
user_id='f0dd8f71-e4ee-11ee-8c84-a8a1595801ab', workspace_id='default')
class Migration(migrations.Migration):
@ -12,8 +22,8 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('dataset', '0001_initial'),
('setting', '0001_initial'),
('knowledge', '0001_initial'),
('models_provider', '0001_initial'),
('users', '0001_initial'),
]
@ -21,65 +31,196 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Application',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('name', models.CharField(max_length=128, verbose_name='应用名称')),
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('workspace_id', models.CharField(db_index=True, default='default', max_length=64, verbose_name='工作空间id')),
('is_publish', models.BooleanField(default=False, verbose_name='是否发布')),
('name', models.CharField(db_index=True, max_length=128, verbose_name='应用名称')),
('desc', models.CharField(default='', max_length=512, verbose_name='引用描述')),
('prologue', models.CharField(default='', max_length=1024, verbose_name='开场白')),
('prologue', models.CharField(default='', max_length=40960, verbose_name='开场白')),
('dialogue_number', models.IntegerField(default=0, verbose_name='会话数量')),
('dataset_setting', models.JSONField(default=application.models.application.get_dataset_setting_dict, verbose_name='数据集参数设置')),
('knowledge_setting', models.JSONField(default=application.models.application.get_dataset_setting_dict, verbose_name='数据集参数设置')),
('model_setting', models.JSONField(default=application.models.application.get_model_setting_dict, verbose_name='模型参数相关设置')),
('model_params_setting', models.JSONField(default=dict, verbose_name='模型参数相关设置')),
('tts_model_params_setting', models.JSONField(default=dict, verbose_name='模型参数相关设置')),
('problem_optimization', models.BooleanField(default=False, verbose_name='问题优化')),
('model', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to='setting.model')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='users.user')),
('icon', models.CharField(default='./favicon.ico', max_length=256, verbose_name='应用icon')),
('work_flow', models.JSONField(default=dict, verbose_name='工作流数据')),
('type', models.CharField(choices=[('SIMPLE', '简易'), ('WORK_FLOW', '工作流')], default='SIMPLE', max_length=256, verbose_name='应用类型')),
('problem_optimization_prompt', models.CharField(blank=True, default='()里面是用户问题,根据上下文回答揣测用户问题({question}) 要求: 输出一个补全问题,并且放在<data></data>标签中', max_length=102400, null=True, verbose_name='问题优化提示词')),
('tts_model_enable', models.BooleanField(default=False, verbose_name='语音合成模型是否启用')),
('stt_model_enable', models.BooleanField(default=False, verbose_name='语音识别模型是否启用')),
('tts_type', models.CharField(default='BROWSER', max_length=20, verbose_name='语音播放类型')),
('tts_autoplay', models.BooleanField(default=False, verbose_name='自动播放')),
('stt_autosend', models.BooleanField(default=False, verbose_name='自动发送')),
('clean_time', models.IntegerField(default=180, verbose_name='清理时间')),
('publish_time', models.DateTimeField(blank=True, default=None, null=True, verbose_name='发布时间')),
('file_upload_enable', models.BooleanField(default=False, verbose_name='文件上传是否启用')),
('file_upload_setting', models.JSONField(default=dict, verbose_name='文件上传相关设置')),
('model', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to='models_provider.model')),
('stt_model', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stt_model_id', to='models_provider.model')),
('tts_model', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tts_model_id', to='models_provider.model')),
('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.user')),
],
options={
'db_table': 'application',
},
),
migrations.CreateModel(
name='ApplicationAccessToken',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('application', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='application.application', verbose_name='应用id')),
('access_token', models.CharField(max_length=128, unique=True, verbose_name='用户公开访问 认证token')),
('is_active', models.BooleanField(default=True, verbose_name='是否开启公开访问')),
('access_num', models.IntegerField(default=100, verbose_name='访问次数')),
('white_active', models.BooleanField(default=False, verbose_name='是否开启白名单')),
('white_list', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=128), default=list, size=None, verbose_name='白名单列表')),
('show_source', models.BooleanField(default=False, verbose_name='是否显示知识来源')),
('show_exec', models.BooleanField(default=False, verbose_name='是否显示执行详情')),
('authentication', models.BooleanField(default=False, verbose_name='是否需要认证')),
('authentication_value', models.JSONField(default=dict, verbose_name='认证的值')),
('language', models.CharField(default=None, max_length=10, null=True, verbose_name='语言')),
],
options={
'db_table': 'application_access_token',
},
),
migrations.CreateModel(
name='ApplicationApiKey',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('secret_key', models.CharField(max_length=1024, unique=True, verbose_name='秘钥')),
('workspace_id', models.CharField(db_index=True, default='default', max_length=64, verbose_name='工作空间id')),
('is_active', models.BooleanField(default=True, verbose_name='是否开启')),
('allow_cross_domain', models.BooleanField(default=False, verbose_name='是否允许跨域')),
('cross_domain_list', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=128), default=list, size=None, verbose_name='跨域列表')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application', verbose_name='应用id')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.user', verbose_name='用户id')),
],
options={
'db_table': 'application_api_key',
},
),
migrations.CreateModel(
name='ApplicationFolder',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.CharField(editable=False, max_length=64, primary_key=True, serialize=False, verbose_name='主键id')),
('name', models.CharField(db_index=True, max_length=64, verbose_name='文件夹名称')),
('desc', models.CharField(blank=True, max_length=200, null=True, verbose_name='描述')),
('workspace_id', models.CharField(db_index=True, default='default', max_length=64, verbose_name='工作空间id')),
('lft', models.PositiveIntegerField(editable=False)),
('rght', models.PositiveIntegerField(editable=False)),
('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
('level', models.PositiveIntegerField(editable=False)),
('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='children', to='application.applicationfolder')),
('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.user')),
],
options={
'db_table': 'application_folder',
},
),
migrations.AddField(
model_name='application',
name='folder',
field=models.ForeignKey(default='default', on_delete=django.db.models.deletion.DO_NOTHING, to='application.applicationfolder', verbose_name='文件夹id'),
),
migrations.CreateModel(
name='ApplicationKnowledgeMapping',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='application.application')),
('knowledge', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='knowledge.knowledge')),
],
options={
'db_table': 'application_knowledge_mapping',
},
),
migrations.CreateModel(
name='ApplicationVersion',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('name', models.CharField(default='', max_length=128, verbose_name='版本名称')),
('publish_user_id', models.UUIDField(default=None, null=True, verbose_name='发布者id')),
('publish_user_name', models.CharField(default='', max_length=128, verbose_name='发布者名称')),
('workspace_id', models.CharField(db_index=True, default='default', max_length=64, verbose_name='工作空间id')),
('application_name', models.CharField(max_length=128, verbose_name='应用名称')),
('desc', models.CharField(default='', max_length=512, verbose_name='引用描述')),
('prologue', models.CharField(default='', max_length=40960, verbose_name='开场白')),
('dialogue_number', models.IntegerField(default=0, verbose_name='会话数量')),
('model_id', models.UUIDField(blank=True, null=True, verbose_name='大语言模型')),
('knowledge_setting', models.JSONField(default=application.models.application.get_dataset_setting_dict, verbose_name='数据集参数设置')),
('model_setting', models.JSONField(default=application.models.application.get_model_setting_dict, verbose_name='模型参数相关设置')),
('model_params_setting', models.JSONField(default=dict, verbose_name='模型参数相关设置')),
('tts_model_params_setting', models.JSONField(default=dict, verbose_name='模型参数相关设置')),
('problem_optimization', models.BooleanField(default=False, verbose_name='问题优化')),
('icon', models.CharField(default='./favicon.ico', max_length=256, verbose_name='应用icon')),
('work_flow', models.JSONField(default=dict, verbose_name='工作流数据')),
('type', models.CharField(choices=[('SIMPLE', '简易'), ('WORK_FLOW', '工作流')], default='SIMPLE', max_length=256, verbose_name='应用类型')),
('problem_optimization_prompt', models.CharField(blank=True, default='()里面是用户问题,根据上下文回答揣测用户问题({question}) 要求: 输出一个补全问题,并且放在<data></data>标签中', max_length=102400, null=True, verbose_name='问题优化提示词')),
('tts_model_id', models.UUIDField(blank=True, null=True, verbose_name='文本转语音模型id')),
('stt_model_id', models.UUIDField(blank=True, null=True, verbose_name='语音转文本模型id')),
('tts_model_enable', models.BooleanField(default=False, verbose_name='语音合成模型是否启用')),
('stt_model_enable', models.BooleanField(default=False, verbose_name='语音识别模型是否启用')),
('tts_type', models.CharField(default='BROWSER', max_length=20, verbose_name='语音播放类型')),
('tts_autoplay', models.BooleanField(default=False, verbose_name='自动播放')),
('stt_autosend', models.BooleanField(default=False, verbose_name='自动发送')),
('clean_time', models.IntegerField(default=180, verbose_name='清理时间')),
('file_upload_enable', models.BooleanField(default=False, verbose_name='文件上传是否启用')),
('file_upload_setting', models.JSONField(default=dict, verbose_name='文件上传相关设置')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application')),
('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to='users.user')),
],
options={
'db_table': 'application_version',
},
),
migrations.CreateModel(
name='Chat',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('abstract', models.CharField(max_length=256, verbose_name='摘要')),
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('abstract', models.CharField(max_length=1024, verbose_name='摘要')),
('chat_user_id', models.CharField(default=None, null=True, verbose_name='对话用户id')),
('chat_user_type', models.CharField(choices=[('ANONYMOUS_USER', '匿名用户'), ('CHAT_USER', '对话用户'), ('SYSTEM_API_KEY', '系统API_KEY'), ('APPLICATION_API_KEY', '应用API_KEY'), ('PLATFORM_USER', '平台用户')], default='ANONYMOUS_USER', max_length=64, verbose_name='客户端类型')),
('is_deleted', models.BooleanField(default=False, verbose_name='逻辑删除')),
('asker', models.JSONField(default=application.models.application_chat.default_asker, encoder=common.encoder.encoder.SystemEncoder, verbose_name='访问者')),
('meta', models.JSONField(default=dict, verbose_name='元数据')),
('star_num', models.IntegerField(default=0, verbose_name='点赞数量')),
('trample_num', models.IntegerField(default=0, verbose_name='点踩数量')),
('chat_record_count', models.IntegerField(default=0, verbose_name='对话次数')),
('mark_sum', models.IntegerField(default=0, verbose_name='标记数量')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application')),
],
options={
'db_table': 'application_chat',
},
),
migrations.CreateModel(
name='ApplicationAccessToken',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('application', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='application.application', verbose_name='应用id')),
('access_token', models.CharField(max_length=128, unique=True, verbose_name='用户公开访问 认证token')),
('is_active', models.BooleanField(default=True, verbose_name='是否开启公开访问')),
('access_num', models.IntegerField(default=100, verbose_name='访问次数')),
('white_active', models.BooleanField(default=False, verbose_name='是否开启白名单')),
('white_list', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=128), default=list, size=None, verbose_name='白名单列表')),
],
options={
'db_table': 'application_access_token',
},
),
migrations.CreateModel(
name='ChatRecord',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('vote_status', models.CharField(choices=[('-1', '未投票'), ('0', '赞同'), ('1', '反对')], default='-1', max_length=10, verbose_name='投票')),
('problem_text', models.CharField(max_length=1024, verbose_name='问题')),
('answer_text', models.CharField(max_length=4096, verbose_name='答案')),
('problem_text', models.CharField(max_length=10240, verbose_name='问题')),
('answer_text', models.CharField(max_length=40960, verbose_name='答案')),
('answer_text_list', django.contrib.postgres.fields.ArrayField(base_field=models.JSONField(), default=list, size=None, verbose_name='改进标注列表')),
('message_tokens', models.IntegerField(default=0, verbose_name='请求token数量')),
('answer_tokens', models.IntegerField(default=0, verbose_name='响应token数量')),
('const', models.IntegerField(default=0, verbose_name='总费用')),
('details', models.JSONField(default=dict, verbose_name='对话详情')),
('details', models.JSONField(default=dict, encoder=common.encoder.encoder.SystemEncoder, verbose_name='对话详情')),
('improve_paragraph_id_list', django.contrib.postgres.fields.ArrayField(base_field=models.UUIDField(blank=True), default=list, size=None, verbose_name='改进标注列表')),
('run_time', models.FloatField(default=0, verbose_name='运行时长')),
('index', models.IntegerField(verbose_name='对话下标')),
@ -90,45 +231,21 @@ class Migration(migrations.Migration):
},
),
migrations.CreateModel(
name='ApplicationPublicAccessClient',
name='ApplicationChatUserStats',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(primary_key=True, serialize=False, verbose_name='公共访问链接客户端id')),
('create_time', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, db_index=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('chat_user_id', models.UUIDField(default=uuid_utils.compat.uuid7, verbose_name='对话用户id')),
('chat_user_type', models.CharField(choices=[('ANONYMOUS_USER', '匿名用户'), ('CHAT_USER', '对话用户'), ('SYSTEM_API_KEY', '系统API_KEY'), ('APPLICATION_API_KEY', '应用API_KEY'), ('PLATFORM_USER', '平台用户')], default='ANONYMOUS_USER', max_length=64, verbose_name='对话用户类型')),
('access_num', models.IntegerField(default=0, verbose_name='访问总次数次数')),
('intraday_access_num', models.IntegerField(default=0, verbose_name='当日访问次数')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application', verbose_name='应用id')),
],
options={
'db_table': 'application_public_access_client',
},
),
migrations.CreateModel(
name='ApplicationDatasetMapping',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application')),
('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dataset.dataset')),
],
options={
'db_table': 'application_dataset_mapping',
},
),
migrations.CreateModel(
name='ApplicationApiKey',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('secret_key', models.CharField(max_length=1024, unique=True, verbose_name='秘钥')),
('is_active', models.BooleanField(default=True, verbose_name='是否开启')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application', verbose_name='应用id')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.user', verbose_name='用户id')),
],
options={
'db_table': 'application_api_key',
'db_table': 'application_chat_user_stats',
'indexes': [models.Index(fields=['application_id', 'chat_user_id'], name='application_applica_1652ba_idx')],
},
),
migrations.RunPython(insert_default_data)
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.1.13 on 2024-03-28 13:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='chat',
name='client_id',
field=models.UUIDField(default=None, null=True, verbose_name='客户端id'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.1.13 on 2024-04-23 11:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0002_chat_client_id'),
]
operations = [
migrations.AddField(
model_name='application',
name='icon',
field=models.CharField(default='/ui/favicon.ico', max_length=256, verbose_name='应用icon'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.1.13 on 2024-04-25 11:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0003_application_icon'),
]
operations = [
migrations.AddField(
model_name='applicationaccesstoken',
name='show_source',
field=models.BooleanField(default=False, verbose_name='是否显示知识来源'),
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 4.1.13 on 2024-04-29 13:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0004_applicationaccesstoken_show_source'),
]
operations = [
migrations.AlterField(
model_name='chat',
name='abstract',
field=models.CharField(max_length=1024, verbose_name='摘要'),
),
migrations.AlterField(
model_name='chatrecord',
name='answer_text',
field=models.CharField(max_length=40960, verbose_name='答案'),
),
]

View File

@ -1,24 +0,0 @@
# Generated by Django 4.1.13 on 2024-05-08 13:57
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0005_alter_chat_abstract_alter_chatrecord_answer_text'),
]
operations = [
migrations.AddField(
model_name='applicationapikey',
name='allow_cross_domain',
field=models.BooleanField(default=False, verbose_name='是否允许跨域'),
),
migrations.AddField(
model_name='applicationapikey',
name='cross_domain_list',
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=128), default=list, size=None, verbose_name='跨域列表'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.1.13 on 2024-05-24 11:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0006_applicationapikey_allow_cross_domain_and_more'),
]
operations = [
migrations.AlterField(
model_name='application',
name='prologue',
field=models.CharField(default='', max_length=4096, verbose_name='开场白'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.1.13 on 2024-06-13 11:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0007_alter_application_prologue'),
]
operations = [
migrations.AddField(
model_name='chat',
name='is_deleted',
field=models.BooleanField(default=False, verbose_name=''),
),
]

View File

@ -1,38 +0,0 @@
# Generated by Django 4.1.13 on 2024-06-25 16:30
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('application', '0008_chat_is_deleted'),
]
operations = [
migrations.AddField(
model_name='application',
name='type',
field=models.CharField(choices=[('SIMPLE', '简易'), ('WORK_FLOW', '工作流')], default='SIMPLE', max_length=256, verbose_name='应用类型'),
),
migrations.AddField(
model_name='application',
name='work_flow',
field=models.JSONField(default=dict, verbose_name='工作流数据'),
),
migrations.CreateModel(
name='WorkFlowVersion',
fields=[
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
('work_flow', models.JSONField(default=dict, verbose_name='工作流数据')),
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='application.application')),
],
options={
'db_table': 'application_work_flow_version',
},
),
]

View File

@ -1,19 +0,0 @@
# Generated by Django 4.2.13 on 2024-07-15 15:52
from django.db import migrations, models
import common.encoder.encoder
class Migration(migrations.Migration):
dependencies = [
('application', '0009_application_type_application_work_flow_and_more'),
]
operations = [
migrations.AlterField(
model_name='chatrecord',
name='details',
field=models.JSONField(default=dict, encoder=common.encoder.encoder.SystemEncoder, verbose_name='对话详情'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2024-08-23 14:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0010_alter_chatrecord_details'),
]
operations = [
migrations.AddField(
model_name='application',
name='model_params_setting',
field=models.JSONField(default=dict, verbose_name='模型参数相关设置'),
),
]

View File

@ -1,35 +0,0 @@
# Generated by Django 4.2.15 on 2024-09-05 14:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('setting', '0006_alter_model_status'),
('application', '0011_application_model_params_setting'),
]
operations = [
migrations.AddField(
model_name='application',
name='stt_model',
field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stt_model_id', to='setting.model'),
),
migrations.AddField(
model_name='application',
name='stt_model_enable',
field=models.BooleanField(default=False, verbose_name='语音识别模型是否启用'),
),
migrations.AddField(
model_name='application',
name='tts_model',
field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='tts_model_id', to='setting.model'),
),
migrations.AddField(
model_name='application',
name='tts_model_enable',
field=models.BooleanField(default=False, verbose_name='语音合成模型是否启用'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2024-09-12 11:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0012_application_stt_model_application_stt_model_enable_and_more'),
]
operations = [
migrations.AddField(
model_name='application',
name='tts_type',
field=models.CharField(default='BROWSER', max_length=20, verbose_name='语音播放类型'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2024-09-13 18:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0013_application_tts_type'),
]
operations = [
migrations.AddField(
model_name='application',
name='problem_optimization_prompt',
field=models.CharField(blank=True, default='()里面是用户问题,根据上下文回答揣测用户问题({question}) 要求: 输出一个补全问题,并且放在<data></data>标签中', max_length=102400, null=True, verbose_name='问题优化提示词'),
),
]

View File

@ -1,63 +0,0 @@
# Generated by Django 4.2.15 on 2024-09-18 16:14
import logging
import psycopg2
from django.db import migrations
from psycopg2 import extensions
from smartdoc.const import CONFIG
def get_connect(db_name):
conn_params = {
"dbname": db_name,
"user": CONFIG.get('DB_USER'),
"password": CONFIG.get('DB_PASSWORD'),
"host": CONFIG.get('DB_HOST'),
"port": CONFIG.get('DB_PORT')
}
# 建立连接
connect = psycopg2.connect(**conn_params)
return connect
def sql_execute(conn, reindex_sql: str, alter_database_sql: str):
"""
执行一条sql
@param reindex_sql:
@param conn:
@param alter_database_sql:
"""
conn.set_isolation_level(extensions.ISOLATION_LEVEL_AUTOCOMMIT)
with conn.cursor() as cursor:
cursor.execute(reindex_sql, [])
cursor.execute(alter_database_sql, [])
cursor.close()
def re_index(apps, schema_editor):
app_db_name = CONFIG.get('DB_NAME')
try:
re_index_database(app_db_name)
except Exception as e:
logging.error(f'reindex database {app_db_name}发送错误:{str(e)}')
try:
re_index_database('root')
except Exception as e:
logging.error(f'reindex database root 发送错误:{str(e)}')
def re_index_database(db_name):
db_conn = get_connect(db_name)
sql_execute(db_conn, f'REINDEX DATABASE "{db_name}";', f'ALTER DATABASE "{db_name}" REFRESH COLLATION VERSION;')
db_conn.close()
class Migration(migrations.Migration):
dependencies = [
('application', '0014_application_problem_optimization_prompt'),
]
operations = [
migrations.RunPython(re_index, atomic=False)
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2024-09-26 13:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0015_re_database_index'),
]
operations = [
migrations.AlterField(
model_name='chatrecord',
name='problem_text',
field=models.CharField(max_length=10240, verbose_name='问题'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2024-10-16 13:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0016_alter_chatrecord_problem_text'),
]
operations = [
migrations.AddField(
model_name='application',
name='tts_model_params_setting',
field=models.JSONField(default=dict, verbose_name='模型参数相关设置'),
),
]

View File

@ -1,38 +0,0 @@
# Generated by Django 4.2.15 on 2024-10-16 15:17
from django.db import migrations, models
sql = """
UPDATE "public".application_work_flow_version
SET "name" = TO_CHAR(create_time, 'YYYY-MM-DD HH24:MI:SS');
"""
class Migration(migrations.Migration):
dependencies = [
('application', '0017_application_tts_model_params_setting'),
]
operations = [
migrations.AddField(
model_name='application',
name='clean_time',
field=models.IntegerField(default=180, verbose_name='清理时间'),
),
migrations.AddField(
model_name='workflowversion',
name='name',
field=models.CharField(default='', max_length=128, verbose_name='版本名称'),
),
migrations.RunSQL(sql),
migrations.AddField(
model_name='workflowversion',
name='publish_user_id',
field=models.UUIDField(default=None, null=True, verbose_name='发布者id'),
),
migrations.AddField(
model_name='workflowversion',
name='publish_user_name',
field=models.CharField(default='', max_length=128, verbose_name='发布者名称'),
),
]

View File

@ -1,34 +0,0 @@
# Generated by Django 4.2.15 on 2024-11-13 10:13
import django.contrib.postgres.fields
from django.db import migrations, models
sql = """
UPDATE application_chat_record
SET answer_text_list=ARRAY[jsonb_build_object('content',answer_text)]
"""
class Migration(migrations.Migration):
dependencies = [
('application', '0018_workflowversion_name'),
]
operations = [
migrations.AddField(
model_name='application',
name='file_upload_enable',
field=models.BooleanField(default=False, verbose_name='文件上传是否启用'),
),
migrations.AddField(
model_name='application',
name='file_upload_setting',
field=models.JSONField(default=dict, verbose_name='文件上传相关设置'),
),
migrations.AddField(
model_name='chatrecord',
name='answer_text_list',
field=django.contrib.postgres.fields.ArrayField(base_field=models.JSONField(), default=list, size=None, verbose_name='改进标注列表')
),
migrations.RunSQL(sql)
]

View File

@ -1,22 +0,0 @@
from django.db import migrations, connection
batch_update_update_time = """
UPDATE application_chat ac
SET update_time = acr_max.max_update_time
FROM (
SELECT chat_id, MAX(update_time) AS max_update_time
FROM application_chat_record
GROUP BY chat_id
) acr_max
WHERE ac.id = acr_max.chat_id;
"""
class Migration(migrations.Migration):
dependencies = [
('application', '0019_application_file_upload_enable_and_more'),
]
operations = [
migrations.RunSQL(batch_update_update_time),
]

View File

@ -1,34 +0,0 @@
# Generated by Django 4.2.15 on 2024-12-27 18:42
from django.db import migrations, models
import uuid
run_sql = """
UPDATE application_public_access_client
SET client_id="id"
"""
class Migration(migrations.Migration):
dependencies = [
('application', '0020_application_record_update_time'),
]
operations = [
migrations.AddField(
model_name='applicationpublicaccessclient',
name='client_id',
field=models.UUIDField(default=uuid.uuid1, verbose_name='公共访问链接客户端id'),
),
migrations.AlterField(
model_name='applicationpublicaccessclient',
name='id',
field=models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False,
verbose_name='主键id'),
),
migrations.AddIndex(
model_name='applicationpublicaccessclient',
index=models.Index(fields=['client_id'], name='application_client__4de9af_idx'),
),
migrations.RunSQL(run_sql)
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2025-01-03 14:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0021_applicationpublicaccessclient_client_id_and_more'),
]
operations = [
migrations.AddField(
model_name='application',
name='tts_autoplay',
field=models.BooleanField(default=False, verbose_name='自动播放'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.15 on 2025-01-06 10:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0022_application_tts_autoplay'),
]
operations = [
migrations.AddField(
model_name='application',
name='stt_autosend',
field=models.BooleanField(default=False, verbose_name='自动发送'),
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 4.2.15 on 2025-01-20 06:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0023_application_stt_autosend'),
]
operations = [
migrations.AddField(
model_name='applicationaccesstoken',
name='language',
field=models.CharField(default=None, max_length=10, null=True, verbose_name='语言')
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 4.2.18 on 2025-01-22 09:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('application', '0024_applicationaccesstoken_language'),
]
operations = [
migrations.AlterField(
model_name='application',
name='prologue',
field=models.CharField(default='', max_length=40960, verbose_name='开场白'),
),
]

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