From e91dd28a764cd6af4c92eaedfc5d6bbd616d53e9 Mon Sep 17 00:00:00 2001 From: Jyong <76649700+JohnJyong@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:25:59 +0800 Subject: [PATCH 1/2] fix file estimate issue (#1860) Co-authored-by: jyong --- api/controllers/console/datasets/datasets_document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/controllers/console/datasets/datasets_document.py b/api/controllers/console/datasets/datasets_document.py index 58c39d0b46ade4..128a76f18ac416 100644 --- a/api/controllers/console/datasets/datasets_document.py +++ b/api/controllers/console/datasets/datasets_document.py @@ -410,7 +410,7 @@ def get(self, dataset_id, batch): if dataset.data_source_type == 'upload_file': file_details = db.session.query(UploadFile).filter( UploadFile.tenant_id == current_user.current_tenant_id, - UploadFile.id in info_list + UploadFile.id.in_(info_list) ).all() if file_details is None: From 5b6d3c0a256bf9f37bb977c90f98fc7d49348bf0 Mon Sep 17 00:00:00 2001 From: takatost Date: Tue, 2 Jan 2024 16:43:04 +0800 Subject: [PATCH 2/2] fix tool enabled missing in agent --- api/core/application_manager.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/core/application_manager.py b/api/core/application_manager.py index cdc5d57c7cd515..cad03c710d099d 100644 --- a/api/core/application_manager.py +++ b/api/core/application_manager.py @@ -436,8 +436,6 @@ def _convert_from_app_model_config_dict(self, tenant_id: str, app_model_config_d if "enabled" not in tool_item or not tool_item["enabled"]: continue - del tool_item["enabled"] - agent_tool_properties["config"] = tool_item agent_tools.append(AgentToolEntity(**agent_tool_properties))