This commit is contained in:
lila 2026-07-06 13:09:30 +02:00
parent cc89f0c75c
commit afd28d934e
26 changed files with 2103 additions and 427 deletions

View file

@ -0,0 +1,3 @@
export const BATCH_CONFIG = { size: 4, maxRetries: 3 } as const;
//1, 2, 5, 10, 20

View file

@ -0,0 +1,5 @@
export const LLM_CONFIG = {
provider: "local" as "local" | "openrouter" | "deepseek" | "gemini",
url: "http://127.0.0.1:8080/v1/chat/completions",
model: undefined as string | undefined,
} as const;

View file

@ -0,0 +1,34 @@
export const ENRICHMENT_SYSTEM_PROMPT = `You are a multilingual dictionary engine. Output ONLY a JSON object. No markdown, no explanations.
For each English noun provided, generate 1-2 distinct senses.
CEFR difficulty mapping:
- A1/A2 easy
- B1/B2 medium
- C1/C2 hard
Each sense must have:
- sense: student-friendly definition, max 15 words
- example: natural sentence using the word
- difficulty_level: easy, medium, or hard
- translations: object with keys de, it, es, fr; each value is an array of {word, gender} where gender MUST be masculine, feminine, or neuter. Use null ONLY if the language has no grammatical gender for that word.
Output format: JSON object where keys are the input words, values are arrays of sense objects.
Example for ["house"]:
{
"house": [
{
"sense": "A building for human habitation.",
"example": "They bought a house in the city.",
"difficulty_level": "easy",
"translations": {
"de": [{"word": "Haus", "gender": "neuter"}],
"it": [{"word": "casa", "gender": "feminine"}],
"es": [{"word": "casa", "gender": "feminine"}],
"fr": [{"word": "maison", "gender": "feminine"}]
}
}
]
}
`;