startBotResourceGeneration method

Future<StartBotResourceGenerationResponse> startBotResourceGeneration({
  1. required String botId,
  2. required String botVersion,
  3. required String generationInputPrompt,
  4. required String localeId,
})

Starts a request for the descriptive bot builder to generate a bot locale configuration based on the prompt you provide it. After you make this call, use the DescribeBotResourceGeneration operation to check on the status of the generation and for the generatedBotLocaleUrl when the generation is complete. Use that value to retrieve the Amazon S3 object containing the bot locale configuration. You can then modify and import this configuration.

May throw ConflictException. May throw InternalServerException. May throw PreconditionFailedException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter botId : The unique identifier of the bot for which to generate intents and slot types.

Parameter botVersion : The version of the bot for which to generate intents and slot types.

Parameter generationInputPrompt : The prompt to generate intents and slot types for the bot locale. Your description should be both detailed and precise to help generate appropriate and sufficient intents for your bot. Include a list of actions to improve the intent creation process.

Parameter localeId : The locale of the bot for which to generate intents and slot types.

Implementation

Future<StartBotResourceGenerationResponse> startBotResourceGeneration({
  required String botId,
  required String botVersion,
  required String generationInputPrompt,
  required String localeId,
}) async {
  final $payload = <String, dynamic>{
    'generationInputPrompt': generationInputPrompt,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/bots/${Uri.encodeComponent(botId)}/botversions/${Uri.encodeComponent(botVersion)}/botlocales/${Uri.encodeComponent(localeId)}/startgeneration',
    exceptionFnMap: _exceptionFns,
  );
  return StartBotResourceGenerationResponse.fromJson(response);
}