feat: add Anthropic API client and knowledge graph extraction pipeline
This commit is contained in:
@@ -33,7 +33,7 @@ export const anthropicApi = {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: model,
|
||||
max_tokens: 4000,
|
||||
max_tokens: 8192,
|
||||
temperature: 0,
|
||||
system: systemPrompt,
|
||||
messages: [{ role: 'user', content: userMessage }]
|
||||
|
||||
@@ -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.
|
||||
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.
|
||||
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:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user