documentation update
This commit is contained in:
@@ -7,7 +7,15 @@ const EXTRACTION_MODEL = getEnv('EXTRACTION_MODEL', 'qwen2.5:3b'); // ChatML for
|
||||
const EMBEDDING_SERVICE_URL = getEnv('EMBEDDING_SERVICE_URL', SERVICES.EMBEDDING_URL);
|
||||
|
||||
const ENTITY_TYPES = ENTITIES.TYPES;
|
||||
const IGNORED_NAMES = ['good morning', 'good night', 'hello', 'goodbye', 'thanks', 'thank you'];
|
||||
const IGNORED_NAMES = new Set([
|
||||
'good morning', 'good night', 'good evening', 'good afternoon',
|
||||
'hello', 'hi', 'hey', 'goodbye', 'bye', 'thanks', 'thank you', 'morning',
|
||||
]);
|
||||
|
||||
function isIgnoredName(name) {
|
||||
const normalized = name.toLowerCase().replace(/[^\w\s]/g, '').trim();
|
||||
return IGNORED_NAMES.has(normalized);
|
||||
}
|
||||
|
||||
// NOTE: This prompt uses ChatML format (<|im_start|> / <|im_end|> tags), which is
|
||||
// specific to qwen-family models. If EXTRACTION_MODEL is changed to a Llama-family
|
||||
@@ -31,6 +39,7 @@ function buildExtractionPrompt(userMessage, aiResponse, knownEntities = []) {
|
||||
`Entity types: ${ENTITY_TYPES.join(', ')}`,
|
||||
'Use "character" for any fictional, game, or media characters (e.g. characters from anime, games, books, TV shows, movies)',
|
||||
'Use "person" only for real people',
|
||||
'Do not extract greetings, pleasantries, or conversational filler (e.g. "good morning", "thanks") as entities.',
|
||||
'For each entity provide:',
|
||||
' "name": short proper noun only (max 4 words)',
|
||||
' "type": one of the valid types',
|
||||
|
||||
Reference in New Issue
Block a user