Dialogflow API . projects . suggestions

Instance Methods

close()

Close httplib2 connections.

generateStatelessSummary(parent, body=None, x__xgafv=None)

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

searchKnowledge(parent, body=None, x__xgafv=None)

Get answers for the given query based on knowledge documents.

Method Details

close()
Close httplib2 connections.
generateStatelessSummary(parent, body=None, x__xgafv=None)
Generates and returns a summary for a conversation that does not have a resource created for it.

Args:
  parent: string, Required. The parent resource to charge for the Summary's generation. Format: `projects//locations/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Conversations.GenerateStatelessSummary.
  "conversationProfile": { # Defines the services to connect to incoming Dialogflow conversations. # Required. A ConversationProfile containing information required for Summary generation. Required fields: {language_code, security_settings} Optional fields: {agent_assistant_config}
    "automatedAgentConfig": { # Defines the Automated Agent to connect to a conversation. # Configuration for an automated agent to use with this profile.
      "agent": "A String", # Required. ID of the Dialogflow agent environment to use. This project needs to either be the same project as the conversation or you need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent` role in this project. - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details. - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment is used.
      "sessionTtl": "A String", # Optional. Configure lifetime of the Dialogflow session. By default, a Dialogflow CX session remains active and its data is stored for 30 minutes after the last request is sent for the session. This value should be no longer than 1 day.
    },
    "createTime": "A String", # Output only. Create time of the conversation profile.
    "displayName": "A String", # Required. Human readable name for this profile. Max length 1024 bytes.
    "humanAgentAssistantConfig": { # Defines the Human Agent Assist to connect to a conversation. # Configuration for agent assistance to use with this profile.
      "endUserSuggestionConfig": { # Detail human agent assistant config. # Configuration for agent assistance of end user participant. Currently, this feature is not general available, please contact Google to get access.
        "featureConfigs": [ # Configuration of different suggestion features. One feature can have only one config.
          { # Config for suggestion features.
            "conversationModelConfig": { # Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION. # Configs of custom conversation model.
              "baselineModelVersion": "A String", # Version of current baseline model. It will be ignored if model is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0
              "model": "A String", # Conversation model resource name. Format: `projects//conversationModels/`.
            },
            "conversationProcessConfig": { # Config to process conversation. # Configs for processing conversation.
              "recentSentencesCount": 42, # Number of recent non-small-talk sentences to use as context for article and FAQ suggestion
            },
            "disableAgentQueryLogging": True or False, # Optional. Disable the logging of search queries sent by human agents. It can prevent those queries from being stored at answer records. Supported features: KNOWLEDGE_SEARCH.
            "enableConversationAugmentedQuery": True or False, # Optional. Enable including conversation context during query answer generation. Supported features: KNOWLEDGE_SEARCH.
            "enableEventBasedSuggestion": True or False, # Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, KNOWLEDGE_ASSIST.
            "queryConfig": { # Config for suggestion query. # Configs of query.
              "confidenceThreshold": 3.14, # Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION.
              "contextFilterSettings": { # Settings that determine how to filter recent conversation context when generating suggestions. # Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped.
                "dropHandoffMessages": True or False, # If set to true, the last message from virtual agent (hand off message) and the message before it (trigger message of hand off) are dropped.
                "dropIvrMessages": True or False, # If set to true, all messages from ivr stage are dropped.
                "dropVirtualAgentMessages": True or False, # If set to true, all messages from virtual agent are dropped.
              },
              "dialogflowQuerySource": { # Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST. # Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
                "agent": "A String", # Required. The name of a Dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project.
                "humanAgentSideConfig": { # The configuration used for human agent side Dialogflow assist suggestion. # Optional. The Dialogflow assist configuration for human agent.
                  "agent": "A String", # Optional. The name of a dialogflow virtual agent used for intent detection and suggestion triggered by human agent. Format: `projects//locations//agent`.
                },
              },
              "documentQuerySource": { # Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE. # Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE.
                "documents": [ # Required. Knowledge documents to query from. Format: `projects//locations//knowledgeBases//documents/`. Currently, at most 5 documents are supported.
                  "A String",
                ],
              },
              "knowledgeBaseQuerySource": { # Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ. # Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ.
                "knowledgeBases": [ # Required. Knowledge bases to query. Format: `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge bases are supported.
                  "A String",
                ],
              },
              "maxResults": 42, # Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20.
              "sections": { # Custom sections to return when requesting a summary of a conversation. This is only supported when `baseline_model_version` == '2.0'. Supported features: CONVERSATION_SUMMARIZATION, CONVERSATION_SUMMARIZATION_VOICE. # Optional. The customized sections chosen to return when requesting a summary of a conversation.
                "sectionTypes": [ # The selected sections chosen to return when requesting a summary of a conversation. A duplicate selected section will be treated as a single selected section. If section types are not provided, the default will be {SITUATION, ACTION, RESULT}.
                  "A String",
                ],
              },
            },
            "suggestionFeature": { # The type of Human Agent Assistant API suggestion to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list. # The suggestion feature.
              "type": "A String", # Type of Human Agent Assistant API feature to request.
            },
            "suggestionTriggerSettings": { # Settings of suggestion trigger. # Settings of suggestion trigger. Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
              "noSmalltalk": True or False, # Do not trigger if last utterance is small talk.
              "onlyEndUser": True or False, # Only trigger suggestion if participant role of last utterance is END_USER.
            },
          },
        ],
        "groupSuggestionResponses": True or False, # If `group_suggestion_responses` is false, and there are multiple `feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we will try to deliver suggestions to customers as soon as we get new suggestion. Different type of suggestions based on the same context will be in separate Pub/Sub event or `StreamingAnalyzeContentResponse`. If `group_suggestion_responses` set to true. All the suggestions to the same participant based on the same context will be grouped into a single Pub/Sub event or StreamingAnalyzeContentResponse.
      },
      "humanAgentSuggestionConfig": { # Detail human agent assistant config. # Configuration for agent assistance of human agent participant.
        "featureConfigs": [ # Configuration of different suggestion features. One feature can have only one config.
          { # Config for suggestion features.
            "conversationModelConfig": { # Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION. # Configs of custom conversation model.
              "baselineModelVersion": "A String", # Version of current baseline model. It will be ignored if model is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0
              "model": "A String", # Conversation model resource name. Format: `projects//conversationModels/`.
            },
            "conversationProcessConfig": { # Config to process conversation. # Configs for processing conversation.
              "recentSentencesCount": 42, # Number of recent non-small-talk sentences to use as context for article and FAQ suggestion
            },
            "disableAgentQueryLogging": True or False, # Optional. Disable the logging of search queries sent by human agents. It can prevent those queries from being stored at answer records. Supported features: KNOWLEDGE_SEARCH.
            "enableConversationAugmentedQuery": True or False, # Optional. Enable including conversation context during query answer generation. Supported features: KNOWLEDGE_SEARCH.
            "enableEventBasedSuggestion": True or False, # Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, KNOWLEDGE_ASSIST.
            "queryConfig": { # Config for suggestion query. # Configs of query.
              "confidenceThreshold": 3.14, # Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE, KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION.
              "contextFilterSettings": { # Settings that determine how to filter recent conversation context when generating suggestions. # Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped.
                "dropHandoffMessages": True or False, # If set to true, the last message from virtual agent (hand off message) and the message before it (trigger message of hand off) are dropped.
                "dropIvrMessages": True or False, # If set to true, all messages from ivr stage are dropped.
                "dropVirtualAgentMessages": True or False, # If set to true, all messages from virtual agent are dropped.
              },
              "dialogflowQuerySource": { # Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST. # Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
                "agent": "A String", # Required. The name of a Dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project.
                "humanAgentSideConfig": { # The configuration used for human agent side Dialogflow assist suggestion. # Optional. The Dialogflow assist configuration for human agent.
                  "agent": "A String", # Optional. The name of a dialogflow virtual agent used for intent detection and suggestion triggered by human agent. Format: `projects//locations//agent`.
                },
              },
              "documentQuerySource": { # Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE. # Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE.
                "documents": [ # Required. Knowledge documents to query from. Format: `projects//locations//knowledgeBases//documents/`. Currently, at most 5 documents are supported.
                  "A String",
                ],
              },
              "knowledgeBaseQuerySource": { # Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ. # Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ.
                "knowledgeBases": [ # Required. Knowledge bases to query. Format: `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge bases are supported.
                  "A String",
                ],
              },
              "maxResults": 42, # Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20.
              "sections": { # Custom sections to return when requesting a summary of a conversation. This is only supported when `baseline_model_version` == '2.0'. Supported features: CONVERSATION_SUMMARIZATION, CONVERSATION_SUMMARIZATION_VOICE. # Optional. The customized sections chosen to return when requesting a summary of a conversation.
                "sectionTypes": [ # The selected sections chosen to return when requesting a summary of a conversation. A duplicate selected section will be treated as a single selected section. If section types are not provided, the default will be {SITUATION, ACTION, RESULT}.
                  "A String",
                ],
              },
            },
            "suggestionFeature": { # The type of Human Agent Assistant API suggestion to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list. # The suggestion feature.
              "type": "A String", # Type of Human Agent Assistant API feature to request.
            },
            "suggestionTriggerSettings": { # Settings of suggestion trigger. # Settings of suggestion trigger. Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
              "noSmalltalk": True or False, # Do not trigger if last utterance is small talk.
              "onlyEndUser": True or False, # Only trigger suggestion if participant role of last utterance is END_USER.
            },
          },
        ],
        "groupSuggestionResponses": True or False, # If `group_suggestion_responses` is false, and there are multiple `feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we will try to deliver suggestions to customers as soon as we get new suggestion. Different type of suggestions based on the same context will be in separate Pub/Sub event or `StreamingAnalyzeContentResponse`. If `group_suggestion_responses` set to true. All the suggestions to the same participant based on the same context will be grouped into a single Pub/Sub event or StreamingAnalyzeContentResponse.
      },
      "messageAnalysisConfig": { # Configuration for analyses to run on each conversation message. # Configuration for message analysis.
        "enableEntityExtraction": True or False, # Enable entity extraction in conversation messages on [agent assist stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). If unspecified, defaults to false. Currently, this feature is not general available, please contact Google to get access.
        "enableSentimentAnalysis": True or False, # Enable sentiment analysis in conversation messages on [agent assist stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). If unspecified, defaults to false. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral: https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For Participants.StreamingAnalyzeContent method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult.
      },
      "notificationConfig": { # Defines notification behavior. # Pub/Sub topic on which to publish new agent assistant events.
        "messageFormat": "A String", # Format of message.
        "topic": "A String", # Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. For telephony integration to receive notification, make sure either this topic is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. For chat integration to receive notification, make sure API caller has been granted the `Dialogflow Service Agent` role for the topic. Format: `projects//locations//topics/`.
      },
    },
    "humanAgentHandoffConfig": { # Defines the hand off to a live agent, typically on which external agent service provider to connect to a conversation. Currently, this feature is not general available, please contact Google to get access. # Configuration for connecting to a live agent. Currently, this feature is not general available, please contact Google to get access.
      "livePersonConfig": { # Configuration specific to LivePerson (https://www.liveperson.com). # Uses LivePerson (https://www.liveperson.com).
        "accountNumber": "A String", # Required. Account number of the LivePerson account to connect. This is the account number you input at the login page.
      },
      "salesforceLiveAgentConfig": { # Configuration specific to Salesforce Live Agent. # Uses Salesforce Live Agent.
        "buttonId": "A String", # Required. Live Agent chat button ID.
        "deploymentId": "A String", # Required. Live Agent deployment ID.
        "endpointDomain": "A String", # Required. Domain of the Live Agent endpoint for this agent. You can find the endpoint URL in the `Live Agent settings` page. For example if URL has the form https://d.la4-c2-phx.salesforceliveagent.com/..., you should fill in d.la4-c2-phx.salesforceliveagent.com.
        "organizationId": "A String", # Required. The organization ID of the Salesforce account.
      },
    },
    "languageCode": "A String", # Language code for the conversation profile. If not specified, the language is en-US. Language at ConversationProfile should be set for all non en-US languages. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US".
    "loggingConfig": { # Defines logging behavior for conversation lifecycle events. # Configuration for logging conversation lifecycle events.
      "enableStackdriverLogging": True or False, # Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in the conversation project as JSON format ConversationEvent protos.
    },
    "name": "A String", # The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.
    "newMessageEventNotificationConfig": { # Defines notification behavior. # Configuration for publishing new message events. Event will be sent in format of ConversationEvent
      "messageFormat": "A String", # Format of message.
      "topic": "A String", # Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. For telephony integration to receive notification, make sure either this topic is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. For chat integration to receive notification, make sure API caller has been granted the `Dialogflow Service Agent` role for the topic. Format: `projects//locations//topics/`.
    },
    "notificationConfig": { # Defines notification behavior. # Configuration for publishing conversation lifecycle events.
      "messageFormat": "A String", # Format of message.
      "topic": "A String", # Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. For telephony integration to receive notification, make sure either this topic is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. For chat integration to receive notification, make sure API caller has been granted the `Dialogflow Service Agent` role for the topic. Format: `projects//locations//topics/`.
    },
    "securitySettings": "A String", # Name of the CX SecuritySettings reference for the agent. Format: `projects//locations//securitySettings/`.
    "sttConfig": { # Configures speech transcription for ConversationProfile. # Settings for speech transcription.
      "model": "A String", # Which Speech model to select. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then Dialogflow auto-selects a model based on other parameters in the SpeechToTextConfig and Agent settings. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. If you specify a model, the following models typically have the best performance: - phone_call (best for Agent Assist and telephony) - latest_short (best for Dialogflow non-telephony) - command_and_search Leave this field unspecified to use [Agent Speech settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) for model selection.
      "speechModelVariant": "A String", # The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and StreamingAnalyzeContentRequest request. If enhanced model variant is specified and an enhanced version of the specified model for the language does not exist, then it would emit an error.
      "useTimeoutBasedEndpointing": True or False, # Use timeout based endpointing, interpreting endpointer sensitivy as seconds of timeout value.
    },
    "timeZone": "A String", # The time zone of this conversational profile from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. Defaults to America/New_York.
    "ttsConfig": { # Configuration of how speech should be synthesized. # Configuration for Text-to-Speech synthesization. Used by Phone Gateway to specify synthesization options. If agent defines synthesization options as well, agent settings overrides the option here.
      "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
        "A String",
      ],
      "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
      "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.
      "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio.
        "name": "A String", # Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and ssml_gender.
        "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
      },
      "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
    },
    "updateTime": "A String", # Output only. Update time of the conversation profile.
  },
  "latestMessage": "A String", # The name of the latest conversation message used as context for generating a Summary. If empty, the latest message of the conversation will be used. The format is specific to the user and the names of the messages provided.
  "maxContextSize": 42, # Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 500 and at most 1000.
  "statelessConversation": { # The minimum amount of information required to generate a Summary without having a Conversation resource created. # Required. The conversation to suggest a summary for.
    "messages": [ # Required. The messages that the Summary will be generated from. It is expected that this message content is already redacted and does not contain any PII. Required fields: {content, language_code, participant, participant_role} Optional fields: {send_time} If send_time is not provided, then the messages must be provided in chronological order.
      { # Represents a message posted into a conversation.
        "content": "A String", # Required. The message content.
        "createTime": "A String", # Output only. The time when the message was created in Contact Center AI.
        "languageCode": "A String", # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US".
        "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message.
          "containEntities": True or False, # Indicates whether the text message contains entities.
          "parts": [ # The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
            { # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
              "entityType": "A String", # The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
              "formattedValue": "", # The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { "amount": 5, "currency": "USD" }
              "text": "A String", # A part of a message possibly annotated with an entity.
            },
          ],
        },
        "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
        "participant": "A String", # Output only. The participant that sends this message.
        "participantRole": "A String", # Output only. The role of the participant.
        "sendTime": "A String", # Optional. The time when the message was sent.
        "sentimentAnalysis": { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
          "queryTextSentiment": { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. See: https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values for how to interpret the result. # The sentiment analysis result for `query_text`.
            "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
            "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
          },
        },
      },
    ],
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Conversations.GenerateStatelessSummary.
  "contextSize": 42, # Number of messages prior to and including last_conversation_message used to compile the suggestion. It may be smaller than the GenerateStatelessSummaryRequest.context_size field in the request if there weren't that many messages in the conversation.
  "latestMessage": "A String", # The name of the latest conversation message used as context for compiling suggestion. The format is specific to the user and the names of the messages provided.
  "summary": { # Generated summary for a conversation. # Generated summary.
    "baselineModelVersion": "A String", # The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.
    "text": "A String", # The summary content that is concatenated into one string.
    "textSections": { # The summary content that is divided into sections. The key is the section's name and the value is the section's content. There is no specific format for the key or value.
      "a_key": "A String",
    },
  },
}
searchKnowledge(parent, body=None, x__xgafv=None)
Get answers for the given query based on knowledge documents.

Args:
  parent: string, The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for Conversations.SearchKnowledge.
  "conversation": "A String", # The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.
  "conversationProfile": "A String", # Required. The conversation profile used to configure the search. Format: `projects//locations//conversationProfiles/`.
  "latestMessage": "A String", # The name of the latest conversation message when the request is triggered. Format: `projects//locations//conversations//messages/`.
  "parent": "A String", # The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.
  "query": { # Auxiliary proto messages. Represents the natural language text to be processed. # Required. The natural language text query for knowledge search.
    "languageCode": "A String", # Required. The language of this conversational query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
    "text": "A String", # Required. The UTF-8 encoded natural language text to be processed. Text length must not exceed 256 characters for virtual agent interactions.
  },
  "sessionId": "A String", # The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Conversations.SearchKnowledge.
  "answers": [ # Most relevant snippets extracted from articles in the given knowledge base, ordered by confidence.
    { # Represents a SearchKnowledge answer.
      "answer": "A String", # The piece of text from the knowledge base documents that answers the search query
      "answerRecord": "A String", # The name of the answer record. Format: `projects//locations//answer Records/`
      "answerSources": [ # All sources used to generate the answer.
        { # The sources of the answers.
          "snippet": "A String", # The relevant snippet of the article.
          "title": "A String", # The title of the article.
          "uri": "A String", # The URI of the article.
        },
      ],
      "answerType": "A String", # The type of the answer.
    },
  ],
  "rewrittenQuery": "A String", # The rewritten query used to search knowledge.
}