feat(datasource): change datasource result type to event-stream

feat/datasource
Dongyu Li 11 months ago
parent e551cf65c9
commit b12a8eeb90

@ -589,7 +589,7 @@ class PipelineGenerator(BaseAppGenerator):
if datasource_type == "local_file": if datasource_type == "local_file":
name = datasource_info["name"] name = datasource_info["name"]
elif datasource_type == "online_document": elif datasource_type == "online_document":
name = datasource_info["page_title"] name = datasource_info['page']["page_name"]
elif datasource_type == "website_crawl": elif datasource_type == "website_crawl":
name = datasource_info["title"] name = datasource_info["title"]
else: else:

@ -170,7 +170,7 @@ class PluginDatasourceManager(BasePluginClient):
datasource_provider_id = GenericProviderID(datasource_provider) datasource_provider_id = GenericProviderID(datasource_provider)
response = self._request_with_plugin_daemon_response_stream( return self._request_with_plugin_daemon_response_stream(
"POST", "POST",
f"plugin/{tenant_id}/dispatch/datasource/get_online_document_page_content", f"plugin/{tenant_id}/dispatch/datasource/get_online_document_page_content",
DatasourceMessage, DatasourceMessage,
@ -188,7 +188,6 @@ class PluginDatasourceManager(BasePluginClient):
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
) )
yield from response
def validate_provider_credentials( def validate_provider_credentials(
self, tenant_id: str, user_id: str, provider: str, plugin_id: str, credentials: dict[str, Any] self, tenant_id: str, user_id: str, provider: str, plugin_id: str, credentials: dict[str, Any]

Loading…
Cancel
Save