This commit is contained in:
Timothy Jaeryang Baek
2025-12-21 18:08:36 +04:00
parent 7746e9f4b8
commit c96549eaa7
7 changed files with 170 additions and 71 deletions
+13 -2
View File
@@ -327,10 +327,21 @@ export const processYoutubeVideo = async (token: string, url: string) => {
return res;
};
export const processWeb = async (token: string, collection_name: string, url: string) => {
export const processWeb = async (
token: string,
collection_name: string,
url: string,
process: boolean = true
) => {
let error = null;
const res = await fetch(`${RETRIEVAL_API_BASE_URL}/process/web`, {
const searchParams = new URLSearchParams();
if (!process) {
searchParams.append('process', 'false');
}
const res = await fetch(`${RETRIEVAL_API_BASE_URL}/process/web?${searchParams.toString()}`, {
method: 'POST',
headers: {
Accept: 'application/json',