This commit is contained in:
jyong
2025-06-13 15:04:22 +08:00
parent da3a3ce165
commit b2b95412b9
7 changed files with 253 additions and 46 deletions

View File

@ -15,7 +15,7 @@ from core.plugin.entities.parameters import (
init_frontend_parameter,
)
from core.tools.entities.common_entities import I18nObject
from core.tools.entities.tool_entities import ToolLabelEnum
from core.tools.entities.tool_entities import ToolLabelEnum, ToolInvokeMessage
class DatasourceProviderType(enum.StrEnum):
@ -301,3 +301,29 @@ class GetWebsiteCrawlResponse(BaseModel):
"""
result: WebSiteInfo = WebSiteInfo(job_id="", status="", web_info_list=[])
class DatasourceInvokeMessage(ToolInvokeMessage):
"""
Datasource Invoke Message.
"""
class WebsiteCrawlMessage(BaseModel):
"""
Website crawl message
"""
job_id: str = Field(..., description="The job id")
status: str = Field(..., description="The status of the job")
web_info_list: Optional[list[WebSiteInfoDetail]] = []
class OnlineDocumentMessage(BaseModel):
"""
Online document message
"""
workspace_id: str = Field(..., description="The workspace id")
workspace_name: str = Field(..., description="The workspace name")
workspace_icon: str = Field(..., description="The workspace icon")
total: int = Field(..., description="The total number of documents")
pages: list[OnlineDocumentPage] = Field(..., description="The pages of the online document")