From f1bf2668f24c3c171b0f2e92517db58196cc40ce Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 2 Dec 2024 15:35:42 +0800 Subject: [PATCH 1/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/function-lib/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/function-lib/index.vue b/ui/src/views/function-lib/index.vue index 4aa2f40d1..43dfd1110 100644 --- a/ui/src/views/function-lib/index.vue +++ b/ui/src/views/function-lib/index.vue @@ -49,7 +49,7 @@ :sm="12" :md="8" :lg="6" - :xl="4" + :xl="6" v-for="(item, index) in functionLibList" :key="index" class="mb-16" From 54bdc10b2e9e0a3c4b8efd7379e534d2a6b418df Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:45:50 +0800 Subject: [PATCH 2/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=94=B6=E9=9B=86=E5=88=A0=E9=99=A4=E8=A1=A8=E5=8D=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=90=8E=EF=BC=8C=E5=8F=82=E6=95=B0=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=8F=8A=E6=97=B6=E6=9B=B4=E6=96=B0=20(#1735?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/workflow/nodes/form-node/index.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ui/src/workflow/nodes/form-node/index.vue b/ui/src/workflow/nodes/form-node/index.vue index 75b8627f6..071101640 100644 --- a/ui/src/workflow/nodes/form-node/index.vue +++ b/ui/src/workflow/nodes/form-node/index.vue @@ -113,18 +113,16 @@ import { type FormInstance } from 'element-plus' import { ref, onMounted, computed } from 'vue' import { input_type_list } from '@/components/dynamics-form/constructor/data' import { MsgError } from '@/utils/message' -import { set,cloneDeep } from 'lodash' +import { set, cloneDeep } from 'lodash' const props = defineProps<{ nodeModel: any }>() const formNodeFormRef = ref() const editFormField = (form_field_data: any, field_index: number) => { - const _value=form_data.value.form_field_list.map( - (item: any, index: number) => { - if (field_index === index) { - return cloneDeep(form_field_data) - } - return cloneDeep(item) + const _value = form_data.value.form_field_list.map((item: any, index: number) => { + if (field_index === index) { + return cloneDeep(form_field_data) } - ) + return cloneDeep(item) + }) form_data.value.form_field_list = _value sync_form_field_list() } @@ -161,6 +159,7 @@ const deleteField = (form_field_data: any) => { form_data.value.form_field_list = form_data.value.form_field_list.filter( (field: any) => field.field !== form_field_data.field ) + sync_form_field_list() } const form = ref({ is_result: true, From 433ae5daf5cf8b16aed9c0264b6cdcf3f106448f Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:54:49 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84=E6=9C=AC=E5=9C=B0=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E8=BF=9B=E8=A1=8C=E5=90=91=E9=87=8F=E5=8C=96,?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=80=E7=9B=B4=E6=98=AF=E6=8E=92=E9=98=9F?= =?UTF-8?q?=E4=B8=AD=20(#1736)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/embedding/task/embedding.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/embedding/task/embedding.py b/apps/embedding/task/embedding.py index 3e63c26b2..7087636c2 100644 --- a/apps/embedding/task/embedding.py +++ b/apps/embedding/task/embedding.py @@ -17,7 +17,7 @@ from django.db.models import QuerySet from common.config.embedding_config import ModelManage from common.event import ListenerManagement, UpdateProblemArgs, UpdateEmbeddingDatasetIdArgs, \ UpdateEmbeddingDocumentIdArgs -from dataset.models import Document, Status +from dataset.models import Document, Status, TaskType, State from ops import celery_app from setting.models import Model from setting.models_provider import get_model @@ -66,8 +66,8 @@ def embedding_by_document(document_id, model_id): """ def exception_handler(e): - QuerySet(Document).filter(id=document_id).update( - **{'status': Status.error, 'update_time': datetime.datetime.now()}) + ListenerManagement.update_status(QuerySet(Document).filter(id=document_id), TaskType.EMBEDDING, + State.FAILURE) max_kb_error.error( f'获取向量模型失败:{str(e)}{traceback.format_exc()}') @@ -102,7 +102,6 @@ def embedding_by_dataset(dataset_id, model_id): max_kb.info(f"数据集文档:{[d.name for d in document_list]}") for document in document_list: try: - print(document.id, model_id) embedding_by_document.delay(document.id, model_id) except Exception as e: pass From db3312ffa228eeac683b62f84590ec6a8b543729 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 2 Dec 2024 17:47:40 +0800 Subject: [PATCH 4/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B0=8F=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E9=81=AE=E7=85=A7=E5=AE=BD=E5=BA=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/template/embed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/template/embed.js b/apps/application/template/embed.js index e3d9f1862..43b9cbb62 100644 --- a/apps/application/template/embed.js +++ b/apps/application/template/embed.js @@ -165,7 +165,7 @@ function initMaxkbStyle(root){ #maxkb .maxkb-mask .maxkb-content { width: 64px; height: 64px; - box-shadow: 1px 1px 1px 2000px rgba(0,0,0,.6); + box-shadow: 1px 1px 1px 9999px rgba(0,0,0,.6); position: absolute; {{x_type}}: {{x_value}}px; {{y_type}}: {{y_value}}px; From 560d49ddf42cd4b712dc9edb9851af7cbb56f26f Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 2 Dec 2024 17:51:56 +0800 Subject: [PATCH 5/9] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=B0=8F=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E5=9B=BE=E5=B1=82=E5=B1=82=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/template/embed.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/application/template/embed.js b/apps/application/template/embed.js index 43b9cbb62..f05cf1c1d 100644 --- a/apps/application/template/embed.js +++ b/apps/application/template/embed.js @@ -244,6 +244,7 @@ function initMaxkbStyle(root){ cursor: pointer; max-height:500px; max-width:500px; + z-index:10000; } #maxkb #maxkb-chat-container{ z-index:10000;position: relative; From 5d4f35da2ef160d7cb232951680ad0d9f51de59c Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 2 Dec 2024 17:58:24 +0800 Subject: [PATCH 6/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=B8=85=E9=99=A4=E5=90=8E=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E4=B8=AD=E7=9A=84=E6=96=87=E4=BB=B6=E5=9C=A8file?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E6=B2=A1=E5=88=A0=E6=8E=89=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1049852 --user=王孝刚 【应用编排】应用日志清除后,对话中的文件在file表中没删掉 https://www.tapd.cn/57709429/s/1622739 --- apps/common/job/clean_chat_job.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/common/job/clean_chat_job.py b/apps/common/job/clean_chat_job.py index d42c39982..778b8a8dc 100644 --- a/apps/common/job/clean_chat_job.py +++ b/apps/common/job/clean_chat_job.py @@ -39,11 +39,12 @@ def clean_chat_log_job(): with transaction.atomic(): logs_to_delete = Chat.objects.filter(query_conditions).values_list('id', flat=True)[:batch_size] count = logs_to_delete.count() + logs_to_delete_str = [str(uuid) for uuid in logs_to_delete] if count == 0: break deleted_count, _ = Chat.objects.filter(id__in=logs_to_delete).delete() # 删除对应的文件 - File.objects.filter(meta__chat_id__in=[str(uuid) for uuid in logs_to_delete]).delete() + File.objects.filter(meta__chat_id__in=logs_to_delete_str).delete() if deleted_count < batch_size: break @@ -57,6 +58,6 @@ def run(): existing_job = scheduler.get_job(job_id='clean_chat_log') if existing_job is not None: existing_job.remove() - scheduler.add_job(clean_chat_log_job, 'cron', hour='0', minute='5', id='clean_chat_log') + scheduler.add_job(clean_chat_log_job, 'cron', minute='*/5', id='clean_chat_log') finally: lock.un_lock('clean_chat_log_job') From 36755672ba42da7335dc710ccdea9fdc482f6e4a Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 2 Dec 2024 18:09:13 +0800 Subject: [PATCH 7/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=90=86=E8=A7=A3=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E4=B8=BA?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=97=B6=E5=9B=BE=E7=89=87=E6=B2=A1=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/base_image_understand_node.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py b/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py index 1817ba56a..9e09e8a8e 100644 --- a/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py +++ b/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py @@ -115,7 +115,11 @@ class BaseImageUnderstandNode(IImageUnderstandNode): image_list = data['image_list'] if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW': return HumanMessage(content=chat_record.problem_text) - return HumanMessage(content=data['question']) + file_id = image_list[0]['file_id'] + return HumanMessage(content=[ + {'type': 'text', 'text': data['question']}, + {'type': 'image_url', 'image_url': {'url': f'/api/file/{file_id}'}}, + ]) return HumanMessage(content=chat_record.problem_text) def get_history_message(self, history_chat_record, dialogue_number): From be0b407cf1ab55754c328711c0494d19e0565053 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 2 Dec 2024 18:18:13 +0800 Subject: [PATCH 8/9] =?UTF-8?q?refactor:=20=E9=92=89=E9=92=89=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E8=AE=A4=E8=AF=81=E8=AE=BE=E7=BD=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1048604 --user=王孝刚 【系统管理】钉钉扫码认证设置优化 https://www.tapd.cn/57709429/s/1622777 --- apps/common/job/clean_chat_job.py | 2 +- ui/src/views/authentication/component/EditModal.vue | 7 ++++++- ui/src/views/authentication/component/SCAN.vue | 10 +++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/common/job/clean_chat_job.py b/apps/common/job/clean_chat_job.py index 778b8a8dc..347f1a8a8 100644 --- a/apps/common/job/clean_chat_job.py +++ b/apps/common/job/clean_chat_job.py @@ -58,6 +58,6 @@ def run(): existing_job = scheduler.get_job(job_id='clean_chat_log') if existing_job is not None: existing_job.remove() - scheduler.add_job(clean_chat_log_job, 'cron', minute='*/5', id='clean_chat_log') + scheduler.add_job(clean_chat_log_job, 'cron', hour='0', minute='5', id='clean_chat_log') finally: lock.un_lock('clean_chat_log_job') diff --git a/ui/src/views/authentication/component/EditModal.vue b/ui/src/views/authentication/component/EditModal.vue index 8ea3afaa1..01259e6ab 100644 --- a/ui/src/views/authentication/component/EditModal.vue +++ b/ui/src/views/authentication/component/EditModal.vue @@ -125,7 +125,12 @@ const open = async (platform: Platform) => { currentPlatform.config.corp_id = currentPlatform.config.agent_id delete currentPlatform.config.agent_id } - currentPlatform.config.callback_url = defaultCallbackUrl + currentPlatform.config = { + corp_id: currentPlatform.config.corp_id, + app_key: currentPlatform.config.app_key, + app_secret: currentPlatform.config.app_secret, + callback_url: defaultCallbackUrl + } break case 'lark': currentPlatform.config.callback_url = `${defaultCallbackUrl}/api/feishu` diff --git a/ui/src/views/authentication/component/SCAN.vue b/ui/src/views/authentication/component/SCAN.vue index d0ccead29..f4a48f157 100644 --- a/ui/src/views/authentication/component/SCAN.vue +++ b/ui/src/views/authentication/component/SCAN.vue @@ -131,7 +131,6 @@ function createPlatform(key: string, name: string): Platform { const config = { ...(key === 'wecom' ? { corp_id: '', agent_id: '' } : { app_key: '' }), - ...(key === 'dingtalk' ? { corp_id: '' } : {}), app_secret: '', callback_url: '' } @@ -172,6 +171,15 @@ function getPlatformInfo() { isActive: data.is_active, config: data.config }) + if (platform.key === 'dingtalk') { + const { corp_id, app_key, app_secret } = platform.config + platform.config = { + corp_id, + app_key, + app_secret, + callback_url: platform.config.callback_url + } + } showPassword[platform.key] = {} showPassword[platform.key]['app_secret'] = false } From b54584e485ed7a060d7998ffd4257e1831c0366d Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 2 Dec 2024 18:27:03 +0800 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/ai-chat/ExecutionDetailDialog.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/src/components/ai-chat/ExecutionDetailDialog.vue b/ui/src/components/ai-chat/ExecutionDetailDialog.vue index 70bd3f78f..641d7eca9 100644 --- a/ui/src/components/ai-chat/ExecutionDetailDialog.vue +++ b/ui/src/components/ai-chat/ExecutionDetailDialog.vue @@ -410,7 +410,6 @@
本次对话
-

图片: