- plugins/gptold.js +41 -1
plugins/gptold.js
CHANGED
@@ -17,7 +17,8 @@ import {
|
|
17 |
JsToPython,
|
18 |
curlCommandCode,
|
19 |
AkenoX19Hybrid,
|
20 |
-
AkenoX19HybridEnglish
|
|
|
21 |
} from '../models.js';
|
22 |
import {
|
23 |
AlibabaTogether,
|
@@ -685,6 +686,45 @@ GptRoutes.get('/api/v1/ai/akenox/al-sholawat', authenticateApiKeyPremium, apiLim
|
|
685 |
}
|
686 |
});
|
687 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
688 |
/**
|
689 |
* @swagger
|
690 |
* /api/v1/ai/akenox/moderator:
|
|
|
17 |
JsToPython,
|
18 |
curlCommandCode,
|
19 |
AkenoX19Hybrid,
|
20 |
+
AkenoX19HybridEnglish,
|
21 |
+
ModeratorAntiEval
|
22 |
} from '../models.js';
|
23 |
import {
|
24 |
AlibabaTogether,
|
|
|
686 |
}
|
687 |
});
|
688 |
|
689 |
+
/**
|
690 |
+
* @swagger
|
691 |
+
* /api/v1/ai/akenox/moderator-anti-eval:
|
692 |
+
* get:
|
693 |
+
* summary: Custom Moderator Anti Eval AI
|
694 |
+
* tags: [AI]
|
695 |
+
* parameters:
|
696 |
+
* - in: query
|
697 |
+
* name: query
|
698 |
+
* required: true
|
699 |
+
* description: User's input query
|
700 |
+
* schema:
|
701 |
+
* type: string
|
702 |
+
* - in: header
|
703 |
+
* name: x-api-key
|
704 |
+
* required: true
|
705 |
+
* description: API key for authentication
|
706 |
+
* schema:
|
707 |
+
* type: string
|
708 |
+
* responses:
|
709 |
+
* 200:
|
710 |
+
* description: Success
|
711 |
+
*/
|
712 |
+
GptRoutes.get('/api/v1/ai/akenox/moderator-anti-eval', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
|
713 |
+
try {
|
714 |
+
const query = req.query.query;
|
715 |
+
if (!query) {
|
716 |
+
return res.status(500).json({ error: "query required" });
|
717 |
+
}
|
718 |
+
const results = await CloudFlareQwenTogether(query, {
|
719 |
+
system_prompt: ModeratorAntiEval
|
720 |
+
});
|
721 |
+
res.json({ results });
|
722 |
+
} catch (error) {
|
723 |
+
res.status(401).json({ error: error.message });
|
724 |
+
}
|
725 |
+
});
|
726 |
+
|
727 |
+
|
728 |
/**
|
729 |
* @swagger
|
730 |
* /api/v1/ai/akenox/moderator:
|