@aj-archipelago/cortex 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aj-archipelago/cortex",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "description": "Cortex is a GraphQL API for AI. It provides a simple, extensible interface for using AI services from OpenAI, Azure and others.",
5
5
  "private": false,
6
6
  "repository": {
@@ -37,7 +37,7 @@ export default {
37
37
  }
38
38
 
39
39
  // Update context for the conversation turn
40
- callPathway('sys_search_memory', { ...args, section: 'memoryAll',updateContext: true });
40
+ callPathway('sys_search_memory', { ...args, section: 'memoryAll', updateContext: true });
41
41
 
42
42
  // Check if this conversation turn requires memory updates
43
43
  const memoryRequired = await callPathway('sys_memory_required', {
@@ -38,7 +38,6 @@ export default {
38
38
 
39
39
  let sectionMemory;
40
40
  let result = "";
41
- const lastMessage = args.chatHistory[args.chatHistory.length - 2];
42
41
  if (args.section === "memoryAll") {
43
42
  // Search all sections in parallel
44
43
  const sections = ["memorySelf", "memoryUser", "memoryDirectives", "memoryTopics"];
@@ -51,7 +50,7 @@ export default {
51
50
  result = sections.map((section, i) =>
52
51
  `=== ${section} ===\n${memories[i]}`
53
52
  ).join('\n\n');
54
- result = `${result}\n\nThe last time you spoke to the user was ${new Date().toISOString()} and you said: ${JSON.stringify(lastMessage)}`;
53
+ result = `${result}\n\nThe last time you spoke to the user was ${new Date().toISOString()}.`;
55
54
 
56
55
  } else {
57
56
  sectionMemory = await callPathway("sys_read_memory", {contextId: args.contextId, section: args.section});