feat: implement text extraction pipeline and centralized LLM interface for knowledge graph generation
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user