@peopl-health/nexus 3.11.3 → 3.11.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.
@@ -168,7 +168,15 @@ class EvalProvider {
168
168
 
169
169
  _buildApiConfig(devContent, messages, assistantId, promptVariables, toolSchemas) {
170
170
  const convertedMessages = this.provider._convertItemsToApiFormat(messages);
171
- const input = [{ role: 'developer', content: devContent }, ...convertedMessages];
171
+
172
+ const memoryParts = [];
173
+ if (promptVariables?.patient_memories) memoryParts.push(`--- Memoria del paciente ---\n${promptVariables.patient_memories}`);
174
+ if (promptVariables?.conversation_summaries) memoryParts.push(`--- Resumen de conversaciones recientes ---\n${promptVariables.conversation_summaries}`);
175
+ const memoryMessage = memoryParts.length > 0
176
+ ? [{ role: 'developer', content: memoryParts.join('\n\n') }]
177
+ : [];
178
+
179
+ const input = [{ role: 'developer', content: devContent }, ...memoryMessage, ...convertedMessages];
172
180
  const apiConfig = { input, instructions: devContent || '' };
173
181
 
174
182
  if (assistantId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "3.11.3",
3
+ "version": "3.11.4",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",