feat: Integrate WaterCrawl.dev as a new knowledge base provider (#16396)

Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
Amir Mohsen Asaran
2025-04-07 06:43:23 +02:00
committed by GitHub
parent 0afad94378
commit f54905e685
24 changed files with 1102 additions and 55 deletions

View File

@@ -253,6 +253,25 @@ export const checkJinaReaderTaskStatus: Fetcher<CommonResponse, string> = (jobId
})
}
export const createWatercrawlTask: Fetcher<CommonResponse, Record<string, any>> = (body) => {
return post<CommonResponse>('website/crawl', {
body: {
...body,
provider: DataSourceProvider.waterCrawl,
},
})
}
export const checkWatercrawlTaskStatus: Fetcher<CommonResponse, string> = (jobId: string) => {
return get<CommonResponse>(`website/crawl/status/${jobId}`, {
params: {
provider: DataSourceProvider.waterCrawl,
},
}, {
silent: true,
})
}
type FileTypesRes = {
allowed_extensions: string[]
}