code cleanup/hardening
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const {getDB} = require('../db');
|
||||
const { EPISODIC, getEnv, SERVICES, parseRow, formatEpisodeText } = require('@nexusai/shared');
|
||||
const { EPISODIC, getEnv, SERVICES, parseRow, formatEpisodeText, SUMMARIES } = require('@nexusai/shared');
|
||||
const semantic = require('../semantic');
|
||||
const { extractAndStoreEntities } = require('../entities/extraction')
|
||||
|
||||
@@ -207,7 +207,7 @@ async function getEpisodeEmbedding(userMessage, aiResponse){
|
||||
return data.embedding;
|
||||
}
|
||||
|
||||
function getEpisodesByProject(projectId, limit = 200) {
|
||||
function getEpisodesByProject(projectId, limit = SUMMARIES.MAX_PROJECT_EPISODE_LIMIT) {
|
||||
const db = getDB();
|
||||
return db.prepare(`
|
||||
SELECT e.* FROM episodes e
|
||||
|
||||
Reference in New Issue
Block a user