aotrautils 0.0.656 → 0.0.657
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.
- aotrautils/aotrautils.build.js +28 -28
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (20/10/2023-00:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (20/10/2023-00:10:19)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5059,30 +5059,30 @@ class OpenAIAPIClient{
|
|
|
5059
5059
|
|
|
5060
5060
|
const result=()=>{
|
|
5061
5061
|
const p=new Promise((resolve,reject)=>{
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
};
|
|
5062
|
+
fetch(self.apiURL, {
|
|
5063
|
+
method: "POST",
|
|
5064
|
+
headers: {
|
|
5065
|
+
"Authorization": "Bearer "+self.apiKey,
|
|
5066
|
+
"Content-Type": "application/json",
|
|
5067
|
+
},
|
|
5068
|
+
body: JSON.stringify({
|
|
5069
|
+
model:self.modelName,
|
|
5070
|
+
messages,
|
|
5071
|
+
}),
|
|
5072
|
+
})
|
|
5073
|
+
.then(response => response.json())
|
|
5074
|
+
.then(data => {
|
|
5075
|
+
// DBG
|
|
5076
|
+
// console.log("data :",data);
|
|
5077
|
+
const assistantReply = data.choices[0].message.content;
|
|
5078
|
+
resolve(assistantReply);
|
|
5079
|
+
})
|
|
5080
|
+
.catch(error => {
|
|
5081
|
+
// TRACE
|
|
5082
|
+
console.error("Error:", error);
|
|
5083
|
+
reject(""+error);
|
|
5084
|
+
});
|
|
5085
|
+
});
|
|
5086
5086
|
|
|
5087
5087
|
return await p;
|
|
5088
5088
|
}();
|
|
@@ -5118,7 +5118,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5118
5118
|
|
|
5119
5119
|
|
|
5120
5120
|
|
|
5121
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (20/10/2023-00:
|
|
5121
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (20/10/2023-00:10:19)»*/
|
|
5122
5122
|
/*-----------------------------------------------------------------------------*/
|
|
5123
5123
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
|
5124
5124
|
*
|
|
@@ -13360,7 +13360,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
|
|
|
13360
13360
|
|
|
13361
13361
|
|
|
13362
13362
|
|
|
13363
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (20/10/2023-00:
|
|
13363
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (20/10/2023-00:10:19)»*/
|
|
13364
13364
|
/*-----------------------------------------------------------------------------*/
|
|
13365
13365
|
|
|
13366
13366
|
|
|
@@ -14599,7 +14599,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
|
14599
14599
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
|
14600
14600
|
|
|
14601
14601
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
|
14602
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (20/10/2023-00:
|
|
14602
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (20/10/2023-00:10:19)»*/
|
|
14603
14603
|
/*-----------------------------------------------------------------------------*/
|
|
14604
14604
|
|
|
14605
14605
|
|
aotrautils/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.657",
|
|
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)",
|