minor constants refactoring

This commit is contained in:
Storme-bit
2026-04-04 08:08:57 -07:00
parent cbc36c2416
commit bd600d9865
4 changed files with 41 additions and 24 deletions

View File

@@ -0,0 +1,26 @@
//A store for tunables and constants used across the codebase, to avoid magic numbers and hardcoded values
const QDRANT = {
DEFAULT_URL: 'http://localhost:6333',
VECTOR_SIZE: 768, // Must match the output dimension of the embedding model (e.g. nomic-embed-text)
DISTANCE_METRIC: 'Cosine', // Best for normalized embeddings like text vectors
DEFAULT_LIMIT: 10, //Default top-=k for vector searches
};
const COLLECTIONS = {
EPISODES: 'episodes',
ENTITIES: 'entities',
SUMMARIES: 'summaries'
};
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
};
module.exports = {
QDRANT,
COLLECTIONS,
EPISODIC
};

View File

@@ -1,3 +1,4 @@
const {getEnv} = require('./config/env');
const {QDRANT, COLLECTIONS, EPISODIC } = require('./config/constants');
module.exports = {getEnv};
module.exports = {getEnv, QDRANT, COLLECTIONS, EPISODIC};