update
Browse files- models.js +6 -0
- plugins/gptold.js +40 -0
models.js
CHANGED
@@ -101,6 +101,12 @@ Kamu adalah asisten AI yang sabar dan bijak. Kalau ada orang sok jago coding, in
|
|
101 |
- Jangan malah bikin masalah makin numpuk
|
102 |
`;
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
const GptModelOld = (prompt) => ({
|
105 |
model: "gpt-4o",
|
106 |
prompt: prompt,
|
|
|
101 |
- Jangan malah bikin masalah makin numpuk
|
102 |
`;
|
103 |
|
104 |
+
export const ALLQURAN_SHOLAWAT = `
|
105 |
+
kamu adalah asisten buat bikin lirik lagu sholawat. fokus ke unsur syair islami yang indah, memuji Nabi Muhammad SAW dengan bahasa yang lembut dan penuh cinta. pakai metafor alam seperti bulan, bintang, lautan, dan angin sebagai simbol cinta kepada Nabi. pastikan liriknya rima dan enak didengar.
|
106 |
+
|
107 |
+
gunakan bahasa Indonesia atau Arab sesuai permintaan. kalau diminta campur-campur, boleh juga! ingat, tetap jaga kesucian tema dan hindari kata-kata yang terlalu berlebihan atau tidak sopan.
|
108 |
+
`;
|
109 |
+
|
110 |
const GptModelOld = (prompt) => ({
|
111 |
model: "gpt-4o",
|
112 |
prompt: prompt,
|
plugins/gptold.js
CHANGED
@@ -9,6 +9,7 @@ import {
|
|
9 |
SYSTEMMIA,
|
10 |
PowerFullModerator,
|
11 |
SENSIFIFNOCODE,
|
|
|
12 |
} from '../models.js';
|
13 |
import {
|
14 |
AlibabaTogether,
|
@@ -333,6 +334,45 @@ GptRoutes.get('/api/v1/ai/akenox/mia-khalifah', authenticateApiKeyPremium, apiLi
|
|
333 |
}
|
334 |
});
|
335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
/**
|
337 |
* @swagger
|
338 |
* /api/v1/ai/akenox/moderator:
|
|
|
9 |
SYSTEMMIA,
|
10 |
PowerFullModerator,
|
11 |
SENSIFIFNOCODE,
|
12 |
+
ALLQURAN_SHOLAWAT,
|
13 |
} from '../models.js';
|
14 |
import {
|
15 |
AlibabaTogether,
|
|
|
334 |
}
|
335 |
});
|
336 |
|
337 |
+
/**
|
338 |
+
* @swagger
|
339 |
+
* /api/v1/ai/akenox/al-sholawat:
|
340 |
+
* get:
|
341 |
+
* summary: Custom Al-Sholawat AI
|
342 |
+
* tags: [AI]
|
343 |
+
* parameters:
|
344 |
+
* - in: query
|
345 |
+
* name: query
|
346 |
+
* required: true
|
347 |
+
* description: User's input query
|
348 |
+
* schema:
|
349 |
+
* type: string
|
350 |
+
* - in: header
|
351 |
+
* name: x-api-key
|
352 |
+
* required: true
|
353 |
+
* description: API key for authentication
|
354 |
+
* schema:
|
355 |
+
* type: string
|
356 |
+
* responses:
|
357 |
+
* 200:
|
358 |
+
* description: Success
|
359 |
+
*/
|
360 |
+
GptRoutes.get('/api/v1/ai/akenox/al-sholawat', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
|
361 |
+
try {
|
362 |
+
const query = req.query.query;
|
363 |
+
if (!query) {
|
364 |
+
return res.status(500).json({ error: "query required" });
|
365 |
+
}
|
366 |
+
const results = await CloudFlareQwenTogether(query, {
|
367 |
+
system_prompt: ALLQURAN_SHOLAWAT
|
368 |
+
});
|
369 |
+
res.json({ results });
|
370 |
+
} catch (error) {
|
371 |
+
res.status(401).json({ error: error.message });
|
372 |
+
}
|
373 |
+
});
|
374 |
+
|
375 |
+
|
376 |
/**
|
377 |
* @swagger
|
378 |
* /api/v1/ai/akenox/moderator:
|