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({
|
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 }]
|
||||||
|
|||||||
@@ -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:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user