aotrautils 0.0.1974 → 0.0.1977

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 (17/08/2026-21:06:40)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (09/09/2026-01:10:37)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -489,6 +489,8 @@ window.aotestMethods.getScenariiByName=function(allTests, scenariiNames){
489
489
  }, null, null, scenario=>contains(scenariiNames,scenario.name));
490
490
  return results;
491
491
  }
492
+
493
+ // Structure : appId > testsType > test > scenario
492
494
  window.aotestMethods.getNumberOfScenariiInApp=function(allTestsBagForClientIdForAppReadOnly, testsType){
493
495
  let currentScenariiNumberInApp=0;
494
496
  window.aotestMethods.iterateOverScenarii(allTestsBagForClientIdForAppReadOnly, (scenario)=>{
@@ -498,7 +500,7 @@ window.aotestMethods.getNumberOfScenariiInApp=function(allTestsBagForClientIdFor
498
500
  }
499
501
  window.aotestMethods.getNumberOfScenariiInGlobal=function(allTestsBagForClientReadOnly, testsType){
500
502
  let currentScenariiNumber=0;
501
- foreach(allTestsBagForClientReadOnly, (allTestsBag, appName)=>{
503
+ foreach(allTestsBagForClientReadOnly, (allTestsBag, appId)=>{
502
504
  currentScenariiNumber+=aotestMethods.getNumberOfScenariiInApp(allTestsBag, testsType);
503
505
  });
504
506
  return currentScenariiNumber;
@@ -5473,7 +5475,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
5473
5475
 
5474
5476
 
5475
5477
 
5476
- /*utils CLIENT library associated with aotra version : «1_29072022-2359 (17/08/2026-21:06:40)»*/
5478
+ /*utils CLIENT library associated with aotra version : «1_29072022-2359 (09/09/2026-01:10:37)»*/
5477
5479
  /*-----------------------------------------------------------------------------*/
5478
5480
  /* ## Utility global methods in a browser (htmljs) client environment.
5479
5481
  *
@@ -12988,7 +12990,7 @@ window.createOritaMicroClient=function(url, port, isNode=false, staticMicroClien
12988
12990
 
12989
12991
 
12990
12992
 
12991
- /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (17/08/2026-21:06:40)»*/
12993
+ /*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (09/09/2026-01:10:37)»*/
12992
12994
  /*-----------------------------------------------------------------------------*/
12993
12995
 
12994
12996
 
@@ -14050,10 +14052,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
14050
14052
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
14051
14053
 
14052
14054
  window.AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
14053
- /*utils 3D library associated with aotra version : «1_29072022-2359 (17/08/2026-21:06:40)»*/
14055
+ /*utils 3D library associated with aotra version : «1_29072022-2359 (09/09/2026-01:10:37)»*/
14054
14056
  /*-----------------------------------------------------------------------------*/
14055
14057
 
14056
- /*utils AI library associated with aotra version : «1_29072022-2359 (17/08/2026-21:06:40)»*/
14058
+ /*utils AI library associated with aotra version : «1_29072022-2359 (09/09/2026-01:10:37)»*/
14057
14059
  /*-----------------------------------------------------------------------------*/
14058
14060
 
14059
14061
 
@@ -14131,9 +14133,15 @@ window.LLMAPIClient=class LLMAPIClient{
14131
14133
 
14132
14134
  const messages=this.getMessages(newDefaultPrompt, userPrompt);
14133
14135
 
14134
- const result=await this.launchRequest(AIAPIKey, messages);
14136
+ try{
14137
+ const result=await this.launchLLMRequest(AIAPIKey, messages);
14138
+ return result;
14139
+ }catch(error){
14140
+ // TRACE
14141
+ lognow("ERROR : LLM provider returned an error when prompted, returning error object, wrapped : ",error);
14142
+ return {error:error};
14143
+ }
14135
14144
 
14136
- return result;
14137
14145
  }
14138
14146
 
14139
14147
 
@@ -14146,14 +14154,14 @@ window.LLMAPIClient=class LLMAPIClient{
14146
14154
  }
14147
14155
 
14148
14156
 
14149
- /*private*/launchRequest(AIAPIKey, messages){
14157
+ /*private*/launchLLMRequest(AIAPIKey, messages){
14150
14158
 
14151
14159
  const self=this;
14152
14160
 
14153
14161
 
14154
14162
  const headers=this.getAPIRequestHeaders(AIAPIKey);
14155
14163
 
14156
- const parameters=getAPIRequestParameters(messages);
14164
+ const parameters=this.getAPIRequestParameters(messages);
14157
14165
 
14158
14166
  return new Promise((resolve,reject)=>{
14159
14167
  performHTTPRequest(this.apiURL, "POST", headers, parameters, true).then((responseObj)=>{
@@ -14165,9 +14173,10 @@ window.LLMAPIClient=class LLMAPIClient{
14165
14173
 
14166
14174
  if(data.error){
14167
14175
  const error=data.error;
14176
+
14168
14177
  // TRACE
14169
- console.error("Error:", error);
14170
- reject(new Error(`${error}`));
14178
+ lognow("ERROR:", error);
14179
+ reject(error);
14171
14180
  }
14172
14181
 
14173
14182
  const assistantReply=self.getAssistantReply(data);
@@ -14176,6 +14185,7 @@ window.LLMAPIClient=class LLMAPIClient{
14176
14185
  }).catch(errorObj=>{
14177
14186
  const error=errorObj.error;
14178
14187
  const httpStatus=errorObj.httpStatus;
14188
+
14179
14189
  // TRACE
14180
14190
  lognow("ERROR:", error);
14181
14191
  reject(error);
@@ -14313,7 +14323,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
14313
14323
 
14314
14324
 
14315
14325
 
14316
- /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (17/08/2026-21:06:40)»*/
14326
+ /*utils CONSOLE library associated with aotra version : «1_29072022-2359 (09/09/2026-01:10:37)»*/
14317
14327
  /*-----------------------------------------------------------------------------*/
14318
14328
 
14319
14329
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1974",
3
+ "version": "0.0.1977",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "aotrautils",
9
- "version": "0.0.1974",
9
+ "version": "0.0.1977",
10
10
  "license": "HGPL-1.0",
11
11
  "dependencies": {
12
12
  "atob": "^2.1.2",
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.1974",
3
+ "version": "0.0.1977",
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)",