@botonic/plugin-flow-builder
Version:
Botonic plugin for **Hubtype Flow Builder**: run and bridge flow-driven logic from bots on the **current** line.
21 lines • 818 B
JavaScript
import { __awaiter } from "tslib";
export class SmartIntentClient {
constructor(botonicContext) {
this.botonicContext = botonicContext;
}
getInference(data) {
return __awaiter(this, void 0, void 0, function* () {
const hubtypeToken = this.botonicContext.secrets.hubtypeAccessToken;
const response = yield fetch(`${this.botonicContext.settings.hubtypeApiUrl}/external/v2/ai/smart_intents/inference/`, {
method: 'POST',
headers: {
Authorization: `Bearer ${hubtypeToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
});
return yield response.json();
});
}
}
//# sourceMappingURL=smart-intent-client.js.map