feat: implement text extraction pipeline and centralized LLM interface for knowledge graph generation

This commit is contained in:
RaymondVerhoef
2026-05-24 22:26:13 +02:00
parent 5965793f11
commit e9f37056b6
2 changed files with 2 additions and 1 deletions

View File

@@ -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,
});

View File

@@ -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 {