zudello-integration-sdk 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sdk/Zudello.js +0 -22
package/package.json
CHANGED
package/src/sdk/Zudello.js
CHANGED
|
@@ -165,28 +165,6 @@ class ZudelloSDK extends BaseSDK {
|
|
|
165
165
|
return await axios.get(response.data);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
async ai({ key, model, messages }) {
|
|
169
|
-
const validateIsEmpty = this.validator.isEmpty({ key, model, messages });
|
|
170
|
-
|
|
171
|
-
if (!validateIsEmpty.valid) {
|
|
172
|
-
return this.responseHandler.error(validateIsEmpty.errors);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return await axios.post(
|
|
176
|
-
"https://openrouter.ai/api/v1/chat/completions",
|
|
177
|
-
{
|
|
178
|
-
model,
|
|
179
|
-
messages,
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
headers: {
|
|
183
|
-
Authorization: `Bearer ${key}`,
|
|
184
|
-
"Content-Type": "application/json",
|
|
185
|
-
},
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
168
|
async update({
|
|
191
169
|
model,
|
|
192
170
|
module = null,
|