randydev commited on
Commit
3f8234b
·
verified ·
1 Parent(s): 1c3c423

Update plugins/gptold.js

Browse files
Files changed (1) hide show
  1. plugins/gptold.js +34 -0
plugins/gptold.js CHANGED
@@ -3,10 +3,44 @@ import { OpenaiRes } from '../lib/scrapper.js';
3
  import { NvidiaTogether } from '../lib/@randydev/together/llama.js';
4
  import { CohereAI } from '../lib/@randydev/together/cohere.js';
5
  import { AlibabaTogether } from '../lib/@randydev/together/qwen-ai.js';
 
6
  import { authenticateApiKey, authenticateApiKeyPremium, apiLimiter } from '../middleware/midware.js';
7
  const GptRoutes = express.Router();
8
 
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * @swagger
12
  * /api/v1/ai/alibaba/qwen-plus:
 
3
  import { NvidiaTogether } from '../lib/@randydev/together/llama.js';
4
  import { CohereAI } from '../lib/@randydev/together/cohere.js';
5
  import { AlibabaTogether } from '../lib/@randydev/together/qwen-ai.js';
6
+ import { DeepSeekR1 } from '../lib/@randydev/together/blackbox.js';
7
  import { authenticateApiKey, authenticateApiKeyPremium, apiLimiter } from '../middleware/midware.js';
8
  const GptRoutes = express.Router();
9
 
10
 
11
+ /**
12
+ * @swagger
13
+ * /api/v1/ai/deepseek/Deepseek-R1:
14
+ * get:
15
+ * summary: Deepseek R1
16
+ * tags: [AI]
17
+ * parameters:
18
+ * - in: query
19
+ * name: query
20
+ * required: true
21
+ * description: User's input query
22
+ * schema:
23
+ * type: string
24
+ * - in: header
25
+ * name: x-api-key
26
+ * required: true
27
+ * description: API key for authentication
28
+ * schema:
29
+ * type: string
30
+ * responses:
31
+ * 200:
32
+ * description: Success
33
+ */
34
+ GptRoutes.get('/api/v1/ai/deepseek/deepseek-R1', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
35
+ try {
36
+ const query = req.query.query;
37
+ const results = await DeepSeekR1(query);
38
+ res.json({ results });
39
+ } catch (error) {
40
+ res.status(401).json({ error: error.message });
41
+ }
42
+ });
43
+
44
  /**
45
  * @swagger
46
  * /api/v1/ai/alibaba/qwen-plus: