orchestration fixes

This commit is contained in:
Storme-bit
2026-04-05 05:46:06 -07:00
parent eccda21992
commit 4c8127e806
5 changed files with 45 additions and 92 deletions

View File

@@ -1,5 +1,5 @@
const memory = require('./memory');
const inference = require('./inference');
const memory = require('../services/memory');
const inference = require('../services/inference');
const SYSTEM_PROMPT = `You are a helpful, context-aware AI assistant.
You have access to memories of past conversations with the user.
@@ -7,10 +7,10 @@ Use them to provide consistent, personalised responses.`;
const RECENT_EPISODE_LIMIT = 10; // Number of recent episodes to retrieve for context
function buildPrompt(getRecentEpisodes, userMessage) {
function buildPrompt(recentEpisodes, userMessage) {
const parts = [SYSTEM_PROMPT];
if (getRecentEpisodes.length > 0) {
if (recentEpisodes.length > 0) {
parts.push(`Here are some relevant memories from your past conversations:`);
for (const ep of recentEpisodes) {
parts.push(`User: ${ep.user_message}\nAssistant: ${ep.ai_response}`);