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

@@ -17,15 +17,64 @@ const EPISODIC = {
DEFAULT_RECENT_LIMIT: 10, // Default number of recent episodes to retrieve
DEFAULT_PAGE_SIZE: 20, // Default number of episodes per page for pagination
DEFAULT_SEARCH_LIMIT: 10, // Default number of search results to return
DEFAULT_OFFSET: 0,
DEFAULT_SESSIONS_LIMIT: 20,
};
const ORCHESTRATION = {
RECENT_EPISODE_LIMIT: 5,
SEMANTIC_LIMIT: 5,
SCORE_THRESHOLD: 0.75,
CORS_ORIGIN: 'http://localhost:5173',
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 OLLAMA = {
DEFAULT_URL: 'http://localhost:11434',
EMBED_MODEL: 'nomic-embed-text',
OLLAMA_MODEL: 'companion:latest',
};
const LLAMACPP = {
DEFAULT_URL: 'http://localhost:8080',
DEFAULT_MODEL: 'local-model',
}
const PORTS = {
INFERENCE: '3001',
MEMORY: '3002',
EMBEDDING: '3003',
ORCHESTRATION: '4000',
};
const SERVICES = {
EMBEDDING_URL: 'http://localhost:3003'
EMBEDDING_URL: `http://localhost:${PORTS.EMBEDDING}`,
MEMORY_URL: `http://localhost:${PORTS.MEMORY}`,
INFERENCE_URL: `http://localhost:${PORTS.INFERENCE}`,
};
const INFERENCE_DEFAULTS = {
TEMPERATURE: 0.7, // Controls randomness. 0 = deterministic, 1 = creative
MAX_TOKENS: 1024, // Max tokens to generate in a response
TOP_P: 0.9, // Nucleus sampling — considers tokens comprising top 90% probability mass
TOP_K: 40, // Limits token selection to top K candidates at each step
REPEAT_PENALTY: 1.1, // Penalizes recently used tokens to reduce repetition
SEED: null, // null = random. Set to an integer for reproducible outputs
};
const SQLITE = {
DEFAULT_PATH: './data/nexusai.db'
}
module.exports = {
QDRANT,
COLLECTIONS,
EPISODIC,
SERVICES
SERVICES,
OLLAMA,
PORTS,
LLAMACPP,
INFERENCE_DEFAULTS,
SQLITE,
ORCHESTRATION
};