aotrautils-srv 0.0.659 → 0.0.661

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 (20/10/2023-00:27:59)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (20/10/2023-00:31:08)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5072,8 +5072,18 @@ class OpenAIAPIClient{
5072
5072
  })
5073
5073
  .then(response => response.json())
5074
5074
  .then(data => {
5075
+
5076
+ if(data.error){
5077
+ // TRACE
5078
+ console.error("Error:", error);
5079
+ reject(""+error);
5080
+ return;
5081
+ }
5082
+
5075
5083
  // DBG
5076
- console.log("data :",data);
5084
+ console.log("~~~~~~~~~~~data :",data);
5085
+
5086
+ ////
5077
5087
 
5078
5088
  const assistantReply = data.choices[0].message.content;
5079
5089
  resolve(assistantReply);
@@ -5121,7 +5131,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5121
5131
 
5122
5132
 
5123
5133
 
5124
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (20/10/2023-00:27:59)»*/
5134
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (20/10/2023-00:31:08)»*/
5125
5135
  /*-----------------------------------------------------------------------------*/
5126
5136
 
5127
5137
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.659",
3
+ "version": "0.0.661",
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)",