aotrautils-srv 0.0.914 → 0.0.916
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (07/04/2024-16:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (07/04/2024-16:34:49)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5232,7 +5232,7 @@ class OpenAIAPIClient{
|
|
|
5232
5232
|
const error=data.error;
|
|
5233
5233
|
// TRACE
|
|
5234
5234
|
console.error("Error:", error);
|
|
5235
|
-
reject(`${error}`);
|
|
5235
|
+
reject(new Error(`${error}`));
|
|
5236
5236
|
}
|
|
5237
5237
|
|
|
5238
5238
|
const assistantReply = data.choices[0].message.content;
|
|
@@ -5248,19 +5248,13 @@ class OpenAIAPIClient{
|
|
|
5248
5248
|
});
|
|
5249
5249
|
|
|
5250
5250
|
|
|
5251
|
-
|
|
5251
|
+
// DOES NOT WORK :
|
|
5252
5252
|
// return new Promise((resolve,reject)=>{
|
|
5253
5253
|
//
|
|
5254
5254
|
// fetch(self.apiURL, {
|
|
5255
5255
|
// method: "POST",
|
|
5256
|
-
// headers:
|
|
5257
|
-
//
|
|
5258
|
-
// "Content-Type": "application/json",
|
|
5259
|
-
// },
|
|
5260
|
-
// body: JSON.stringify({
|
|
5261
|
-
// model:self.modelName,
|
|
5262
|
-
// messages,
|
|
5263
|
-
// }),
|
|
5256
|
+
// headers: headers,
|
|
5257
|
+
// body: JSON.stringify(parameters),
|
|
5264
5258
|
// })
|
|
5265
5259
|
// // STRANGE : DOES NOT WORK !!:
|
|
5266
5260
|
// //.then(response => response.json())
|
|
@@ -5323,7 +5317,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5323
5317
|
|
|
5324
5318
|
|
|
5325
5319
|
|
|
5326
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (07/04/2024-16:
|
|
5320
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (07/04/2024-16:34:49)»*/
|
|
5327
5321
|
/*-----------------------------------------------------------------------------*/
|
|
5328
5322
|
|
|
5329
5323
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.916",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|