@peopl-health/nexus 1.4.7 → 1.5.0

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.
@@ -77,7 +77,7 @@ const createAssistantController = async (req, res) => {
77
77
  };
78
78
 
79
79
  const getInfoAssistantController = async (req, res) => {
80
- const { code } = req.query;
80
+ const { code } = req.body;
81
81
 
82
82
  try {
83
83
  let threadInfo = await getThreadInfo(code);
@@ -6,7 +6,7 @@ const assistantRouteDefinitions = {
6
6
  'POST /add-instruction': 'addInsAssistantController',
7
7
  'POST /add-msg': 'addMsgAssistantController',
8
8
  'POST /create': 'createAssistantController',
9
- 'GET /info': 'getInfoAssistantController',
9
+ 'POST /info': 'getInfoAssistantController',
10
10
  'GET /list': 'listAssistantController',
11
11
  'POST /switch': 'switchAssistantController',
12
12
  'POST /stop': 'stopAssistantController'
@@ -221,7 +221,7 @@ const replyAssistant = async function (code, message_ = null, thread_ = null, ru
221
221
  console.log('THREAD STOPPED', code, thread?.active);
222
222
  if (!thread || !thread.active) return null;
223
223
 
224
- const patientReply = message_ ? [message_] : await getLastMessages(code);
224
+ const patientReply = await getLastMessages(code);
225
225
  console.log('UNREAD DATA', patientReply);
226
226
  if (!patientReply) {
227
227
  console.log('No relevant data found for this assistant.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "publishConfig": {
6
6
  "access": "public"