@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 = '
|
|
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);
|
|
@@ -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 = '
|
|
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 = '
|
|
124
|
+
const addInstructionCore = async (code, instruction, role = 'system') => {
|
|
125
125
|
const thread = await getThread(code);
|
|
126
126
|
if (!thread) return null;
|
|
127
127
|
|