aotrautils 0.0.650 → 0.0.651

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 (19/10/2023-23:30:02)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (19/10/2023-23:54:35)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -5050,7 +5050,10 @@ class OpenAIAPIClient{
5050
5050
  { role: "user", content: (this.prompt + additionalPrompt) },
5051
5051
  ];
5052
5052
 
5053
- async function getResult(){
5053
+ //DBG
5054
+ lognow("!!!!!!self.apiURL:",self.apiURL);
5055
+ /*
5056
+ const result=()=>{
5054
5057
  const p=new Promise((resolve,reject)=>{
5055
5058
 
5056
5059
  fetch(self.apiURL, {
@@ -5064,30 +5067,25 @@ class OpenAIAPIClient{
5064
5067
  messages,
5065
5068
  }),
5066
5069
  })
5067
- .then(response => response.json())
5068
- .then(data => {
5069
- // DBG
5070
- // console.log("data :",data);
5071
- const assistantReply = data.choices[0].message.content;
5072
- resolve(assistantReply);
5073
- })
5074
- .catch(error => {
5075
- // TRACE
5076
- console.error("Error:", error);
5077
- reject(""+error);
5078
- });
5079
-
5080
- });
5081
-
5082
- const r=await p;
5070
+ .then(response => response.json())
5071
+ .then(data => {
5072
+ // DBG
5073
+ // console.log("data :",data);
5074
+ const assistantReply = data.choices[0].message.content;
5075
+ resolve(assistantReply);
5076
+ })
5077
+ .catch(error => {
5078
+ // TRACE
5079
+ console.error("Error:", error);
5080
+ reject(""+error);
5081
+ });
5083
5082
 
5083
+ }();
5084
+
5084
5085
  // DBG
5085
- // console.log("! RESULT text :",r);
5086
-
5087
- return r;
5088
- }
5089
-
5090
- return getResult();
5086
+ console.log("! RESULT text :",result);
5087
+ */
5088
+ return result;
5091
5089
  }
5092
5090
 
5093
5091
 
@@ -5111,7 +5109,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
5111
5109
 
5112
5110
 
5113
5111
 
5114
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/10/2023-23:30:02)»*/
5112
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (19/10/2023-23:54:35)»*/
5115
5113
  /*-----------------------------------------------------------------------------*/
5116
5114
  /* ## Utility global methods in a browser (htmljs) client environment.
5117
5115
  *
@@ -13353,7 +13351,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
13353
13351
 
13354
13352
 
13355
13353
 
13356
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/10/2023-23:30:02)»*/
13354
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (19/10/2023-23:54:35)»*/
13357
13355
  /*-----------------------------------------------------------------------------*/
13358
13356
 
13359
13357
 
@@ -14592,7 +14590,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
14592
14590
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14593
14591
 
14594
14592
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14595
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (19/10/2023-23:30:02)»*/
14593
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (19/10/2023-23:54:35)»*/
14596
14594
  /*-----------------------------------------------------------------------------*/
14597
14595
 
14598
14596
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.650",
3
+ "version": "0.0.651",
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)",