randydev commited on
Commit
ca631b9
·
verified ·
1 Parent(s): 651c3c3

Update plugins/gptold.js

Browse files
Files changed (1) hide show
  1. plugins/gptold.js +49 -4
plugins/gptold.js CHANGED
@@ -5,7 +5,8 @@ import { NvidiaTogether } from '../lib/@randydev/together/llama.js';
5
  import { CohereAI } from '../lib/@randydev/together/cohere.js';
6
  import {
7
  AlibabaTogether,
8
- CloudFlareQwenTogether
 
9
  } from '../lib/@randydev/together/qwen-ai.js';
10
 
11
  import { CloudFlareMistralTogether } from '../lib/@randydev/together/cloudflare-ai.js';
@@ -95,6 +96,50 @@ GptRoutes.get("/api/v1/ai/openai/whisper-large-v3-turbo", authenticateApiKey, ap
95
  }
96
  });
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  /**
100
  * @swagger
@@ -357,9 +402,9 @@ GptRoutes.get('/api/v1/ai/nvidia/llama-31-70b', authenticateApiKeyPremium, apiLi
357
 
358
  /**
359
  * @swagger
360
- * /api/v1/ai/openai/gpt-old:
361
  * get:
362
- * summary: GPT OLD version turbo
363
  * tags: [AI]
364
  * parameters:
365
  * - in: query
@@ -378,7 +423,7 @@ GptRoutes.get('/api/v1/ai/nvidia/llama-31-70b', authenticateApiKeyPremium, apiLi
378
  * 200:
379
  * description: Success
380
  */
381
- GptRoutes.get('/api/v1/ai/openai/gpt-old', authenticateApiKey, apiLimiter, async (req, res) => {
382
  try {
383
  const query = req.query.query;
384
  const results = await OpenaiRes(query);
 
5
  import { CohereAI } from '../lib/@randydev/together/cohere.js';
6
  import {
7
  AlibabaTogether,
8
+ CloudFlareQwenTogether,
9
+ DeepseekQwenTogether,
10
  } from '../lib/@randydev/together/qwen-ai.js';
11
 
12
  import { CloudFlareMistralTogether } from '../lib/@randydev/together/cloudflare-ai.js';
 
96
  }
97
  });
98
 
99
+ /**
100
+ * @swagger
101
+ * /api/v1/ai/deepseek/deepseek-r1-distill-qwen-32b:
102
+ * get:
103
+ * summary: deepseek r1 distill-qwen-32b
104
+ * tags: [AI]
105
+ * parameters:
106
+ * - in: query
107
+ * name: query
108
+ * required: true
109
+ * description: User's input query
110
+ * schema:
111
+ * type: string
112
+ * - in: query
113
+ * name: system_prompt
114
+ * required: false
115
+ * description: Custom system prompt
116
+ * schema:
117
+ * type: string
118
+ * - in: header
119
+ * name: x-api-key
120
+ * required: true
121
+ * description: API key for authentication
122
+ * schema:
123
+ * type: string
124
+ * responses:
125
+ * 200:
126
+ * description: Success
127
+ */
128
+ GptRoutes.get('/api/v1/ai/deepseek/deepseek-r1-distill-qwen-32b', authenticateApiKeyPremium, apiLimiter, async (req, res) => {
129
+ try {
130
+ const query = req.query.query;
131
+ const system_prompt = req.query.system_prompt || "Your name is AkenoX AI A kind and friendly AI assistant that answers in a short and concise answer. Give short step-by-step reasoning if required.";
132
+
133
+ const results = await DeepseekQwenTogether(query, {
134
+ system_prompt: system_prompt
135
+ });
136
+ res.json({ results });
137
+ } catch (error) {
138
+ res.status(401).json({ error: error.message });
139
+ }
140
+ });
141
+
142
+
143
 
144
  /**
145
  * @swagger
 
402
 
403
  /**
404
  * @swagger
405
+ * /api/v1/ai/openai/gpt-4o:
406
  * get:
407
+ * summary: GPT 4o version turbo
408
  * tags: [AI]
409
  * parameters:
410
  * - in: query
 
423
  * 200:
424
  * description: Success
425
  */
426
+ GptRoutes.get('/api/v1/ai/openai/gpt-4o', authenticateApiKey, apiLimiter, async (req, res) => {
427
  try {
428
  const query = req.query.query;
429
  const results = await OpenaiRes(query);