randydev commited on
Commit
be7fc34
·
verified ·
1 Parent(s): 8ebf908

Update plugins/alldownloader.js

Browse files
Files changed (1) hide show
  1. plugins/alldownloader.js +48 -0
plugins/alldownloader.js CHANGED
@@ -100,6 +100,54 @@ AllDlRoutes.get('/api/v1/custom/itzpire', apiLimiter, async (req, res) => {
100
  }
101
  });
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
  /**
105
  * @swagger
 
100
  }
101
  });
102
 
103
+ /**
104
+ * @swagger
105
+ * /api/v1/ai/botika:
106
+ * get:
107
+ * summary: Ai botika
108
+ * tags: [AI]
109
+ * parameters:
110
+ * - in: query
111
+ * name: q
112
+ * required: true
113
+ * description: q
114
+ * schema:
115
+ * type: string
116
+ * - in: query
117
+ * name: model
118
+ * required: false
119
+ * description: null
120
+ * schema:
121
+ * type: string
122
+ * responses:
123
+ * 200:
124
+ * description: Success
125
+ * 400:
126
+ * description: Bad Request (e.g., missing or invalid parameters)
127
+ * 401:
128
+ * description: Unauthorized (e.g., missing or invalid API key)
129
+ * 500:
130
+ * description: Internal Server Error
131
+ */
132
+ AllDlRoutes.get('/api/v1/ai/botika', apiLimiter, async (req, res) => {
133
+ try {
134
+ const q = req.query.q;
135
+ const model = req.query.model || "siska";
136
+ const params = {
137
+ "q": q,
138
+ "model": model
139
+ }
140
+ if (!q) {
141
+ return res.status(400).json({ error: "parameters are required." });
142
+ }
143
+ const results = await IzreCustom(url, params);
144
+ res.json({ message: results });
145
+ } catch (error) {
146
+ res.status(500).json({ error: error.message });
147
+ }
148
+ });
149
+
150
+
151
 
152
  /**
153
  * @swagger