Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

:wrench: chore: adjust jina timeout to 15s (#13171)

Rylan Caib0253d05dd55
diff --git a/packages/web-crawler/src/crawImpl/jina.ts b/packages/web-crawler/src/crawImpl/jina.ts
index ccdb9998ef6..835abf3fdca 100644
--- a/packages/web-crawler/src/crawImpl/jina.ts
+++ b/packages/web-crawler/src/crawImpl/jina.ts
@@ -1,7 +1,9 @@
import type { CrawlImpl } from '../type';
import { toFetchError } from '../utils/errorType';
import { parseJSONResponse } from '../utils/response';
-import { DEFAULT_TIMEOUT, withTimeout } from '../utils/withTimeout';
+import { withTimeout } from '../utils/withTimeout';
+
+const JINA_TIMEOUT = 15_000;
export const jina: CrawlImpl<{ apiKey?: string }> = async (url, params) => {
const token = params.apiKey ?? process.env.JINA_READER_API_KEY ?? process.env.JINA_API_KEY;
@@ -18,7 +20,7 @@ export const jina: CrawlImpl<{ apiKey?: string }> = async (url, params) => {
},
signal,
}),
- DEFAULT_TIMEOUT,
+ JINA_TIMEOUT,
);
} catch (e) {
throw toFetchError(e);