code cleanup/hardening
This commit is contained in:
@@ -26,7 +26,7 @@ const ORCHESTRATION = {
|
||||
SEMANTIC_LIMIT: 5,
|
||||
SCORE_THRESHOLD: 0.5,
|
||||
ENTITIES_LIMIT: 5,
|
||||
ENTITIES_THRESHOLD: 0.6,
|
||||
ENTITIES_THRESHOLD: 0.55,
|
||||
TEMPERATURE: 0.7,
|
||||
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.`
|
||||
@@ -70,14 +70,17 @@ const SQLITE = {
|
||||
}
|
||||
|
||||
const SUMMARIES = {
|
||||
THRESHOLD_TOKENS: 200, //trigger summary when session hits this many tokens
|
||||
THRESHOLD_TOKENS: 200, //trigger summary when session hits this many tokens
|
||||
MAX_SUMMARY_TOKENS: 800, //if existing summary exceeds this, create new instead of update
|
||||
MIN_EPISODES_SINCE: 5, // don't resummarize until N new episodes since last summary
|
||||
MAX_SUMMARY_CHARS: 8000, // max chars to include from recent episodes when generating summary (to control prompt size)
|
||||
MAX_PROJECT_EPISODE_LIMIT: 200, // max number of episodes to consider from the entire project when generating summary (to control prompt size)
|
||||
}
|
||||
|
||||
const ENTITIES = {
|
||||
TEMPERATURE: 0.1,
|
||||
NUM_PREDICT: 1024,
|
||||
TEMPERATURE: 0.1, // Low temperature, more precise extraction, less creative
|
||||
NUM_PREDICT: 1024, // Max tokens to consider for entity extraction (e.g. recent conversation)
|
||||
THRESHOLD: 0.55, // Minimum confidence score for an extracted entity to be included in the results
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user