From e9f37056b675e365687aab7f3b62011a1eb23804 Mon Sep 17 00:00:00 2001 From: RaymondVerhoef Date: Sun, 24 May 2026 22:26:13 +0200 Subject: [PATCH] feat: implement text extraction pipeline and centralized LLM interface for knowledge graph generation --- src/lib/extractionPipeline.js | 1 + src/lib/llm.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/extractionPipeline.js b/src/lib/extractionPipeline.js index 499f65e..68d8e4e 100644 --- a/src/lib/extractionPipeline.js +++ b/src/lib/extractionPipeline.js @@ -149,6 +149,7 @@ export async function processSourceText(textContent, sourceName, { signal } = {} tools: [EMIT_KNOWLEDGE_GRAPH_TOOL], toolChoice: { type: 'tool', name: EMIT_KNOWLEDGE_GRAPH_TOOL.name }, maxTokens: 8192, + timeoutMs: 180_000, limiter: extractionLimiter, signal, }); diff --git a/src/lib/llm.js b/src/lib/llm.js index b9d5fd4..f2ee235 100644 --- a/src/lib/llm.js +++ b/src/lib/llm.js @@ -349,7 +349,7 @@ export async function callLLM(options) { async () => { if (limiter) await limiter.acquire({ signal }); const timeoutCtl = new AbortController(); - const timer = setTimeout(() => timeoutCtl.abort(new DOMException('Timeout', 'AbortError')), timeoutMs); + const timer = setTimeout(() => timeoutCtl.abort(new DOMException('Timeout', 'TimeoutError')), timeoutMs); const fetchSignal = linkSignals(signal, timeoutCtl.signal); try {