tradly 1.1.85 → 1.1.86
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.
- package/Constants/PathConstant.js +2 -0
- package/Roots/App.js +21 -1
- package/package.json +1 -1
package/Roots/App.js
CHANGED
|
@@ -83,6 +83,7 @@ import {
|
|
|
83
83
|
SUBSCRIPTION_LISTINGS,
|
|
84
84
|
TAX,
|
|
85
85
|
UNLIKE,
|
|
86
|
+
AI_SERVICES,
|
|
86
87
|
} from "./../Constants/PathConstant.js";
|
|
87
88
|
import serialization from "../Helper/Serialization.js";
|
|
88
89
|
import { ImageConfig } from "../Helper/APIParam.js";
|
|
@@ -4100,7 +4101,26 @@ class App {
|
|
|
4100
4101
|
}
|
|
4101
4102
|
}
|
|
4102
4103
|
|
|
4103
|
-
//
|
|
4104
|
+
// ai prompt
|
|
4105
|
+
async getAiPromptResponse(param = { authKey, data, currency }) {
|
|
4106
|
+
try {
|
|
4107
|
+
const [error, responseJson] = await network.networkCall({
|
|
4108
|
+
path: AI_SERVICES,
|
|
4109
|
+
method: Method.POST,
|
|
4110
|
+
authKey: param.authKey,
|
|
4111
|
+
currency: param.currency,
|
|
4112
|
+
language: param.language,
|
|
4113
|
+
param: param.data,
|
|
4114
|
+
});
|
|
4115
|
+
if (error) {
|
|
4116
|
+
return error;
|
|
4117
|
+
} else {
|
|
4118
|
+
return responseJson;
|
|
4119
|
+
}
|
|
4120
|
+
} catch (error) {
|
|
4121
|
+
return error;
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4104
4124
|
}
|
|
4105
4125
|
const app = new App();
|
|
4106
4126
|
export default app;
|