@joshuaswarren/openclaw-engram 9.0.2 → 9.0.4

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/dist/index.js CHANGED
@@ -2624,10 +2624,10 @@ Also generate:
2624
2624
 
2625
2625
  Output JSON:
2626
2626
  {
2627
- "facts": [{"category": "decision", "content": "Chose X over Y because...", "importance": 8, "confidence": 0.9}, {"category": "commitment", "content": "Must deliver X by date", "importance": 10, "confidence": 1.0}, {"category": "fact", "content": "X uses Y technology", "importance": 6, "confidence": 0.95}, {"category": "principle", "content": "Always do X to avoid Y", "importance": 8, "confidence": 0.9}],
2628
- "entities": [{"name": "...", "type": "person|company|project|tool|other"}],
2629
- "profileUpdates": ["..."],
2630
- "questions": [{"question": "...", "context": "..."}],
2627
+ "facts": [{"category": "decision", "content": "Chose PostgreSQL over MongoDB for the user service", "importance": 8, "confidence": 0.9}, {"category": "commitment", "content": "Must ship v2.0 API by end of March", "importance": 10, "confidence": 1.0}, {"category": "fact", "content": "The store backend uses Redis for session caching", "importance": 6, "confidence": 0.95, "entityRef": "project-acme-store"}, {"category": "principle", "content": "Always run migrations in a transaction to avoid partial schema updates", "importance": 8, "confidence": 0.9}],
2628
+ "entities": [{"name": "person-jane-doe", "type": "person", "facts": ["Works at Acme Corp", "Prefers Python over JavaScript"]}, {"name": "project-acme-store", "type": "project", "facts": ["Built with Next.js", "Deployed on Vercel"]}],
2629
+ "profileUpdates": ["User prefers dark mode in all editors"],
2630
+ "questions": [{"question": "Which cloud provider hosts the staging environment?", "context": "Came up during deployment discussion", "priority": 0.5}],
2631
2631
  "relationships": [{"source": "person-jane-doe", "target": "company-acme-corp", "label": "works at"}]
2632
2632
  }
2633
2633
 
@@ -2693,11 +2693,11 @@ ${truncatedConversation}`;
2693
2693
 
2694
2694
  Respond with valid JSON matching this schema:
2695
2695
  {
2696
- "facts": [{"category": "decision", "content": "Chose X over Y because...", "importance": 8, "confidence": 0.9, "tags": ["tag1"]}],
2697
- "entities": [{"name": "entity-name", "type": "person"}],
2698
- "profileUpdates": ["User prefers X over Y"],
2699
- "questions": [{"question": "What is...?", "context": "Came up during discussion of...", "priority": 0.5}],
2700
- "relationships": [{"source": "entity-a", "target": "entity-b", "label": "works at"}]
2696
+ "facts": [{"category": "decision", "content": "Chose React over Vue for the dashboard rewrite", "importance": 8, "confidence": 0.9, "tags": ["frontend"]}, {"category": "fact", "content": "The API gateway uses rate limiting at 1000 req/min", "importance": 6, "confidence": 0.95, "tags": ["infra"], "entityRef": "project-dashboard"}],
2697
+ "entities": [{"name": "person-sarah-chen", "type": "person", "facts": ["Leads the backend team", "Joined from Google in 2024"]}, {"name": "project-dashboard", "type": "project", "facts": ["React-based admin panel", "Deployed on AWS ECS"]}],
2698
+ "profileUpdates": ["User prefers TypeScript over plain JavaScript"],
2699
+ "questions": [{"question": "What database does the analytics service use?", "context": "Came up during discussion of migration plan", "priority": 0.5}],
2700
+ "relationships": [{"source": "person-sarah-chen", "target": "project-dashboard", "label": "leads development of"}]
2701
2701
  }`
2702
2702
  },
2703
2703
  { role: "user", content: conversation }
@@ -2960,7 +2960,7 @@ Respond with valid JSON only, matching this schema:
2960
2960
  }
2961
2961
  ],
2962
2962
  "profileUpdates": ["optional profile update"],
2963
- "entityUpdates": [{"name": "entity-name", "type": "person", "facts": ["optional fact"]}]
2963
+ "entityUpdates": [{"name": "person-jane-doe", "type": "person", "facts": ["Now leads the backend team", "Recently migrated the user service to TypeScript"]}]
2964
2964
  }`;
2965
2965
  const response = await this.client.chat.completions.create({
2966
2966
  model: this.config.model,
@@ -5016,7 +5016,8 @@ var EmbedHelper = class {
5016
5016
  headers: provider.headers,
5017
5017
  body: JSON.stringify({
5018
5018
  model: provider.model,
5019
- input: input.slice(0, 8e3)
5019
+ input: input.slice(0, 8e3),
5020
+ encoding_format: "float"
5020
5021
  }),
5021
5022
  signal: AbortSignal.timeout(3e4)
5022
5023
  });
@@ -11643,7 +11644,8 @@ var EmbeddingFallback = class {
11643
11644
  headers: provider.headers,
11644
11645
  body: JSON.stringify({
11645
11646
  model: provider.model,
11646
- input: input.slice(0, 8e3)
11647
+ input: input.slice(0, 8e3),
11648
+ encoding_format: "float"
11647
11649
  })
11648
11650
  });
11649
11651
  if (!res.ok) {