From 3d0e288e85108ef038f3cdaaee56b6d1f1946212 Mon Sep 17 00:00:00 2001 From: jyong <718720800@qq.com> Date: Thu, 19 Jun 2025 14:29:39 +0800 Subject: [PATCH] r2 --- api/core/datasource/entities/datasource_entities.py | 4 +++- api/core/plugin/impl/datasource.py | 2 +- api/core/workflow/nodes/datasource/datasource_node.py | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/api/core/datasource/entities/datasource_entities.py b/api/core/datasource/entities/datasource_entities.py index d072b8541b..75b4dd807f 100644 --- a/api/core/datasource/entities/datasource_entities.py +++ b/api/core/datasource/entities/datasource_entities.py @@ -244,7 +244,9 @@ class GetOnlineDocumentPageContentRequest(BaseModel): Get online document page content request """ - online_document_info: OnlineDocumentInfo + workspace_id: str = Field(..., description="The workspace id") + page_id: str = Field(..., description="The page id") + type: str = Field(..., description="The type of the page") class OnlineDocumentPageContent(BaseModel): diff --git a/api/core/plugin/impl/datasource.py b/api/core/plugin/impl/datasource.py index 66469b43b4..5e966d2599 100644 --- a/api/core/plugin/impl/datasource.py +++ b/api/core/plugin/impl/datasource.py @@ -181,7 +181,7 @@ class PluginDatasourceManager(BasePluginClient): "provider": datasource_provider_id.provider_name, "datasource": datasource_name, "credentials": credentials, - "datasource_parameters": datasource_parameters, + "page": datasource_parameters, }, }, headers={ diff --git a/api/core/workflow/nodes/datasource/datasource_node.py b/api/core/workflow/nodes/datasource/datasource_node.py index ab4477f538..17108e0a57 100644 --- a/api/core/workflow/nodes/datasource/datasource_node.py +++ b/api/core/workflow/nodes/datasource/datasource_node.py @@ -103,7 +103,11 @@ class DatasourceNode(BaseNode[DatasourceNodeData]): online_document_result: Generator[DatasourceMessage, None, None] = ( datasource_runtime.get_online_document_page_content( user_id=self.user_id, - datasource_parameters=GetOnlineDocumentPageContentRequest(**parameters), + datasource_parameters=GetOnlineDocumentPageContentRequest( + workspace_id=datasource_info.get("workspace_id"), + page_id=datasource_info.get("page").get("page_id"), + type=datasource_info.get("type"), + ), provider_type=datasource_type, ) )