aotrautils 0.0.673 → 0.0.675

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 (21/10/2023-01:11:48)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (21/10/2023-15:22:11)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5057,7 +5057,7 @@ class OpenAIAPIClient{
5057
5057
  lognow("------------self.apiURL:",self.apiURL);
5058
5058
 
5059
5059
 
5060
- return (async ()=>{
5060
+ return await (async ()=>{
5061
5061
  const p=new Promise((resolve,reject)=>{
5062
5062
  fetch(self.apiURL, {
5063
5063
  method: "POST",
@@ -5070,7 +5070,16 @@ class OpenAIAPIClient{
5070
5070
  messages,
5071
5071
  }),
5072
5072
  })
5073
- .then(response => response.json())
5073
+ // STRANGE : DOES NOT WORK !!:
5074
+ //.then(response => response.json())
5075
+ // STRANGE : DOES WORK :
5076
+ .then(response => {
5077
+
5078
+ // DBG
5079
+ console.log("~~~~~~~~~~~response :",response);
5080
+
5081
+ return response.json();
5082
+ })
5074
5083
  .then(data => {
5075
5084
 
5076
5085
  if(data.error){
@@ -5084,8 +5093,6 @@ class OpenAIAPIClient{
5084
5093
  // DBG
5085
5094
  console.log("~~~~~~~~~~~data :",data);
5086
5095
 
5087
- ////
5088
-
5089
5096
  const assistantReply = data.choices[0].message.content;
5090
5097
  resolve(assistantReply);
5091
5098
  })
@@ -5128,7 +5135,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5128
5135
 
5129
5136
 
5130
5137
 
5131
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (21/10/2023-01:11:48)»*/
5138
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (21/10/2023-15:22:11)»*/
5132
5139
  /*-----------------------------------------------------------------------------*/
5133
5140
  /* ## Utility global methods in a browser (htmljs) client environment.
5134
5141
  *
@@ -13370,7 +13377,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13370
13377
 
13371
13378
 
13372
13379
 
13373
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (21/10/2023-01:11:48)»*/
13380
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (21/10/2023-15:22:11)»*/
13374
13381
  /*-----------------------------------------------------------------------------*/
13375
13382
 
13376
13383
 
@@ -14609,7 +14616,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14609
14616
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14610
14617
 
14611
14618
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14612
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (21/10/2023-01:11:48)»*/
14619
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (21/10/2023-15:22:11)»*/
14613
14620
  /*-----------------------------------------------------------------------------*/
14614
14621
 
14615
14622
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.673",
3
+ "version": "0.0.675",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",