refactoring and clean up

This commit is contained in:
Storme-bit
2026-04-07 01:30:35 -07:00
parent 0aea052311
commit 2b75f75733
18 changed files with 191 additions and 115 deletions

View File

@@ -2,14 +2,9 @@ const memory = require('../services/memory');
const inference = require('../services/inference');
const embedding = require('../services/embedding');
const qdrant = require('../services/qdrant');
const { ORCHESTRATION } = require('@nexusai/shared')
const SYSTEM_PROMPT = `You are a helpful, context-aware AI assistant.
You have access to memories of past conversations with the user.
Use them to provide consistent, personalised responses.`;
const RECENT_EPISODE_LIMIT = 5; // Number of recent episodes to retrieve for context
const SEMANTIC_LIMIT = 5;
const SCORE_THRESHOLD = 0.75;
const { RECENT_EPISODE_LIMIT, SEMANTIC_LIMIT, SCORE_THRESHOLD, SYSTEM_PROMPT } = ORCHESTRATION;
function buildPrompt(recentEpisodes, semanticEpisodes, userMessage) {
const parts = [SYSTEM_PROMPT];