Method: projects.locations.statelessSuggestion.generate

Generates and returns a suggestion for a conversation that does not have a resource created for it.

HTTP request

POST https://{endpoint}/v2/{parent=projects/*/locations/*}/statelessSuggestion:generate

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource to charge for the Suggestion's generation. Format: projects/<Project ID>/locations/<Location ID>.

Request body

The request body contains data with the following structure:

JSON representation
{
  "conversationContext": {
    object (ConversationContext)
  },
  "triggerEvents": [
    enum (TriggerEvent)
  ],

  // Union field generator_resource can be only one of the following:
  "generator": {
    object (Generator)
  },
  "generatorName": string
  // End of list of possible types for union field generator_resource.
}
Fields
conversationContext

object (ConversationContext)

Optional. Context of the conversation, including transcripts.

triggerEvents[]

enum (TriggerEvent)

Optional. A list of trigger events. Generator will be triggered only if it's trigger event is included here.

Union field generator_resource. Generator. generator_resource can be only one of the following:
generator

object (Generator)

Uncreated generator. It should be a complete generator that includes all information about the generator.

generatorName

string

The resource name of the existing created generator. Format: projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>

Response body

The response message for Conversations.GenerateStatelessSuggestion.

If successful, the response body contains data with the following structure:

JSON representation
{
  "generatorSuggestion": {
    object (GeneratorSuggestion)
  }
}
Fields
generatorSuggestion

object (GeneratorSuggestion)

Required. Generated suggestion for a conversation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/dialogflow

For more information, see the Authentication Overview.