detectIntent method
Implementation
Future<AIResponse> detectIntent(String query) async {
var response = await authGoogle.post(_getUrl(),
headers: {
HttpHeaders.authorizationHeader: "Bearer ${authGoogle.getToken}"
},
body:
"{'queryInput':{'text':{'text':'$query','language_code':'$language'}}}");
return AIResponse(body: json.decode(response.body));
}