feat: add Anthropic API client and knowledge graph extraction pipeline
All checks were successful
On Push to Main / test (push) Successful in 30s
On Push to Main / publish (push) Successful in 58s
On Push to Main / deploy-dev (push) Successful in 1m35s

This commit is contained in:
RaymondVerhoef
2026-05-17 18:20:29 +02:00
parent 5659ff6726
commit 06eb974825
2 changed files with 2 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ export const anthropicApi = {
}, },
body: JSON.stringify({ body: JSON.stringify({
model: model, model: model,
max_tokens: 4000, max_tokens: 8192,
temperature: 0, temperature: 0,
system: systemPrompt, system: systemPrompt,
messages: [{ role: 'user', content: userMessage }] messages: [{ role: 'user', content: userMessage }]

View File

@@ -4,6 +4,7 @@ import * as db from './db';
const SYSTEM_PROMPT = `You are an AI knowledge extractor for Respellion, an IT company built on radical transparency. const SYSTEM_PROMPT = `You are an AI knowledge extractor for Respellion, an IT company built on radical transparency.
You receive a source text. Your task is to extract core concepts, roles, and processes, and return them as a structured JSON Knowledge Graph. You receive a source text. Your task is to extract core concepts, roles, and processes, and return them as a structured JSON Knowledge Graph.
Facts should be integrated into the descriptions of the other labels and NOT be extracted as unique topics. Facts should be integrated into the descriptions of the other labels and NOT be extracted as unique topics.
CRITICAL: To ensure the response fits within limits, extract a maximum of 15 key topics and their most important relations. Keep descriptions very concise.
ALWAYS return a valid JSON object in the following format: ALWAYS return a valid JSON object in the following format:
{ {