@peopl-health/nexus 2.5.7-fix-message-storage → 2.5.7-fix-truncation

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.
@@ -35,7 +35,7 @@ const addInsAssistantController = async (req, res) => {
35
35
  };
36
36
 
37
37
  const addMsgAssistantController = async (req, res) => {
38
- const { code, messages, role = 'user', reply = false } = req.body;
38
+ const { code, messages, role = 'system', reply = false } = req.body;
39
39
 
40
40
  try {
41
41
  const assistantReply = await addMsgAssistant(code, messages, role, reply);
@@ -258,7 +258,7 @@ class OpenAIResponsesProvider {
258
258
  topP,
259
259
  temperature,
260
260
  maxOutputTokens,
261
- truncationStrategy,
261
+ truncationStrategy = 'auto',
262
262
  tools = [],
263
263
  model,
264
264
  assistant,
@@ -72,7 +72,7 @@ const createAssistantCore = async (code, assistant_id, messages = [], force = fa
72
72
  }
73
73
  };
74
74
 
75
- const addMsgAssistantCore = async (code, inMessages, role = 'user', reply = false, skipSystemMessage = false) => {
75
+ const addMsgAssistantCore = async (code, inMessages, role = 'system', reply = false, skipSystemMessage = false) => {
76
76
  const thread = await getThread(code);
77
77
  if (!thread) return null;
78
78
 
@@ -121,7 +121,7 @@ const addMsgAssistantCore = async (code, inMessages, role = 'user', reply = fals
121
121
  }
122
122
  };
123
123
 
124
- const addInstructionCore = async (code, instruction, role = 'user') => {
124
+ const addInstructionCore = async (code, instruction, role = 'system') => {
125
125
  const thread = await getThread(code);
126
126
  if (!thread) return null;
127
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "2.5.7-fix-message-storage",
3
+ "version": "2.5.7-fix-truncation",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",