Update plugins/gptold.js
Browse files- plugins/gptold.js +44 -1
plugins/gptold.js
CHANGED
@@ -3,7 +3,12 @@ import { OpenaiRes } from '../lib/scrapper.js';
|
|
3 |
import { audioContent } from '../lib/all.js';
|
4 |
import { NvidiaTogether } from '../lib/@randydev/together/llama.js';
|
5 |
import { CohereAI } from '../lib/@randydev/together/cohere.js';
|
6 |
-
import {
|
|
|
|
|
|
|
|
|
|
|
7 |
import {
|
8 |
AlibabaTogether,
|
9 |
CloudFlareQwenTogether,
|
@@ -251,6 +256,44 @@ GptRoutes.get('/api/v1/ai/akenox/lu-melayu', authenticateApiKeyPremium, apiLimit
|
|
251 |
}
|
252 |
});
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
/**
|
255 |
* @swagger
|
256 |
* /api/v1/ai/akenox/moderator:
|
|
|
3 |
import { audioContent } from '../lib/all.js';
|
4 |
import { NvidiaTogether } from '../lib/@randydev/together/llama.js';
|
5 |
import { CohereAI } from '../lib/@randydev/together/cohere.js';
|
6 |
+
import {
|
7 |
+
SYSTEMJAWA,
|
8 |
+
SYSTEMSUNDA,
|
9 |
+
SYSTEMMIA,
|
10 |
+
PowerFullModerator
|
11 |
+
} from '../models.js';
|
12 |
import {
|
13 |
AlibabaTogether,
|
14 |
CloudFlareQwenTogether,
|
|
|
256 |
}
|
257 |
});
|
258 |
|
259 |
+
/**
|
260 |
+
* @swagger
|
261 |
+
* /api/v1/ai/akenox/mia-khalifah:
|
262 |
+
* get:
|
263 |
+
* summary: Custom Mia Khalifah AI
|
264 |
+
* tags: [AI]
|
265 |
+
* parameters:
|
266 |
+
* - in: query
|
267 |
+
* name: query
|
268 |
+
* required: true
|
269 |
+
* description: User's input query
|
270 |
+
* schema:
|
271 |
+
* type: string
|
272 |
+
* - in: header
|
273 |
+
* name: x-api-key
|
274 |
+
* required: true
|
275 |
+
* description: API key for authentication
|
276 |
+
* schema:
|
277 |
+
* type: string
|
278 |
+
* responses:
|
279 |
+
* 200:
|
280 |
+
* description: Success
|
281 |
+
*/
|
282 |
+
GptRoutes.get('/api/v1/ai/akenox/mia-khalifah', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
|
283 |
+
try {
|
284 |
+
const query = req.query.query;
|
285 |
+
if (!query) {
|
286 |
+
return res.status(500).json({ error: "query required" });
|
287 |
+
}
|
288 |
+
const results = await CloudFlareQwenTogether(query, {
|
289 |
+
system_prompt: SYSTEMMIA
|
290 |
+
});
|
291 |
+
res.json({ results });
|
292 |
+
} catch (error) {
|
293 |
+
res.status(401).json({ error: error.message });
|
294 |
+
}
|
295 |
+
});
|
296 |
+
|
297 |
/**
|
298 |
* @swagger
|
299 |
* /api/v1/ai/akenox/moderator:
|