update
Browse files- models.js +5 -4
- plugins/gptold.js +16 -2
models.js
CHANGED
@@ -70,15 +70,16 @@ Sekiranya tidak pasti tentang sesuatu jawapan, nyatakan bahawa kamu tidak tahu d
|
|
70 |
Mulailah percakapan dengan nada yang positif dan membantu!
|
71 |
`;
|
72 |
|
73 |
-
export const
|
74 |
-
|
|
|
75 |
|
76 |
blacklist_keywords: ["anjing", "bodoh", "tolol", "ngentot", "kontol"]
|
77 |
-
detected_blacklist: "@xpushz DETECTED_BLACKLIST: {keyword} - ACTION: BAN USER"
|
78 |
-
response_to_user": "Pesan Anda melanggar aturan komunitas. Anda telah diblokir!"
|
79 |
action: "BAN USER"
|
80 |
command: "/ban"
|
81 |
`;
|
|
|
|
|
82 |
|
83 |
const GptModelOld = (prompt) => ({
|
84 |
model: "gpt-4o",
|
|
|
70 |
Mulailah percakapan dengan nada yang positif dan membantu!
|
71 |
`;
|
72 |
|
73 |
+
export const PowerFullModerator = (username) => {
|
74 |
+
return `
|
75 |
+
Kamu adalah AI moderator super pintar. Tugas kamu adalah memantau percakapan dan mengenali kata-kata yang masuk ke dalam daftar blacklist. Jika ada pengguna yang menggunakan kata-kata terlarang, segera laporkan dengan format: '@${username} DETECTED_BLACKLIST: [kata blacklist] - ACTION: BAN USER'. Ingat, tanggapi dengan cepat dan akurat!
|
76 |
|
77 |
blacklist_keywords: ["anjing", "bodoh", "tolol", "ngentot", "kontol"]
|
|
|
|
|
78 |
action: "BAN USER"
|
79 |
command: "/ban"
|
80 |
`;
|
81 |
+
}
|
82 |
+
|
83 |
|
84 |
const GptModelOld = (prompt) => ({
|
85 |
model: "gpt-4o",
|
plugins/gptold.js
CHANGED
@@ -3,7 +3,7 @@ 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 { SYSTEMJAWA, SYSTEMSUNDA,
|
7 |
import {
|
8 |
AlibabaTogether,
|
9 |
CloudFlareQwenTogether,
|
@@ -264,6 +264,12 @@ GptRoutes.get('/api/v1/ai/akenox/lu-melayu', authenticateApiKeyPremium, apiLimit
|
|
264 |
* description: User's input query
|
265 |
* schema:
|
266 |
* type: string
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
* - in: header
|
268 |
* name: x-api-key
|
269 |
* required: true
|
@@ -277,8 +283,16 @@ GptRoutes.get('/api/v1/ai/akenox/lu-melayu', authenticateApiKeyPremium, apiLimit
|
|
277 |
GptRoutes.get('/api/v1/ai/akenox/moderator', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
|
278 |
try {
|
279 |
const query = req.query.query;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
const results = await CloudFlareQwenTogether(query, {
|
281 |
-
system_prompt:
|
282 |
});
|
283 |
res.json({ results });
|
284 |
} catch (error) {
|
|
|
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 { SYSTEMJAWA, SYSTEMSUNDA, PowerFullModerator } from '../models.js';
|
7 |
import {
|
8 |
AlibabaTogether,
|
9 |
CloudFlareQwenTogether,
|
|
|
264 |
* description: User's input query
|
265 |
* schema:
|
266 |
* type: string
|
267 |
+
* - in: query
|
268 |
+
* name: username
|
269 |
+
* required: true
|
270 |
+
* description: Owner's username
|
271 |
+
* schema:
|
272 |
+
* type: string
|
273 |
* - in: header
|
274 |
* name: x-api-key
|
275 |
* required: true
|
|
|
283 |
GptRoutes.get('/api/v1/ai/akenox/moderator', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
|
284 |
try {
|
285 |
const query = req.query.query;
|
286 |
+
const username = req.query.username;
|
287 |
+
if (!username) {
|
288 |
+
return res.status(500).json({ error: "username required" });
|
289 |
+
}
|
290 |
+
if (!query) {
|
291 |
+
return res.status(500).json({ error: "query required" });
|
292 |
+
}
|
293 |
+
const systemResult = PowerFullModerator(username);
|
294 |
const results = await CloudFlareQwenTogether(query, {
|
295 |
+
system_prompt: systemResult
|
296 |
});
|
297 |
res.json({ results });
|
298 |
} catch (error) {
|