aotrautils-srv 0.0.1973 → 0.0.1975
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 (09/09/2026-
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (09/09/2026-01:11:24)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5475,7 +5475,7 @@ window.AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5475
5475
|
|
|
5476
5476
|
|
|
5477
5477
|
|
|
5478
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (09/09/2026-
|
|
5478
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (09/09/2026-01:11:24)»*/
|
|
5479
5479
|
/*-----------------------------------------------------------------------------*/
|
|
5480
5480
|
|
|
5481
5481
|
|
|
@@ -5553,9 +5553,15 @@ window.LLMAPIClient=class LLMAPIClient{
|
|
|
5553
5553
|
|
|
5554
5554
|
const messages=this.getMessages(newDefaultPrompt, userPrompt);
|
|
5555
5555
|
|
|
5556
|
-
|
|
5556
|
+
try{
|
|
5557
|
+
const result=await this.launchLLMRequest(AIAPIKey, messages);
|
|
5558
|
+
return result;
|
|
5559
|
+
}catch(error){
|
|
5560
|
+
// TRACE
|
|
5561
|
+
lognow("ERROR : LLM provider returned an error when prompted, returning error object, wrapped : ",error);
|
|
5562
|
+
return {error:error};
|
|
5563
|
+
}
|
|
5557
5564
|
|
|
5558
|
-
return result;
|
|
5559
5565
|
}
|
|
5560
5566
|
|
|
5561
5567
|
|
|
@@ -5568,7 +5574,7 @@ window.LLMAPIClient=class LLMAPIClient{
|
|
|
5568
5574
|
}
|
|
5569
5575
|
|
|
5570
5576
|
|
|
5571
|
-
/*private*/
|
|
5577
|
+
/*private*/launchLLMRequest(AIAPIKey, messages){
|
|
5572
5578
|
|
|
5573
5579
|
const self=this;
|
|
5574
5580
|
|
|
@@ -5587,9 +5593,10 @@ window.LLMAPIClient=class LLMAPIClient{
|
|
|
5587
5593
|
|
|
5588
5594
|
if(data.error){
|
|
5589
5595
|
const error=data.error;
|
|
5596
|
+
|
|
5590
5597
|
// TRACE
|
|
5591
|
-
|
|
5592
|
-
reject(
|
|
5598
|
+
lognow("ERROR:", error);
|
|
5599
|
+
reject(error);
|
|
5593
5600
|
}
|
|
5594
5601
|
|
|
5595
5602
|
const assistantReply=self.getAssistantReply(data);
|
|
@@ -5598,6 +5605,7 @@ window.LLMAPIClient=class LLMAPIClient{
|
|
|
5598
5605
|
}).catch(errorObj=>{
|
|
5599
5606
|
const error=errorObj.error;
|
|
5600
5607
|
const httpStatus=errorObj.httpStatus;
|
|
5608
|
+
|
|
5601
5609
|
// TRACE
|
|
5602
5610
|
lognow("ERROR:", error);
|
|
5603
5611
|
reject(error);
|
|
@@ -5735,7 +5743,7 @@ window.getLLMAPIClient=(modelName, apiURL, agentRole, defaultPrompt, llmProvider
|
|
|
5735
5743
|
|
|
5736
5744
|
|
|
5737
5745
|
|
|
5738
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (09/09/2026-
|
|
5746
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (09/09/2026-01:11:24)»*/
|
|
5739
5747
|
/*-----------------------------------------------------------------------------*/
|
|
5740
5748
|
|
|
5741
5749
|
|
aotrautils-srv/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1975",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "aotrautils-srv",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1975",
|
|
10
10
|
"license": "HGPL-1.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"atob": "^2.1.2",
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1975",
|
|
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)",
|