orchestration fixes
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user