@peopl-health/nexus 2.2.7 → 2.2.8
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.
|
@@ -22,9 +22,12 @@ const activeAssistantController = async (req, res) => {
|
|
|
22
22
|
|
|
23
23
|
const addInsAssistantController = async (req, res) => {
|
|
24
24
|
const { code, instruction } = req.body;
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
try {
|
|
27
|
-
const
|
|
27
|
+
const variant = process.env.VARIANT || 'assistants';
|
|
28
|
+
const role = variant === 'responses' ? 'developer' : 'user';
|
|
29
|
+
|
|
30
|
+
const ans = await addInsAssistant(code, instruction, role);
|
|
28
31
|
if (ans) await sendMessage({code, body: ans, fileType: 'text'});
|
|
29
32
|
return res.status(200).send({ message: 'Add instruction to the assistant' });
|
|
30
33
|
} catch (error) {
|