diff --git a/api/core/datasource/entities/datasource_entities.py b/api/core/datasource/entities/datasource_entities.py index af67eaf761..8f447b2af4 100644 --- a/api/core/datasource/entities/datasource_entities.py +++ b/api/core/datasource/entities/datasource_entities.py @@ -245,7 +245,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 f2539de8f5..bc32c9283d 100644 --- a/api/core/plugin/impl/datasource.py +++ b/api/core/plugin/impl/datasource.py @@ -180,7 +180,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, ) )