@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.
- package/lib/eval/EvalProvider.js +9 -1
- package/package.json +1 -1
package/lib/eval/EvalProvider.js
CHANGED
|
@@ -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
|
-
|
|
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) {
|