Types for Google Cloud Dialogflow v2 API¶
- class google.cloud.dialogflow_v2.types.Agent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A Dialogflow agent is a virtual agent that handles conversations with your end-users. It is a natural language understanding module that understands the nuances of human language. Dialogflow translates end-user text or audio during a conversation to structured data that your apps and services can understand. You design and build a Dialogflow agent to handle the types of conversations required for your system.
For more information about agents, see the Agent guide.
- default_language_code¶
Required. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the
Update
method.- Type
- supported_language_codes¶
Optional. The list of all languages supported by this agent (except for the
default_language_code
).- Type
MutableSequence[str]
- time_zone¶
Required. The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.
- Type
- description¶
Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.
- Type
- avatar_uri¶
Optional. The URI of the agent’s avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
- Type
- match_mode¶
Optional. Determines how intents are detected from user queries.
- classification_threshold¶
Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.
- Type
- api_version¶
Optional. API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.
- tier¶
Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
- class ApiVersion(value)[source]¶
Bases:
proto.enums.Enum
API version for the agent.
- Values:
- API_VERSION_UNSPECIFIED (0):
Not specified.
- API_VERSION_V1 (1):
Legacy V1 API.
- API_VERSION_V2 (2):
V2 API.
- API_VERSION_V2_BETA_1 (3):
V2beta1 API.
- class MatchMode(value)[source]¶
Bases:
proto.enums.Enum
Match mode determines how intents are detected from user queries.
- Values:
- MATCH_MODE_UNSPECIFIED (0):
Not specified.
- MATCH_MODE_HYBRID (1):
Best for agents with a small number of examples in intents and/or wide use of templates syntax and composite entities.
- MATCH_MODE_ML_ONLY (2):
Can be used for agents with a large number of examples in intents, especially the ones using @sys.any or very large custom entities.
- class Tier(value)[source]¶
Bases:
proto.enums.Enum
Represents the agent tier.
- Values:
- TIER_UNSPECIFIED (0):
Not specified. This value should never be used.
- TIER_STANDARD (1):
Trial Edition, previously known as Standard Edition.
- TIER_ENTERPRISE (2):
Essentials Edition, previously known as Enterprise Essential Edition.
- TIER_ENTERPRISE_PLUS (3):
Essentials Edition (same as TIER_ENTERPRISE), previously known as Enterprise Plus Edition.
- class google.cloud.dialogflow_v2.types.AgentAssistantFeedback(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Detail feedback of Agent Assist result.
- answer_relevance¶
Optional. Whether or not the suggested answer is relevant.
For example:
Query: “Can I change my mailing address?”
Suggested document says: “Items must be returned/exchanged within 60 days of the purchase date.”
[answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT]
- document_correctness¶
Optional. Whether or not the information in the document is correct.
For example:
Query: “Can I return the package in 2 days once received?”
Suggested document says: “Items must be returned/exchanged within 60 days of the purchase date.”
Ground truth: “No return or exchange is allowed.”
- document_efficiency¶
Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT].
- summarization_feedback¶
Optional. Feedback for conversation summarization.
- knowledge_search_feedback¶
Optional. Feedback for knowledge search.
- knowledge_assist_feedback¶
Optional. Feedback for knowledge assist.
- class AnswerRelevance(value)[source]¶
Bases:
proto.enums.Enum
Relevance of an answer.
- Values:
- ANSWER_RELEVANCE_UNSPECIFIED (0):
Answer relevance unspecified.
- IRRELEVANT (1):
Answer is irrelevant to query.
- RELEVANT (2):
Answer is relevant to query.
- class DocumentCorrectness(value)[source]¶
Bases:
proto.enums.Enum
Correctness of document.
- Values:
- DOCUMENT_CORRECTNESS_UNSPECIFIED (0):
Document correctness unspecified.
- INCORRECT (1):
Information in document is incorrect.
- CORRECT (2):
Information in document is correct.
- class DocumentEfficiency(value)[source]¶
Bases:
proto.enums.Enum
Efficiency of document.
- Values:
- DOCUMENT_EFFICIENCY_UNSPECIFIED (0):
Document efficiency unspecified.
- INEFFICIENT (1):
Document is inefficient.
- EFFICIENT (2):
Document is efficient.
- class KnowledgeAssistFeedback(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Feedback for knowledge assist.
- answer_copied¶
Whether the suggested answer was copied by the human agent. If the value is set to be true, [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked] will be updated to be true.
- Type
- class KnowledgeSearchFeedback(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Feedback for knowledge search.
- answer_copied¶
Whether the answer was copied by the human agent or not. If the value is set to be true, [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked] will be updated to be true.
- Type
- clicked_uris¶
The URIs clicked by the human agent. The value is appended for each [UpdateAnswerRecordRequest][google.cloud.dialogflow.v2.UpdateAnswerRecordRequest]. If the value is not empty, [AnswerFeedback.clicked][google.cloud.dialogflow.v2.AnswerFeedback.clicked] will be updated to be true.
- Type
MutableSequence[str]
- class SummarizationFeedback(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Feedback for conversation summarization.
- start_time¶
Timestamp when composing of the summary starts.
- submit_time¶
Timestamp when the summary was submitted.
- class TextSectionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.AgentAssistantRecord(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a record of a human agent assist answer.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- article_suggestion_answer¶
Output only. The article suggestion answer.
This field is a member of oneof
answer
.
- class google.cloud.dialogflow_v2.types.AnalyzeContentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- participant¶
Required. The name of the participant this text comes from. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- suggestion_input¶
An input representing the selection of a suggestion.
This field is a member of oneof
input
.
- reply_audio_config¶
Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.
- query_params¶
Parameters for a Dialogflow virtual-agent query.
- assist_query_params¶
Parameters for a human assist query.
- cx_parameters¶
Additional parameters to be put into Dialogflow CX session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null.
Note: this field should only be used if you are connecting to a Dialogflow CX agent.
- class google.cloud.dialogflow_v2.types.AnalyzeContentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
- reply_text¶
The output text content. This field is set if the automated agent responded with text to show to the user.
- Type
- reply_audio¶
The audio data bytes encoded as specified in the request. This field is set if:
reply_audio_config
was specified in the request, orThe automated agent responded with audio to play to the user. In such case,
reply_audio.config
contains settings used to synthesize the speech.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
- automated_agent_reply¶
Only set if a Dialogflow automated agent has responded. Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] and [AutomatedAgentReply.detect_intent_response.output_audio_config][] are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead.
- message¶
Message analyzed by CCAI.
- human_agent_suggestion_results¶
The suggestions for most recent human agent. The order is the same as [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config].
Note that any failure of Agent Assist features will not lead to the overall failure of an AnalyzeContent API call. Instead, the features will fail silently with the error field set in the corresponding SuggestionResult.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SuggestionResult]
- end_user_suggestion_results¶
The suggestions for end user. The order is the same as [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config].
Same as human_agent_suggestion_results, any failure of Agent Assist features will not lead to the overall failure of an AnalyzeContent API call. Instead, the features will fail silently with the error field set in the corresponding SuggestionResult.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SuggestionResult]
- dtmf_parameters¶
Indicates the parameters of DTMF.
- class google.cloud.dialogflow_v2.types.AnnotatedMessagePart(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- entity_type¶
The Dialogflow system entity type of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
- Type
- formatted_value¶
The Dialogflow system entity formatted value of this message part. For example for a system entity of type
@sys.unit-currency
, this may contain:{ "amount": 5, "currency": "USD" }
- class google.cloud.dialogflow_v2.types.AnswerFeedback(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents feedback the customer has about the quality & correctness of a certain answer in a conversation.
- correctness_level¶
The correctness level of the specific answer.
- agent_assistant_detail_feedback¶
Detail feedback of agent assist suggestions.
This field is a member of oneof
detail_feedback
.
- clicked¶
Indicates whether the answer/item was clicked by the human agent or not. Default to false. For knowledge search and knowledge assist, the answer record is considered to be clicked if the answer was copied or any URI was clicked.
- Type
- click_time¶
Time when the answer/item was clicked.
- displayed¶
Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
- Type
- display_time¶
Time when the answer/item was displayed.
- class CorrectnessLevel(value)[source]¶
Bases:
proto.enums.Enum
The correctness level of an answer.
- Values:
- CORRECTNESS_LEVEL_UNSPECIFIED (0):
Correctness level unspecified.
- NOT_CORRECT (1):
Answer is totally wrong.
- PARTIALLY_CORRECT (2):
Answer is partially correct.
- FULLY_CORRECT (3):
Answer is fully correct.
- class google.cloud.dialogflow_v2.types.AnswerRecord(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Answer records are records to manage answer history and feedbacks for Dialogflow.
Currently, answer record includes:
human agent assistant article suggestion
human agent assistant faq article
It doesn’t include:
DetectIntent
intent matchingDetectIntent
knowledge
Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there’s a human agent assistant suggestion generated.
A typical workflow for customers provide feedback to an answer is:
For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are returned to the customers.
The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the [UpdateAnswerRecord][] method to send feedback about a specific answer that they believe is wrong.
- name¶
The unique identifier of this answer record. Format:
projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>
.- Type
- answer_feedback¶
Required. The AnswerFeedback for this record. You can set this with [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about this answer.
- class google.cloud.dialogflow_v2.types.ArticleAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents article answer.
- confidence¶
Article match confidence. The system’s confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
- Type
- metadata¶
A map that contains metadata about the answer and the document from which it originates.
- answer_record¶
The name of answer record, in the format of “projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>”.
- Type
- class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.ArticleSuggestionModelMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for article suggestion models.
- training_model_type¶
Optional. Type of the article suggestion model. If not provided, model_type is used.
- class google.cloud.dialogflow_v2.types.AssistQueryParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the parameters of human assist query.
- documents_metadata_filters¶
Key-value filters on the metadata of documents returned by article suggestion. If specified, article suggestion only returns suggested documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple values for a metadata key should be concatenated by comma. For example, filters to match all documents that have ‘US’ or ‘CA’ in their market metadata values and ‘agent’ in their user metadata values will be
documents_metadata_filters { key: "market" value: "US,CA" } documents_metadata_filters { key: "user" value: "agent" }
- class DocumentsMetadataFiltersEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.AudioEncoding(value)[source]¶
Bases:
proto.enums.Enum
Audio encoding of the audio content sent in the conversational query request. Refer to the Cloud Speech API documentation for more details.
- Values:
- AUDIO_ENCODING_UNSPECIFIED (0):
Not specified.
- AUDIO_ENCODING_LINEAR_16 (1):
Uncompressed 16-bit signed little-endian samples (Linear PCM).
- AUDIO_ENCODING_FLAC (2):
`FLAC
<https://xiph.org/flac/documentation.html>`__ (Free Lossless Audio Codec) is the recommended encoding because it is lossless (therefore recognition is not compromised) and requires only about half the bandwidth ofLINEAR16
.FLAC
stream encoding supports 16-bit and 24-bit samples, however, not all fields inSTREAMINFO
are supported.- AUDIO_ENCODING_MULAW (3):
8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
- AUDIO_ENCODING_AMR (4):
Adaptive Multi-Rate Narrowband codec.
sample_rate_hertz
must be 8000.- AUDIO_ENCODING_AMR_WB (5):
Adaptive Multi-Rate Wideband codec.
sample_rate_hertz
must be 16000.- AUDIO_ENCODING_OGG_OPUS (6):
Opus encoded audio frames in Ogg container (OggOpus).
sample_rate_hertz
must be 16000.- AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (7):
Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required,
OGG_OPUS
is highly preferred over Speex encoding. The Speex encoding supported by Dialogflow API has a header byte in each block, as in MIME typeaudio/x-speex-with-header-byte
. It is a variant of the RTP Speex encoding defined in RFC 5574. The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported.sample_rate_hertz
must be 16000.- AUDIO_ENCODING_ALAW (8):
8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law.
- class google.cloud.dialogflow_v2.types.AutomatedAgentConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the Automated Agent to connect to a conversation.
- agent¶
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-<Conversation Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com
theDialogflow API Service Agent
role in this project.For ES agents, use format:
projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID or '-'>
. If environment is not specified, the defaultdraft
environment is used. Refer to DetectIntentRequest for more details.For CX agents, use format
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID or '-'>
. If environment is not specified, the defaultdraft
environment is used.
- Type
- session_ttl¶
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.
- class google.cloud.dialogflow_v2.types.AutomatedAgentReply(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a response from an automated agent.
- detect_intent_response¶
Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call.
- automated_agent_reply_type¶
AutomatedAgentReply type.
- allow_cancellation¶
Indicates whether the partial automated agent reply is interruptible when a later reply message arrives. e.g. if the agent specified some music as partial response, it can be cancelled.
- Type
- cx_current_page¶
The unique identifier of the current Dialogflow CX conversation page. Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>
.- Type
- class AutomatedAgentReplyType(value)[source]¶
Bases:
proto.enums.Enum
Represents different automated agent reply types.
- Values:
- AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED (0):
Not specified. This should never happen.
- PARTIAL (1):
Partial reply. e.g. Aggregated responses in a
Fulfillment
that enablesreturn_partial_response
can be returned as partial reply. WARNING: partial reply is not eligible for barge-in.- FINAL (2):
Final reply.
- class google.cloud.dialogflow_v2.types.BatchCreateEntitiesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities].
- parent¶
Required. The name of the entity type to create entities in. Format:
projects/<Project ID>/agent/entityTypes/<Entity Type ID>
.- Type
- entities¶
Required. The entities to create.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType.Entity]
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- class google.cloud.dialogflow_v2.types.BatchDeleteEntitiesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities].
- parent¶
Required. The name of the entity type to delete entries for. Format:
projects/<Project ID>/agent/entityTypes/<Entity Type ID>
.- Type
- entity_values¶
Required. The reference
values
of the entities to delete. Note that these are not fully-qualified names, i.e. they don’t start withprojects/<Project ID>
.- Type
MutableSequence[str]
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- class google.cloud.dialogflow_v2.types.BatchDeleteEntityTypesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes].
- parent¶
Required. The name of the agent to delete all entities types for. Format:
projects/<Project ID>/agent
.- Type
- class google.cloud.dialogflow_v2.types.BatchDeleteIntentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents].
- parent¶
Required. The name of the agent to delete all entities types for. Format:
projects/<Project ID>/agent
.- Type
- intents¶
Required. The collection of intents to delete. Only intent
name
must be filled in.- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent]
- class google.cloud.dialogflow_v2.types.BatchUpdateEntitiesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities].
- parent¶
Required. The name of the entity type to update or create entities in. Format:
projects/<Project ID>/agent/entityTypes/<Entity Type ID>
.- Type
- entities¶
Required. The entities to update or create.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType.Entity]
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- update_mask¶
Optional. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- parent¶
Required. The name of the agent to update or create entity types in. Format:
projects/<Project ID>/agent
.- Type
- entity_type_batch_uri¶
The URI to a Google Cloud Storage file containing entity types to update or create. The file format can either be a serialized proto (of EntityBatch type) or a JSON object. Note: The URI must start with “gs://”.
This field is a member of oneof
entity_type_batch
.- Type
- entity_type_batch_inline¶
The collection of entity types to update or create.
This field is a member of oneof
entity_type_batch
.
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- update_mask¶
Optional. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.BatchUpdateEntityTypesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
- entity_types¶
The collection of updated or created entity types.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType]
- class google.cloud.dialogflow_v2.types.BatchUpdateIntentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- parent¶
Required. The name of the agent to update or create intents in. Format:
projects/<Project ID>/agent
.- Type
- intent_batch_uri¶
The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with “gs://”.
This field is a member of oneof
intent_batch
.- Type
- intent_batch_inline¶
The collection of intents to update or create.
This field is a member of oneof
intent_batch
.
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- update_mask¶
Optional. The mask to control which fields get updated.
- intent_view¶
Optional. The resource view to apply to the returned intent.
- class google.cloud.dialogflow_v2.types.BatchUpdateIntentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
- intents¶
The collection of updated or created intents.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent]
- class google.cloud.dialogflow_v2.types.ClearSuggestionFeatureConfigOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationProfile.ClearSuggestionFeatureConfig][] operation.
- conversation_profile¶
The resource name of the conversation profile. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
- Type
- participant_role¶
Required. The participant role to remove the suggestion feature config. Only HUMAN_AGENT or END_USER can be used.
- suggestion_feature_type¶
Required. The type of the suggestion feature to remove.
- create_time¶
Timestamp whe the request was created. The time is measured on server side.
- class google.cloud.dialogflow_v2.types.ClearSuggestionFeatureConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.ClearFeature][].
- conversation_profile¶
Required. The Conversation Profile to add or update the suggestion feature config. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
.- Type
- participant_role¶
Required. The participant role to remove the suggestion feature config. Only HUMAN_AGENT or END_USER can be used.
- suggestion_feature_type¶
Required. The type of the suggestion feature to remove.
- class google.cloud.dialogflow_v2.types.CloudConversationDebuggingInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Cloud conversation info for easier debugging. It will get populated in
StreamingDetectIntentResponse
orStreamingAnalyzeContentResponse
when the flagenable_debugging_info
is set to true in corresponding requests.- result_end_time_offset¶
Time offset of the end of speech utterance relative to the beginning of the first audio chunk.
- first_audio_duration¶
Duration of first audio chunk.
- speech_partial_results_end_times¶
Time offsets of the speech partial results relative to the beginning of the stream.
- Type
MutableSequence[google.protobuf.duration_pb2.Duration]
- speech_final_results_end_times¶
Time offsets of the speech final results (is_final=true) relative to the beginning of the stream.
- Type
MutableSequence[google.protobuf.duration_pb2.Duration]
- speaker_id_passive_latency_ms_offset¶
Time offset of Speaker ID stream close time relative to the Speech stream close time in milliseconds. Only meaningful for conversations involving passive verification.
- Type
- dtmf_partial_results_times¶
Time offsets of the DTMF partial results relative to the beginning of the stream.
- Type
MutableSequence[google.protobuf.duration_pb2.Duration]
- dtmf_final_results_times¶
Time offsets of the DTMF final results relative to the beginning of the stream.
- Type
MutableSequence[google.protobuf.duration_pb2.Duration]
- single_utterance_end_time_offset¶
Time offset of the end-of-single-utterance signal relative to the beginning of the stream.
- no_speech_timeout¶
No speech timeout settings for the stream.
- endpointing_timeout¶
Speech endpointing timeout settings for the stream.
- client_half_close_time_offset¶
Client half close time in terms of input audio duration.
- client_half_close_streaming_time_offset¶
Client half close time in terms of API streaming duration.
- class google.cloud.dialogflow_v2.types.CompleteConversationRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.CompleteConversation][google.cloud.dialogflow.v2.Conversations.CompleteConversation].
- class google.cloud.dialogflow_v2.types.Context(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Dialogflow contexts are similar to natural language context. If a person says to you “they are orange”, you need context in order to understand what “they” is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent.
Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts.
For more information about context, see the Contexts guide.
- name¶
Required. The unique identifier of the context. Format:
projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>
, orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>
.The
Context ID
is always converted to lowercase, may only contain characters ina-zA-Z0-9_-%
and may be at most 250 bytes long.If
Environment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names:
__system_counters__
*_id_dialog_context
*_dialog_params_size
- Type
- lifespan_count¶
Optional. The number of conversational query requests after which the context expires. The default is
0
. If set to0
, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.- Type
- parameters¶
Optional. The collection of parameters associated with this context.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
MapKey type: string
MapKey value: parameter name
MapValue type: If parameter’s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
MapValue value: If parameter’s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
- class google.cloud.dialogflow_v2.types.Conversation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.
- name¶
Output only. Identifier. The unique identifier of this conversation. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
.- Type
- lifecycle_state¶
Output only. The current state of the Conversation.
- conversation_profile¶
Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
.- Type
- phone_number¶
Output only. It will not be empty if the conversation is to be connected over telephony.
- start_time¶
Output only. The time the conversation was started.
- end_time¶
Output only. The time the conversation was finished.
- conversation_stage¶
Optional. The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation.
If the conversation is created with the conversation profile that has Dialogflow config set, defaults to [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE]; Otherwise, defaults to [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE].
If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE], it skips [ConversationStage.VIRTUAL_AGENT_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.VIRTUAL_AGENT_STAGE] stage and directly goes to [ConversationStage.HUMAN_ASSIST_STAGE][google.cloud.dialogflow.v2.Conversation.ConversationStage.HUMAN_ASSIST_STAGE].
- class ConversationStage(value)[source]¶
Bases:
proto.enums.Enum
Enumeration of the different conversation stages a conversation can be in. Reference:
https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages
- Values:
- CONVERSATION_STAGE_UNSPECIFIED (0):
Unknown. Should never be used after a conversation is successfully created.
- VIRTUAL_AGENT_STAGE (1):
The conversation should return virtual agent responses into the conversation.
- HUMAN_ASSIST_STAGE (2):
The conversation should not provide responses, just listen and provide suggestions.
- class LifecycleState(value)[source]¶
Bases:
proto.enums.Enum
Enumeration of the completion status of the conversation.
- Values:
- LIFECYCLE_STATE_UNSPECIFIED (0):
Unknown.
- IN_PROGRESS (1):
Conversation is currently open for media analysis.
- COMPLETED (2):
Conversation has been completed.
- class google.cloud.dialogflow_v2.types.ConversationContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Context of the conversation, including transcripts.
- message_entries¶
Optional. List of message transcripts in the conversation.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.MessageEntry]
- class google.cloud.dialogflow_v2.types.ConversationDataset(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a conversation dataset that a user imports raw data into. The data inside ConversationDataset can not be changed after ImportConversationData finishes (and calling ImportConversationData on a dataset that already has data is not allowed).
- name¶
Output only. ConversationDataset resource name. Format:
projects/<Project ID>/locations/<Location ID>/conversationDatasets/<Conversation Dataset ID>
- Type
- create_time¶
Output only. Creation time of this dataset.
- input_config¶
Output only. Input configurations set during conversation data import.
- conversation_info¶
Output only. Metadata set during conversation data import.
- conversation_count¶
Output only. The number of conversations this conversation dataset contains.
- Type
- class google.cloud.dialogflow_v2.types.ConversationEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events.
- conversation¶
The unique identifier of the conversation this notification refers to. Format:
projects/<Project ID>/conversations/<Conversation ID>
.- Type
- type_¶
The type of the event that this notification refers to.
- error_status¶
More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL.
- Type
google.rpc.status_pb2.Status
- class Type(value)[source]¶
Bases:
proto.enums.Enum
Enumeration of the types of events available.
- Values:
- TYPE_UNSPECIFIED (0):
Type not set.
- CONVERSATION_STARTED (1):
A new conversation has been opened. This is fired when a telephone call is answered, or a conversation is created via the API.
- CONVERSATION_FINISHED (2):
An existing conversation has closed. This is fired when a telephone call is terminated, or a conversation is closed via the API.
- HUMAN_INTERVENTION_NEEDED (3):
An existing conversation has received notification from Dialogflow that human intervention is required.
- NEW_MESSAGE (5):
An existing conversation has received a new message, either from API or telephony. It is configured in [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config]
- UNRECOVERABLE_ERROR (4):
Unrecoverable error during a telephone call.
In general non-recoverable errors only occur if something was misconfigured in the ConversationProfile corresponding to the call. After a non-recoverable error, Dialogflow may stop responding.
We don’t fire this event:
in an API call because we can directly return the error, or,
when we can recover from an error.
- class google.cloud.dialogflow_v2.types.ConversationInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents metadata of a conversation.
- language_code¶
Optional. The language code of the conversation data within this dataset. See https://cloud.google.com/apis/design/standard_fields for more information. Supports all UTF-8 languages.
- Type
- class google.cloud.dialogflow_v2.types.ConversationModel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a conversation model.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
ConversationModel resource name. Format:
projects/<Project ID>/conversationModels/<Conversation Model ID>
- Type
- create_time¶
Output only. Creation time of this model.
- datasets¶
Required. Datasets used to create model.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.InputDataset]
- state¶
Output only. State of the model. A model can only serve prediction requests after it gets deployed.
- language_code¶
Language code for the conversation model. If not specified, the language is en-US. Language at ConversationModel should be set for all non en-us languages. This should be a BCP-47 language tag. Example: “en-US”.
- Type
- article_suggestion_model_metadata¶
Metadata for article suggestion models.
This field is a member of oneof
model_metadata
.
- smart_reply_model_metadata¶
Metadata for smart reply models.
This field is a member of oneof
model_metadata
.
- satisfies_pzs¶
Output only. A read only boolean field reflecting Zone Separation status of the model.
This field is a member of oneof
_satisfies_pzs
.- Type
- satisfies_pzi¶
Output only. A read only boolean field reflecting Zone Isolation status of the model.
This field is a member of oneof
_satisfies_pzi
.- Type
- class ModelType(value)[source]¶
Bases:
proto.enums.Enum
Model type.
- Values:
- MODEL_TYPE_UNSPECIFIED (0):
ModelType unspecified.
- SMART_REPLY_DUAL_ENCODER_MODEL (2):
ModelType smart reply dual encoder model.
- SMART_REPLY_BERT_MODEL (6):
ModelType smart reply bert model.
- class State(value)[source]¶
Bases:
proto.enums.Enum
State of the model.
- Values:
- STATE_UNSPECIFIED (0):
Should not be used, an un-set enum has this value by default.
- CREATING (1):
Model being created.
- UNDEPLOYED (2):
Model is not deployed but ready to deploy.
- DEPLOYING (3):
Model is deploying.
- DEPLOYED (4):
Model is deployed and ready to use.
- UNDEPLOYING (5):
Model is undeploying.
- DELETING (6):
Model is deleting.
- FAILED (7):
Model is in error state. Not ready to deploy and use.
- PENDING (8):
Model is being created but the training has not started, The model may remain in this state until there is enough capacity to start training.
- class google.cloud.dialogflow_v2.types.ConversationModelEvaluation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents evaluation result of a conversation model.
- name¶
The resource name of the evaluation. Format:
projects/<Project ID>/conversationModels/<Conversation Model ID>/evaluations/<Evaluation ID>
- Type
- evaluation_config¶
Optional. The configuration of the evaluation task.
- create_time¶
Output only. Creation time of this model.
- smart_reply_metrics¶
Output only. Only available when model is for smart reply.
This field is a member of oneof
metrics
.
- raw_human_eval_template_csv¶
Output only. Human eval template in csv format. It tooks real-world conversations provided through input dataset, generates example suggestions for customer to verify quality of the model. For Smart Reply, the generated csv file contains columns of Context, (Suggestions,Q1,Q2)*3, Actual reply. Context contains at most 10 latest messages in the conversation prior to the current suggestion. Q1: “Would you send it as the next message of agent?” Evaluated based on whether the suggest is appropriate to be sent by agent in current context. Q2: “Does the suggestion move the conversation closer to resolution?” Evaluated based on whether the suggestion provide solutions, or answers customer’s question or collect information from customer to resolve the customer’s issue. Actual reply column contains the actual agent reply sent in the context.
- Type
- class google.cloud.dialogflow_v2.types.ConversationPhoneNumber(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony.
- class google.cloud.dialogflow_v2.types.ConversationProfile(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the services to connect to incoming Dialogflow conversations.
- name¶
The unique identifier of this conversation profile. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
.- Type
- create_time¶
Output only. Create time of the conversation profile.
- update_time¶
Output only. Update time of the conversation profile.
- automated_agent_config¶
Configuration for an automated agent to use with this profile.
- human_agent_assistant_config¶
Configuration for agent assistance to use with this profile.
- human_agent_handoff_config¶
Configuration for connecting to a live agent.
Currently, this feature is not general available, please contact Google to get access.
- notification_config¶
Configuration for publishing conversation lifecycle events.
- logging_config¶
Configuration for logging conversation lifecycle events.
- new_message_event_notification_config¶
Configuration for publishing new message events. Event will be sent in format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent]
- stt_config¶
Settings for speech transcription.
- language_code¶
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 language tag. Example: “en-US”.
- Type
- time_zone¶
The time zone of this conversational profile from the time zone database, e.g., America/New_York, Europe/Paris. Defaults to America/New_York.
- Type
- security_settings¶
Name of the CX SecuritySettings reference for the agent. Format:
projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>
.- Type
- tts_config¶
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.
- class google.cloud.dialogflow_v2.types.CreateContextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext].
- parent¶
Required. The session to create a context for. Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- context¶
Required. The context to create.
- class google.cloud.dialogflow_v2.types.CreateConversationDatasetOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for [ConversationDatasets][CreateConversationDataset].
- class google.cloud.dialogflow_v2.types.CreateConversationDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationDatasets.CreateConversationDataset][google.cloud.dialogflow.v2.ConversationDatasets.CreateConversationDataset].
- parent¶
Required. The project to create conversation dataset for. Format:
projects/<Project ID>/locations/<Location ID>
- Type
- conversation_dataset¶
Required. The conversation dataset to create.
- class google.cloud.dialogflow_v2.types.CreateConversationModelEvaluationOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationModels.CreateConversationModelEvaluation][google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelEvaluation] operation.
- conversation_model_evaluation¶
The resource name of the conversation model. Format:
projects/<Project ID>/locations/<Location ID>/conversationModels/<Conversation Model Id>/evaluations/<Evaluation Id>
- Type
- conversation_model¶
The resource name of the conversation model. Format:
projects/<Project ID>/locations/<Location ID>/conversationModels/<Conversation Model Id>
- Type
- state¶
State of CreateConversationModel operation.
- create_time¶
Timestamp when the request to create conversation model was submitted. The time is measured on server side.
- class State(value)[source]¶
Bases:
proto.enums.Enum
State of CreateConversationModel operation.
- Values:
- STATE_UNSPECIFIED (0):
Operation status not specified.
- INITIALIZING (1):
The operation is being prepared.
- RUNNING (2):
The operation is running.
- CANCELLED (3):
The operation is cancelled.
- SUCCEEDED (4):
The operation has succeeded.
- FAILED (5):
The operation has failed.
- class google.cloud.dialogflow_v2.types.CreateConversationModelEvaluationRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.CreateConversationModelEvaluation][google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelEvaluation]
- parent¶
Required. The conversation model resource name. Format:
projects/<Project ID>/locations/<Location ID>/conversationModels/<Conversation Model ID>
- Type
- conversation_model_evaluation¶
Required. The conversation model evaluation to be created.
- class google.cloud.dialogflow_v2.types.CreateConversationModelOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationModels.CreateConversationModel][google.cloud.dialogflow.v2.ConversationModels.CreateConversationModel] operation.
- conversation_model¶
The resource name of the conversation model. Format:
projects/<Project ID>/conversationModels/<Conversation Model Id>
- Type
- state¶
State of CreateConversationModel operation.
- create_time¶
Timestamp when the request to create conversation model is submitted. The time is measured on server side.
- class State(value)[source]¶
Bases:
proto.enums.Enum
State of CreateConversationModel operation.
- Values:
- STATE_UNSPECIFIED (0):
Invalid.
- PENDING (1):
Request is submitted, but training has not started yet. The model may remain in this state until there is enough capacity to start training.
- SUCCEEDED (2):
The training has succeeded.
- FAILED (3):
The training has succeeded.
- CANCELLED (4):
The training has been cancelled.
- CANCELLING (5):
The training is in cancelling state.
- TRAINING (6):
Custom model is training.
- class google.cloud.dialogflow_v2.types.CreateConversationModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.CreateConversationModel][google.cloud.dialogflow.v2.ConversationModels.CreateConversationModel]
- conversation_model¶
Required. The conversation model to create.
- class google.cloud.dialogflow_v2.types.CreateConversationProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile].
- parent¶
Required. The project to create a conversation profile for. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- conversation_profile¶
Required. The conversation profile to create.
- class google.cloud.dialogflow_v2.types.CreateConversationRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.CreateConversation][google.cloud.dialogflow.v2.Conversations.CreateConversation].
- parent¶
Required. Resource identifier of the project creating the conversation. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- conversation¶
Required. The conversation to create.
- conversation_id¶
Optional. Identifier of the conversation. Generally it’s auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you.
The conversation ID must be compliant with the regression formula
[a-zA-Z][a-zA-Z0-9_-]*
with the characters length in range of [3,64]. If the field is provided, the caller is responsible forthe uniqueness of the ID, otherwise the request will be rejected.
the consistency for whether to use custom ID or not under a project to better ensure uniqueness.
- Type
- class google.cloud.dialogflow_v2.types.CreateDocumentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2.Documents.CreateDocument].
- parent¶
Required. The knowledge base to create a document for. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>
.- Type
- document¶
Required. The document to create.
- class google.cloud.dialogflow_v2.types.CreateEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType].
- parent¶
Required. The agent to create a entity type for. Format:
projects/<Project ID>/agent
.- Type
- entity_type¶
Required. The entity type to create.
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- class google.cloud.dialogflow_v2.types.CreateEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.v2.Environments.CreateEnvironment].
- parent¶
Required. The agent to create an environment for. Supported formats:
projects/<Project ID>/agent
projects/<Project ID>/locations/<Location ID>/agent
- Type
- environment¶
Required. The environment to create.
- class google.cloud.dialogflow_v2.types.CreateGeneratorRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message of CreateGenerator.
- parent¶
Required. The project/location to create generator for. Format:
projects/<Project ID>/locations/<Location ID>
- Type
- generator¶
Required. The generator to create.
- generator_id¶
Optional. The ID to use for the generator, which will become the final component of the generator’s resource name.
The generator ID must be compliant with the regression formula
[a-zA-Z][a-zA-Z0-9_-]*
with the characters length in range of [3,64]. If the field is not provided, an Id will be auto-generated. If the field is provided, the caller is responsible forthe uniqueness of the ID, otherwise the request will be rejected.
the consistency for whether to use custom ID or not under a project to better ensure uniqueness.
- Type
- class google.cloud.dialogflow_v2.types.CreateIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent].
- intent¶
Required. The intent to create.
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- intent_view¶
Optional. The resource view to apply to the returned intent.
- class google.cloud.dialogflow_v2.types.CreateKnowledgeBaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBase].
- parent¶
Required. The project to create a knowledge base for. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- knowledge_base¶
Required. The knowledge base to create.
- class google.cloud.dialogflow_v2.types.CreateParticipantRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant].
- parent¶
Required. Resource identifier of the conversation adding the participant. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
.- Type
- participant¶
Required. The participant to create.
- class google.cloud.dialogflow_v2.types.CreateSessionEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType].
- parent¶
Required. The session to create a session entity type for. Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/ sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- session_entity_type¶
Required. The session entity type to create.
- class google.cloud.dialogflow_v2.types.CreateVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Versions.CreateVersion][google.cloud.dialogflow.v2.Versions.CreateVersion].
- parent¶
Required. The agent to create a version for. Supported formats:
projects/<Project ID>/agent
projects/<Project ID>/locations/<Location ID>/agent
- Type
- version¶
Required. The version to create.
- class google.cloud.dialogflow_v2.types.DeleteAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent].
- class google.cloud.dialogflow_v2.types.DeleteAllContextsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts].
- parent¶
Required. The name of the session to delete all contexts from. Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>
. IfEnvironment ID
is not specified we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- class google.cloud.dialogflow_v2.types.DeleteContextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext].
- name¶
Required. The name of the context to delete. Format:
projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- class google.cloud.dialogflow_v2.types.DeleteConversationDatasetOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for [ConversationDatasets][DeleteConversationDataset].
- class google.cloud.dialogflow_v2.types.DeleteConversationDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationDatasets.DeleteConversationDataset][google.cloud.dialogflow.v2.ConversationDatasets.DeleteConversationDataset].
- class google.cloud.dialogflow_v2.types.DeleteConversationModelOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationModels.DeleteConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModel] operation.
- conversation_model¶
The resource name of the conversation model. Format:
projects/<Project ID>/conversationModels/<Conversation Model Id>
- Type
- create_time¶
Timestamp when delete conversation model request was created. The time is measured on server side.
- class google.cloud.dialogflow_v2.types.DeleteConversationModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.DeleteConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModel]
- class google.cloud.dialogflow_v2.types.DeleteConversationProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile].
This operation fails if the conversation profile is still referenced from a phone number.
- class google.cloud.dialogflow_v2.types.DeleteDocumentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2.Documents.DeleteDocument].
- class google.cloud.dialogflow_v2.types.DeleteEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType].
- class google.cloud.dialogflow_v2.types.DeleteEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment].
- class google.cloud.dialogflow_v2.types.DeleteGeneratorRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request of DeleteGenerator.
- class google.cloud.dialogflow_v2.types.DeleteIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent].
- class google.cloud.dialogflow_v2.types.DeleteKnowledgeBaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBase].
- name¶
Required. The name of the knowledge base to delete. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>
.- Type
- class google.cloud.dialogflow_v2.types.DeleteSessionEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType].
- name¶
Required. The name of the entity type to delete. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- class google.cloud.dialogflow_v2.types.DeleteVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Versions.DeleteVersion][google.cloud.dialogflow.v2.Versions.DeleteVersion].
- class google.cloud.dialogflow_v2.types.DeployConversationModelOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationModels.DeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeployConversationModel] operation.
- conversation_model¶
The resource name of the conversation model. Format:
projects/<Project ID>/conversationModels/<Conversation Model Id>
- Type
- create_time¶
Timestamp when request to deploy conversation model was submitted. The time is measured on server side.
- class google.cloud.dialogflow_v2.types.DeployConversationModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.DeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.DeployConversationModel]
- class google.cloud.dialogflow_v2.types.DetectIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request to detect user’s intent.
- session¶
Required. The name of the session this query is sent to. Format:
projects/<Project ID>/agent/sessions/<Session ID>
, orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment (Environment ID
might be referred to as environment name at some places). IfUser ID
is not specified, we are using “-”. It’s up to the API caller to choose an appropriateSession ID
andUser Id
. They can be a random number or some type of user and session identifiers (preferably hashed). The length of theSession ID
andUser ID
must not exceed 36 characters.For more information, see the API interactions guide.
Note: Always use agent versions for production traffic. See Versions and environments.
- Type
- query_params¶
The parameters of this query.
- query_input¶
Required. The input specification. It can be set to:
- an audio config which instructs the speech
recognizer how to process the speech audio,
- a conversational query in the form of text,
or
- an event that specifies which intent to
trigger.
- output_audio_config¶
Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated.
- output_audio_config_mask¶
Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this request-level config should override speech synthesizer settings defined at agent-level.
If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level config in its entirety.
- class google.cloud.dialogflow_v2.types.DetectIntentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The message returned from the DetectIntent method.
- response_id¶
The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
- Type
- query_result¶
The selected results of the conversational query or event processing. See
alternative_query_results
for additional potential results.
- webhook_status¶
Specifies the status of the webhook request.
- Type
google.rpc.status_pb2.Status
- output_audio¶
The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the
query_result.fulfillment_messages
field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty.In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
- Type
- output_audio_config¶
The config used by the speech synthesizer to generate the output audio.
- class google.cloud.dialogflow_v2.types.DialogflowAssistAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a Dialogflow assist answer.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class google.cloud.dialogflow_v2.types.Document(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
For more information, see the knowledge base guide.
Note: The
projects.agent.knowledgeBases.documents
resource is deprecated; only useprojects.knowledgeBases.documents
.This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
Optional. The document resource name. The name must be empty when creating a document. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
.- Type
- display_name¶
Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.
- Type
- knowledge_types¶
Required. The knowledge type of document content.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Document.KnowledgeType]
- content_uri¶
The URI where the file content is located.
For documents stored in Google Cloud Storage, these URIs must have the form
gs://<bucket-name>/<object-name>
.NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the
gs://
format URI described above.This field is a member of oneof
source
.- Type
- raw_content¶
The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.
This field is a member of oneof
source
.- Type
- enable_auto_reload¶
Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don’t try to automatically reload the document.
Currently you can only enable automatic reload for documents sourced from a public url, see
source
field for the source types.Reload status can be tracked in
latest_reload_status
. If a reload fails, we will keep the document unchanged.If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISSION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling
ReloadDocument
and clear the errors.- Type
- latest_reload_status¶
Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.
- metadata¶
Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document’s title, an external URL distinct from the document’s content_uri, etc. The max size of a
key
or avalue
of the metadata is 1024 bytes.
- state¶
Output only. The current state of the document.
- class KnowledgeType(value)[source]¶
Bases:
proto.enums.Enum
The knowledge type of document content.
- Values:
- KNOWLEDGE_TYPE_UNSPECIFIED (0):
The type is unspecified or arbitrary.
- FAQ (1):
The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed.
CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.
- EXTRACTIVE_QA (2):
Documents for which unstructured text is extracted and used for question answering.
- ARTICLE_SUGGESTION (3):
The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.
- AGENT_FACING_SMART_REPLY (4):
The document contains agent-facing Smart Reply entries.
- class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class ReloadStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The status of a reload attempt.
- time¶
The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.
- status¶
The status of a reload attempt or the initial load.
- Type
google.rpc.status_pb2.Status
- class State(value)[source]¶
Bases:
proto.enums.Enum
Possible states of the document
- Values:
- STATE_UNSPECIFIED (0):
The document state is unspecified.
- CREATING (1):
The document creation is in progress.
- ACTIVE (2):
The document is active and ready to use.
- UPDATING (3):
The document updation is in progress.
- RELOADING (4):
The document is reloading.
- DELETING (5):
The document deletion is in progress.
- class google.cloud.dialogflow_v2.types.DtmfParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The message in the response that indicates the parameters of DTMF.
- class google.cloud.dialogflow_v2.types.EncryptionSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A customer-managed encryption key specification that can be applied to all created resources (e.g. Conversation).
- name¶
Immutable. The resource name of the encryption key specification resource. Format:
projects/{project}/locations/{location}/encryptionSpec
- Type
- kms_key¶
Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by the default Google encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format:
projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}
- Type
- class google.cloud.dialogflow_v2.types.EntityType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted.
Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent.
For more information, see the Entity guide.
- name¶
The unique identifier of the entity type. Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods. Format:
projects/<Project ID>/agent/entityTypes/<Entity Type ID>
.- Type
- kind¶
Required. Indicates the kind of entity type.
- auto_expansion_mode¶
Optional. Indicates whether the entity type can be automatically expanded.
- entities¶
Optional. The collection of entity entries associated with the entity type.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType.Entity]
- class AutoExpansionMode(value)[source]¶
Bases:
proto.enums.Enum
Represents different entity type expansion modes. Automated expansion allows an agent to recognize values that have not been explicitly listed in the entity (for example, new kinds of shopping list items).
- Values:
- AUTO_EXPANSION_MODE_UNSPECIFIED (0):
Auto expansion disabled for the entity.
- AUTO_EXPANSION_MODE_DEFAULT (1):
Allows an agent to recognize values that have not been explicitly listed in the entity.
- class Entity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An entity entry for an associated entity type.
- value¶
Required. The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions.
For
KIND_MAP
entity types:A reference value to be used in place of synonyms.
For
KIND_LIST
entity types:A string that can contain references to other entity types (with or without aliases).
- Type
- class Kind(value)[source]¶
Bases:
proto.enums.Enum
Represents kinds of entities.
- Values:
- KIND_UNSPECIFIED (0):
Not specified. This value should be never used.
- KIND_MAP (1):
Map entity types allow mapping of a group of synonyms to a reference value.
- KIND_LIST (2):
List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
- KIND_REGEXP (3):
Regexp entity types allow to specify regular expressions in entries values.
- class google.cloud.dialogflow_v2.types.EntityTypeBatch(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
This message is a wrapper around a collection of entity types.
- entity_types¶
A collection of entity types.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType]
- class google.cloud.dialogflow_v2.types.Environment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
You can create multiple versions of your agent and publish them to separate environments.
When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent.
When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for:
testing
development
production
etc.
For more information, see the versions and environments guide.
- name¶
Output only. The unique identifier of this agent environment. Supported formats:
projects/<Project ID>/agent/environments/<Environment ID>
projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID>
The environment ID for the default environment is
-
.- Type
- description¶
Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
- Type
- agent_version¶
Optional. The agent version loaded into this environment. Supported formats:
projects/<Project ID>/agent/versions/<Version ID>
projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
- Type
- state¶
Output only. The state of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
- update_time¶
Output only. The last update time of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
- text_to_speech_settings¶
Optional. Text to speech settings for this environment.
- fulfillment¶
Optional. The fulfillment settings to use for this environment.
- class State(value)[source]¶
Bases:
proto.enums.Enum
Represents an environment state. When an environment is pointed to a new agent version, the environment is temporarily set to the
LOADING
state. During that time, the environment keeps on serving the previous version of the agent. After the new agent version is done loading, the environment is set back to theRUNNING
state.- Values:
- STATE_UNSPECIFIED (0):
Not specified. This value is not used.
- STOPPED (1):
Stopped.
- LOADING (2):
Loading.
- RUNNING (3):
Running.
- class google.cloud.dialogflow_v2.types.EnvironmentHistory(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory].
- parent¶
Output only. The name of the environment this history is for. Supported formats:
projects/<Project ID>/agent/environments/<Environment ID>
projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID>
The environment ID for the default environment is
-
.- Type
- entries¶
Output only. The list of agent environments. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EnvironmentHistory.Entry]
- next_page_token¶
Output only. Token to retrieve the next page of results, or empty if there are no more results in the list.
- Type
- class Entry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents an environment history entry.
- create_time¶
The creation time of this environment history entry.
- class google.cloud.dialogflow_v2.types.EvaluationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The configuration for model evaluation.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- datasets¶
Required. Datasets used for evaluation.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.InputDataset]
- smart_reply_config¶
Configuration for smart reply model evalution.
This field is a member of oneof
model_specific_config
.
- smart_compose_config¶
Configuration for smart compose model evalution.
This field is a member of oneof
model_specific_config
.
- class SmartComposeConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Smart compose specific configuration for evaluation job.
- allowlist_document¶
The allowlist document resource name. Format:
projects/<Project ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
. Only used for smart compose model.- Type
- class SmartReplyConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Smart reply specific configuration for evaluation job.
- allowlist_document¶
The allowlist document resource name. Format:
projects/<Project ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
. Only used for smart reply model.- Type
- class google.cloud.dialogflow_v2.types.EventInput(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Events allow for matching intents by event name instead of the natural language input. For instance, input
<event: { name: "welcome_event", parameters: { name: "Sam" } }>
can trigger a personalized welcome response. The parametername
may be used by the agent in the response:"Hello #welcome_event.name! What can I do for you today?"
.- parameters¶
The collection of parameters associated with the event.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
MapKey type: string
MapKey value: parameter name
MapValue type: If parameter’s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
MapValue value: If parameter’s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
- language_code¶
Required. The language of this query. See Language Support 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.
This field is ignored when used in the context of a [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input] field, because the language was already defined in the originating detect intent request.
- Type
- class google.cloud.dialogflow_v2.types.ExportAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
- parent¶
Required. The project that the agent to export is associated with. Format:
projects/<Project ID>
.- Type
- agent_uri¶
Required. The Google Cloud Storage URI to export the agent to. The format of this URI must be
gs://<bucket-name>/<object-name>
. If left unspecified, the serialized agent is returned inline.Dialogflow performs a write operation for the Cloud Storage object on the caller’s behalf, so your request authentication must have write permissions for the object. For more information, see Dialogflow access control.
- Type
- class google.cloud.dialogflow_v2.types.ExportAgentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class google.cloud.dialogflow_v2.types.ExportDocumentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
- name¶
Required. The name of the document to export. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
.- Type
- gcs_destination¶
Cloud Storage file path to export the document.
This field is a member of oneof
destination
.
- export_full_content¶
When enabled, export the full content of the document including empirical probability.
- Type
- class google.cloud.dialogflow_v2.types.ExportOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata related to the Export Data Operations (e.g. ExportDocument).
- exported_gcs_destination¶
Cloud Storage file path of the exported data.
- class google.cloud.dialogflow_v2.types.FaqAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents answer from “frequently asked questions”.
- confidence¶
The system’s confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
- Type
- source¶
Indicates which Knowledge Document this answer was extracted from. Format:
projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
.- Type
- metadata¶
A map that contains metadata about the answer and the document from which it originates.
- answer_record¶
The name of answer record, in the format of “projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>”.
- Type
- class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.FewShotExample(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Providing examples in the generator (i.e. building a few-shot generator) helps convey the desired format of the LLM response.
- conversation_context¶
Optional. Conversation transcripts.
- extra_info¶
Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains “@price”, and ingested data has <”price”, “10”>
- summarization_section_list¶
Summarization sections.
This field is a member of oneof
instruction_list
.
- output¶
Required. Example output of the model.
- class ExtraInfoEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.Fulfillment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday.
For more information, see the fulfillment guide.
- name¶
Required. The unique identifier of the fulfillment. Supported formats:
projects/<Project ID>/agent/fulfillment
projects/<Project ID>/locations/<Location ID>/agent/fulfillment
This field is not used for Fulfillment in an Environment.
- Type
- display_name¶
Optional. The human-readable name of the fulfillment, unique within the agent.
This field is not used for Fulfillment in an Environment.
- Type
- generic_web_service¶
Configuration for a generic web service.
This field is a member of oneof
fulfillment
.
- features¶
Optional. The field defines whether the fulfillment is enabled for certain features.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Fulfillment.Feature]
- class Feature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Whether fulfillment is enabled for the specific feature.
- type_¶
The type of the feature that enabled for fulfillment.
- class Type(value)[source]¶
Bases:
proto.enums.Enum
The type of the feature.
- Values:
- TYPE_UNSPECIFIED (0):
Feature type not specified.
- SMALLTALK (1):
Fulfillment is enabled for SmallTalk.
- class GenericWebService(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications:
Basic authentication with username and password.
Authentication with additional authentication headers.
More information could be found at:
https://cloud.google.com/dialogflow/docs/fulfillment-configure.
- uri¶
Required. The fulfillment URI for receiving POST requests. It must use https protocol.
- Type
- request_headers¶
Optional. The HTTP request headers to send together with fulfillment requests.
- is_cloud_function¶
Optional. Indicates if generic web service is created through Cloud Functions integration. Defaults to false.
is_cloud_function is deprecated. Cloud functions can be configured by its uri as a regular web service now.
- Type
- class RequestHeadersEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.GcsDestination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Google Cloud Storage location for the output.
- class google.cloud.dialogflow_v2.types.GcsSources(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Google Cloud Storage location for the inputs.
- class google.cloud.dialogflow_v2.types.GenerateStatelessSuggestionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.GenerateStatelessSuggestion][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSuggestion].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- parent¶
Required. The parent resource to charge for the Suggestion’s generation. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- generator¶
Uncreated generator. It should be a complete generator that includes all information about the generator.
This field is a member of oneof
generator_resource
.
- generator_name¶
The resource name of the existing created generator. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>
This field is a member of oneof
generator_resource
.- Type
- conversation_context¶
Optional. Context of the conversation, including transcripts.
- trigger_events¶
Optional. A list of trigger events. Generator will be triggered only if it’s trigger event is included here.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.TriggerEvent]
- class google.cloud.dialogflow_v2.types.GenerateStatelessSuggestionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Conversations.GenerateStatelessSuggestion][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSuggestion].
- generator_suggestion¶
Required. Generated suggestion for a conversation.
- class google.cloud.dialogflow_v2.types.GenerateStatelessSummaryRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
- stateless_conversation¶
Required. The conversation to suggest a summary for.
- conversation_profile¶
Required. A ConversationProfile containing information required for Summary generation. Required fields: {language_code, security_settings} Optional fields: {agent_assistant_config}
- latest_message¶
Optional. 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.
- Type
- max_context_size¶
Optional. 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.
- Type
- class MinimalConversation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The minimum amount of information required to generate a Summary without having a Conversation resource created.
- 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.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Message]
- class google.cloud.dialogflow_v2.types.GenerateStatelessSummaryResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
- summary¶
Generated summary.
- latest_message¶
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.
- Type
- context_size¶
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.
- Type
- class Summary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Generated summary for a conversation.
- text_sections¶
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.
- baseline_model_version¶
The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.
- Type
- class TextSectionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.Generator(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
LLM generator.
- name¶
Output only. Identifier. The resource name of the generator. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>
- Type
- summarization_context¶
Input of prebuilt Summarization feature.
This field is a member of oneof
context
.
- inference_parameter¶
Optional. Inference parameters for this generator.
- trigger_event¶
Optional. The trigger event of the generator. It defines when the generator is triggered in a conversation.
- create_time¶
Output only. Creation time of this generator.
- update_time¶
Output only. Update time of this generator.
- class google.cloud.dialogflow_v2.types.GeneratorSuggestion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Suggestion generated using a Generator.
- class google.cloud.dialogflow_v2.types.GetAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
- class google.cloud.dialogflow_v2.types.GetContextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
- name¶
Required. The name of the context. Format:
projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- class google.cloud.dialogflow_v2.types.GetConversationDatasetRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationDatasets.GetConversationDataset][google.cloud.dialogflow.v2.ConversationDatasets.GetConversationDataset].
- class google.cloud.dialogflow_v2.types.GetConversationModelEvaluationRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.GetConversationModelEvaluation][google.cloud.dialogflow.v2.ConversationModels.GetConversationModelEvaluation]
- class google.cloud.dialogflow_v2.types.GetConversationModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.GetConversationModel][google.cloud.dialogflow.v2.ConversationModels.GetConversationModel]
- class google.cloud.dialogflow_v2.types.GetConversationProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile].
- class google.cloud.dialogflow_v2.types.GetConversationRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.GetConversation][google.cloud.dialogflow.v2.Conversations.GetConversation].
- class google.cloud.dialogflow_v2.types.GetDocumentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.GetDocument][google.cloud.dialogflow.v2.Documents.GetDocument].
- class google.cloud.dialogflow_v2.types.GetEncryptionSpecRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request to get location-level encryption specification.
- class google.cloud.dialogflow_v2.types.GetEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType].
- name¶
Required. The name of the entity type. Format:
projects/<Project ID>/agent/entityTypes/<EntityType ID>
.- Type
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- class google.cloud.dialogflow_v2.types.GetEnvironmentHistoryRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Environments.GetEnvironmentHistory][google.cloud.dialogflow.v2.Environments.GetEnvironmentHistory].
- parent¶
Required. The name of the environment to retrieve history for. Supported formats:
projects/<Project ID>/agent/environments/<Environment ID>
projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID>
The environment ID for the default environment is
-
.- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.GetEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Environments.GetEnvironment][google.cloud.dialogflow.v2.Environments.GetEnvironment].
- class google.cloud.dialogflow_v2.types.GetFulfillmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Fulfillments.GetFulfillment][google.cloud.dialogflow.v2.Fulfillments.GetFulfillment].
- class google.cloud.dialogflow_v2.types.GetGeneratorRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message of GetGenerator.
- class google.cloud.dialogflow_v2.types.GetIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent].
- name¶
Required. The name of the intent. Format:
projects/<Project ID>/agent/intents/<Intent ID>
.- Type
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- intent_view¶
Optional. The resource view to apply to the returned intent.
- class google.cloud.dialogflow_v2.types.GetKnowledgeBaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBase].
- class google.cloud.dialogflow_v2.types.GetParticipantRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant].
- class google.cloud.dialogflow_v2.types.GetSessionEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType].
- name¶
Required. The name of the session entity type. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- class google.cloud.dialogflow_v2.types.GetValidationResultRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult].
- parent¶
Required. The project that the agent is associated with. Format:
projects/<Project ID>
.- Type
- language_code¶
Optional. The language for which you want a validation result. If not specified, the agent’s default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
- Type
- class google.cloud.dialogflow_v2.types.GetVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Versions.GetVersion][google.cloud.dialogflow.v2.Versions.GetVersion].
- class google.cloud.dialogflow_v2.types.HumanAgentAssistantConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the Human Agent Assist to connect to a conversation.
- notification_config¶
Pub/Sub topic on which to publish new agent assistant events.
- human_agent_suggestion_config¶
Configuration for agent assistance of human agent participant.
- end_user_suggestion_config¶
Configuration for agent assistance of end user participant. Currently, this feature is not general available, please contact Google to get access.
- message_analysis_config¶
Configuration for message analysis.
- class ConversationModelConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Custom conversation models used in agent assist feature.
Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY, CONVERSATION_SUMMARIZATION.
- model¶
Conversation model resource name. Format:
projects/<Project ID>/conversationModels/<Model ID>
.- Type
- baseline_model_version¶
Version of current baseline model. It will be ignored if [model][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.model] is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0
- Type
- class ConversationProcessConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config to process conversation.
- class MessageAnalysisConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration for analyses to run on each conversation message.
- enable_entity_extraction¶
Enable entity extraction in conversation messages on agent assist stage. If unspecified, defaults to false.
Currently, this feature is not general available, please contact Google to get access.
- Type
- enable_sentiment_analysis¶
Enable sentiment analysis in conversation messages on agent assist stage. 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][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message]. For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message] For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages] If Pub/Sub notification is configured, result will be in [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload].
- Type
- class SuggestionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Detail human agent assistant config.
- feature_configs¶
Configuration of different suggestion features. One feature can have only one config.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.HumanAgentAssistantConfig.SuggestionFeatureConfig]
- group_suggestion_responses¶
If
group_suggestion_responses
is false, and there are multiplefeature_configs
inevent 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 orStreamingAnalyzeContentResponse
.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.- Type
- generators¶
Optional. List of various generator resource names used in the conversation profile.
- Type
MutableSequence[str]
- disable_high_latency_features_sync_delivery¶
Optional. When disable_high_latency_features_sync_delivery is true and using the AnalyzeContent API, we will not deliver the responses from high latency features in the API response. The human_agent_assistant_config.notification_config must be configured and enable_event_based_suggestion must be set to true to receive the responses from high latency features in Pub/Sub. High latency feature(s): KNOWLEDGE_ASSIST
- Type
- class SuggestionFeatureConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config for suggestion features.
- suggestion_feature¶
The suggestion feature.
- enable_event_based_suggestion¶
Automatically iterates all participants and tries to compile suggestions.
Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, KNOWLEDGE_ASSIST.
- Type
- disable_agent_query_logging¶
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.
- Type
- enable_query_suggestion_when_no_answer¶
Optional. Enable query suggestion even if we can’t find its answer. By default, queries are suggested only if we find its answer. Supported features: KNOWLEDGE_ASSIST
- Type
- enable_conversation_augmented_query¶
Optional. Enable including conversation context during query answer generation. Supported features: KNOWLEDGE_SEARCH.
- Type
- enable_query_suggestion_only¶
Optional. Enable query suggestion only. Supported features: KNOWLEDGE_ASSIST
- Type
- suggestion_trigger_settings¶
Settings of suggestion trigger.
Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
- query_config¶
Configs of query.
- conversation_model_config¶
Configs of custom conversation model.
- conversation_process_config¶
Configs for processing conversation.
- class SuggestionQueryConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Config for suggestion query.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- knowledge_base_query_source¶
Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ.
This field is a member of oneof
query_source
.
- document_query_source¶
Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE.
This field is a member of oneof
query_source
.
- dialogflow_query_source¶
Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
This field is a member of oneof
query_source
.
- max_results¶
Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20.
- Type
- confidence_threshold¶
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.
- Type
- context_filter_settings¶
Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped.
- sections¶
Optional. The customized sections chosen to return when requesting a summary of a conversation.
- context_size¶
Optional. The number of recent messages to include in the context. Supported features: KNOWLEDGE_ASSIST.
- Type
- class ContextFilterSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Settings that determine how to filter recent conversation context when generating suggestions.
- drop_handoff_messages¶
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.
- Type
- class DialogflowQuerySource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Dialogflow source setting.
Supported feature: DIALOGFLOW_ASSIST.
- agent¶
Required. The name of a Dialogflow virtual agent used for end user side intent detection and suggestion. Format:
projects/<Project ID>/locations/<Location ID>/agent
. When multiple agents are allowed in the same Dialogflow project.- Type
- human_agent_side_config¶
Optional. The Dialogflow assist configuration for human agent.
- class HumanAgentSideConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The configuration used for human agent side Dialogflow assist suggestion.
- class DocumentQuerySource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Document source settings.
Supported features: SMART_REPLY, SMART_COMPOSE.
- class KnowledgeBaseQuerySource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Knowledge base source settings.
Supported features: ARTICLE_SUGGESTION, FAQ.
- class Sections(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- section_types¶
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}.
- class SectionType(value)[source]¶
Bases:
proto.enums.Enum
Selectable sections to return when requesting a summary of a conversation.
- Values:
- SECTION_TYPE_UNSPECIFIED (0):
Undefined section type, does not return anything.
- SITUATION (1):
What the customer needs help with or has question about. Section name: “situation”.
- ACTION (2):
What the agent does to help the customer. Section name: “action”.
- RESOLUTION (3):
Result of the customer service. A single word describing the result of the conversation. Section name: “resolution”.
- REASON_FOR_CANCELLATION (4):
Reason for cancellation if the customer requests for a cancellation. “N/A” otherwise. Section name: “reason_for_cancellation”.
- CUSTOMER_SATISFACTION (5):
“Unsatisfied” or “Satisfied” depending on the customer’s feelings at the end of the conversation. Section name: “customer_satisfaction”.
- ENTITIES (6):
Key entities extracted from the conversation, such as ticket number, order number, dollar amount, etc. Section names are prefixed by “entities/”.
- class SuggestionTriggerSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Settings of suggestion trigger.
- class google.cloud.dialogflow_v2.types.HumanAgentAssistantEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation.
- conversation¶
The conversation this notification refers to. Format:
projects/<Project ID>/conversations/<Conversation ID>
.- Type
- participant¶
The participant that the suggestion is compiled for. Format:
projects/<Project ID>/conversations/<Conversation ID>/participants/<Participant ID>
. It will not be set in legacy workflow.- Type
- suggestion_results¶
The suggestion results payload that this notification refers to.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SuggestionResult]
- class google.cloud.dialogflow_v2.types.HumanAgentHandoffConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- live_person_config¶
Uses LivePerson.
This field is a member of oneof
agent_service
.
- salesforce_live_agent_config¶
Uses Salesforce Live Agent.
This field is a member of oneof
agent_service
.
- class LivePersonConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration specific to LivePerson.
- class SalesforceLiveAgentConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration specific to Salesforce Live Agent.
- endpoint_domain¶
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.- Type
- class google.cloud.dialogflow_v2.types.ImportAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- parent¶
Required. The project that the agent to import is associated with. Format:
projects/<Project ID>
.- Type
- agent_uri¶
The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with “gs://”.
Dialogflow performs a read operation for the Cloud Storage object on the caller’s behalf, so your request authentication must have read permissions for the object. For more information, see Dialogflow access control.
This field is a member of oneof
agent
.- Type
- class google.cloud.dialogflow_v2.types.ImportConversationDataOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData] operation.
- conversation_dataset¶
The resource name of the imported conversation dataset. Format:
projects/<Project ID>/locations/<Location ID>/conversationDatasets/<Conversation Dataset Id>
- Type
- partial_failures¶
Partial failures are failures that don’t fail the whole long running operation, e.g. single files that couldn’t be read.
- Type
MutableSequence[google.rpc.status_pb2.Status]
- create_time¶
Timestamp when import conversation data request was created. The time is measured on server side.
- class google.cloud.dialogflow_v2.types.ImportConversationDataOperationResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response used for [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData] long running operation.
- conversation_dataset¶
The resource name of the imported conversation dataset. Format:
projects/<Project ID>/locations/<Location ID>/conversationDatasets/<Conversation Dataset Id>
- Type
- class google.cloud.dialogflow_v2.types.ImportConversationDataRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationDatasets.ImportConversationData][google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationData].
- name¶
Required. Dataset resource name. Format:
projects/<Project ID>/locations/<Location ID>/conversationDatasets/<Conversation Dataset ID>
- Type
- input_config¶
Required. Configuration describing where to import data from.
- class google.cloud.dialogflow_v2.types.ImportDocumentTemplate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The template used for importing documents.
- knowledge_types¶
Required. The knowledge type of document content.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Document.KnowledgeType]
- metadata¶
Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document’s title, an external URL distinct from the document’s content_uri, etc. The max size of a
key
or avalue
of the metadata is 1024 bytes.
- class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.ImportDocumentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments].
- parent¶
Required. The knowledge base to import documents into. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>
.- Type
- gcs_source¶
Optional. The Google Cloud Storage location for the documents. The path can include a wildcard.
These URIs may have the forms
gs://<bucket-name>/<object-name>
.gs://<bucket-name>/<object-path>/*.<extension>
.This field is a member of oneof
source
.
- document_template¶
Required. Document template used for importing all the documents.
- class google.cloud.dialogflow_v2.types.ImportDocumentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for [Documents.ImportDocuments][google.cloud.dialogflow.v2.Documents.ImportDocuments].
- warnings¶
Includes details about skipped documents or any other warnings.
- Type
MutableSequence[google.rpc.status_pb2.Status]
- class google.cloud.dialogflow_v2.types.InferenceParameter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The parameters of inference.
- max_output_tokens¶
Optional. Maximum number of the output tokens for the generator.
This field is a member of oneof
_max_output_tokens
.- Type
- temperature¶
Optional. Controls the randomness of LLM predictions. Low temperature = less random. High temperature = more random. If unset (or 0), uses a default value of 0.
This field is a member of oneof
_temperature
.- Type
- top_k¶
Optional. Top-k changes how the model selects tokens for output. A top-k of 1 means the selected token is the most probable among all tokens in the model’s vocabulary (also called greedy decoding), while a top-k of 3 means that the next token is selected from among the 3 most probable tokens (using temperature). For each token selection step, the top K tokens with the highest probabilities are sampled. Then tokens are further filtered based on topP with the final token selected using temperature sampling. Specify a lower value for less random responses and a higher value for more random responses. Acceptable value is [1, 40], default to 40.
This field is a member of oneof
_top_k
.- Type
- top_p¶
Optional. Top-p changes how the model selects tokens for output. Tokens are selected from most K (see topK parameter) probable to least until the sum of their probabilities equals the top-p value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-p value is 0.5, then the model will select either A or B as the next token (using temperature) and doesn’t consider C. The default top-p value is 0.95. Specify a lower value for less random responses and a higher value for more random responses. Acceptable value is [0.0, 1.0], default to 0.95.
This field is a member of oneof
_top_p
.- Type
- class google.cloud.dialogflow_v2.types.InitializeEncryptionSpecMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for initializing a location-level encryption specification.
- request¶
Output only. The original request for initialization.
- class google.cloud.dialogflow_v2.types.InitializeEncryptionSpecRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request to initialize a location-level encryption specification.
- encryption_spec¶
Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms_key_name is left empty, no encryption will be enforced.
- class google.cloud.dialogflow_v2.types.InitializeEncryptionSpecResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response to initialize a location-level encryption specification.
- class google.cloud.dialogflow_v2.types.InputAudioConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Instructs the speech recognizer how to process the audio content.
- audio_encoding¶
Required. Audio encoding of the audio content to process.
- sample_rate_hertz¶
Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to Cloud Speech API documentation for more details.
- Type
- language_code¶
Required. The language of the supplied audio. Dialogflow does not do translations. See Language Support 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.
- Type
- enable_word_info¶
If
true
, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn’t return any word-level information.- Type
- phrase_hints¶
A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.
See the Cloud Speech documentation for more details.
This field is deprecated. Please use
`speech_contexts
<>`__ instead. If you specify both`phrase_hints
<>`__ and`speech_contexts
<>`__, Dialogflow will treat the`phrase_hints
<>`__ as a single additional`SpeechContext
<>`__.- Type
MutableSequence[str]
- speech_contexts¶
Context information to assist speech recognition.
See the Cloud Speech documentation for more details.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SpeechContext]
- model¶
Optional. Which Speech model to select for the given request. For more information, see Speech models.
- Type
- model_variant¶
Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use.
- single_utterance¶
If
false
(default), recognition does not cease until the client closes the stream. Iftrue
, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio’s voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance.- Type
- disable_no_speech_recognized_event¶
Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]. If
false
and recognition doesn’t return any result, triggerNO_SPEECH_RECOGNIZED
event to Dialogflow agent.- Type
- phrase_sets¶
A collection of phrase set resources to use for speech adaptation.
- Type
MutableSequence[str]
- opt_out_conformer_model_migration¶
If
true
, the request will opt out for STT conformer model migration. This field will be deprecated once force migration takes place in June 2024. Please refer to Dialogflow ES Speech model migration.- Type
- class google.cloud.dialogflow_v2.types.InputConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the configuration of importing a set of conversation files in Google Cloud Storage.
- class google.cloud.dialogflow_v2.types.InputDataset(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
InputDataset used to create model or do evaluation. NextID:5
- class google.cloud.dialogflow_v2.types.InputTextConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the language used in the input text.
- language_code¶
Required. The language of this conversational query. See Language Support for a list of the currently supported language codes.
- Type
- class google.cloud.dialogflow_v2.types.Intent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An intent categorizes an end-user’s intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification.
For more information, see the intent guide.
- name¶
Optional. The unique identifier of this intent. Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] methods. Format:
projects/<Project ID>/agent/intents/<Intent ID>
.- Type
- webhook_state¶
Optional. Indicates whether webhooks are enabled for the intent.
- priority¶
Optional. The priority of this intent. Higher numbers represent higher priorities.
If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the
Normal
priority in the console.If the supplied value is negative, the intent is ignored in runtime detect intent requests.
- Type
- ml_disabled¶
Optional. Indicates whether Machine Learning is disabled for the intent. Note: If
ml_disabled
setting is set to true, then this intent is not taken into account during inference inML ONLY
match mode. Also, auto-markup in the UI is turned off.- Type
- live_agent_handoff¶
Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.
- Type
- end_interaction¶
Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.
- Type
- input_context_names¶
Optional. The list of context names required for this intent to be triggered. Format:
projects/<Project ID>/agent/sessions/-/contexts/<Context ID>
.- Type
MutableSequence[str]
- events¶
Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.
- Type
MutableSequence[str]
- training_phrases¶
Optional. The collection of examples that the agent is trained on.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.TrainingPhrase]
- action¶
Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces.
- Type
- output_contexts¶
Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the
lifespan_count
to 0 will reset the context when the intent is matched. Format:projects/<Project ID>/agent/sessions/-/contexts/<Context ID>
.- Type
MutableSequence[google.cloud.dialogflow_v2.types.Context]
- reset_contexts¶
Optional. Indicates whether to delete all contexts in the current session when this intent is matched.
- Type
- parameters¶
Optional. The collection of parameters associated with the intent.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Parameter]
- messages¶
Optional. The collection of rich messages corresponding to the
Response
field in the Dialogflow console.- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message]
- default_response_platforms¶
Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.Platform]
- root_followup_intent_name¶
Output only. Read-only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. We populate this field only in the output.
Format:
projects/<Project ID>/agent/intents/<Intent ID>
.- Type
- parent_followup_intent_name¶
Read-only after creation. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with [CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent] or [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this intent a followup intent.
It identifies the parent followup intent. Format:
projects/<Project ID>/agent/intents/<Intent ID>
.- Type
- followup_intent_info¶
Output only. Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.FollowupIntentInfo]
- class FollowupIntentInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a single followup intent in the chain.
- followup_intent_name¶
The unique identifier of the followup intent. Format:
projects/<Project ID>/agent/intents/<Intent ID>
.- Type
- class Message(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A rich response message. Corresponds to the intent
Response
field in the Dialogflow console. For more information, see Rich response messages.This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- simple_responses¶
The voice and text-only responses for Actions on Google.
This field is a member of oneof
message
.
- link_out_suggestion¶
The link out suggestion chip for Actions on Google.
This field is a member of oneof
message
.
- carousel_select¶
The carousel card response for Actions on Google.
This field is a member of oneof
message
.
- browse_carousel_card¶
Browse carousel card for Actions on Google.
This field is a member of oneof
message
.
- media_content¶
The media content card for Actions on Google.
This field is a member of oneof
message
.
- platform¶
Optional. The platform that this message is intended for.
- class BasicCard(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The basic card message. Useful for displaying information.
- image¶
Optional. The image for the card.
- buttons¶
Optional. The collection of card buttons.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.BasicCard.Button]
- class Button(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The button object that appears at the bottom of a card.
- open_uri_action¶
Required. Action to take when a user taps on the button.
- class OpenUriAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Opens the given URI.
- class BrowseCarouselCard(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Browse Carousel Card for Actions on Google. https://developers.google.com/actions/assistant/responses#browsing_carousel
- items¶
Required. List of items in the Browse Carousel Card. Minimum of two items, maximum of ten.
- image_display_options¶
Optional. Settings for displaying the image. Applies to every image in [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
- class BrowseCarouselCardItem(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Browsing carousel tile
- open_uri_action¶
Required. Action to present to the user.
- image¶
Optional. Hero image for the carousel item.
Optional. Text that appears at the bottom of the Browse Carousel Card. Maximum of one line of text.
- Type
- class OpenUrlAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Actions on Google action to open a given url.
- url_type_hint¶
Optional. Specifies the type of viewer that is used when opening the URL. Defaults to opening via web browser.
- class UrlTypeHint(value)[source]¶
Bases:
proto.enums.Enum
Type of the URI.
- Values:
- URL_TYPE_HINT_UNSPECIFIED (0):
Unspecified
- AMP_ACTION (1):
Url would be an amp action
- AMP_CONTENT (2):
URL that points directly to AMP content, or to a canonical URL which refers to AMP content via <link rel=”amphtml”>.
- class ImageDisplayOptions(value)[source]¶
Bases:
proto.enums.Enum
Image display options for Actions on Google. This should be used for when the image’s aspect ratio does not match the image container’s aspect ratio.
- Values:
- IMAGE_DISPLAY_OPTIONS_UNSPECIFIED (0):
Fill the gaps between the image and the image container with gray bars.
- GRAY (1):
Fill the gaps between the image and the image container with gray bars.
- WHITE (2):
Fill the gaps between the image and the image container with white bars.
- CROPPED (3):
Image is scaled such that the image width and height match or exceed the container dimensions. This may crop the top and bottom of the image if the scaled image height is greater than the container height, or crop the left and right of the image if the scaled image width is greater than the container width. This is similar to “Zoom Mode” on a widescreen TV when playing a 4:3 video.
- BLURRED_BACKGROUND (4):
Pad the gaps between image and image frame with a blurred copy of the same image.
- class Card(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The card response message.
- buttons¶
Optional. The collection of card buttons.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.Card.Button]
- class CarouselSelect(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The card for presenting a carousel of options to select from.
- items¶
Required. Carousel items.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.CarouselSelect.Item]
- class Item(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An item in the carousel.
- info¶
Required. Additional info about the option item.
- image¶
Optional. The image to display.
- class ColumnProperties(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Column properties for [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard].
- horizontal_alignment¶
Optional. Defines text alignment for all cells in this column.
- class HorizontalAlignment(value)[source]¶
Bases:
proto.enums.Enum
Text alignments within a cell.
- Values:
- HORIZONTAL_ALIGNMENT_UNSPECIFIED (0):
Text is aligned to the leading edge of the column.
- LEADING (1):
Text is aligned to the leading edge of the column.
- CENTER (2):
Text is centered in the column.
- TRAILING (3):
Text is aligned to the trailing edge of the column.
- class Image(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The image response message.
- class LinkOutSuggestion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The suggestion chip message that allows the user to jump out to the app or website associated with this agent.
- class ListSelect(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The card for presenting a list of options to select from.
- items¶
Required. List items.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.ListSelect.Item]
- class Item(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An item in the list.
- info¶
Required. Additional information about this option.
- image¶
Optional. The image to display.
- class MediaContent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The media content card for Actions on Google.
- media_type¶
Optional. What type of media is the content (ie “audio”).
- media_objects¶
Required. List of media objects.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.MediaContent.ResponseMediaObject]
- class ResponseMediaObject(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response media object for media content card.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class ResponseMediaType(value)[source]¶
Bases:
proto.enums.Enum
Format of response media type.
- Values:
- RESPONSE_MEDIA_TYPE_UNSPECIFIED (0):
Unspecified.
- AUDIO (1):
Response media type is audio.
- class Platform(value)[source]¶
Bases:
proto.enums.Enum
The rich response message integration platform. See Integrations.
- Values:
- PLATFORM_UNSPECIFIED (0):
Default platform.
- FACEBOOK (1):
Facebook.
- SLACK (2):
Slack.
- TELEGRAM (3):
Telegram.
- KIK (4):
Kik.
- SKYPE (5):
Skype.
- LINE (6):
Line.
- VIBER (7):
Viber.
- ACTIONS_ON_GOOGLE (8):
Google Assistant See Dialogflow webhook format
- GOOGLE_HANGOUTS (11):
Google Hangouts.
- class QuickReplies(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The quick replies response message.
- class SelectItemInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Additional info about the select item for when it is triggered in a dialog.
- class SimpleResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The simple response message containing speech or text.
- text_to_speech¶
One of text_to_speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml.
- Type
- ssml¶
One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text_to_speech.
- Type
- class SimpleResponses(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The collection of simple response candidates. This message in
QueryResult.fulfillment_messages
andWebhookResponse.fulfillment_messages
should contain only oneSimpleResponse
.- simple_responses¶
Required. The list of simple responses.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.SimpleResponse]
- class Suggestion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The suggestion chip message that the user can tap to quickly post a reply to the conversation.
- class Suggestions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The collection of suggestions.
- suggestions¶
Required. The list of suggested replies.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.Suggestion]
- class TableCard(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Table card for Actions on Google.
- image¶
Optional. Image which should be displayed on the card.
- column_properties¶
Optional. Display properties for the columns in this table.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.ColumnProperties]
- rows¶
Optional. Rows in this table of data.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.TableCardRow]
- buttons¶
Optional. List of buttons for the card.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.BasicCard.Button]
- class TableCardCell(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Cell of [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow].
- class TableCardRow(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard].
- cells¶
Optional. List of cells that make up this row.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message.TableCardCell]
- class Text(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The text response message.
- class Parameter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents intent parameters.
- value¶
Optional. The definition of the parameter value. It can be:
a constant string,
a parameter value defined as
$parameter_name
,an original parameter value defined as
$parameter_name.original
,a parameter value from some context defined as
#context_name.parameter_name
.
- Type
- default_value¶
Optional. The default value to use when the
value
yields an empty result. Default values can be extracted from contexts by using the following syntax:#context_name.parameter_name
.- Type
- entity_type_display_name¶
Optional. The name of the entity type, prefixed with
@
, that describes values of the parameter. If the parameter is required, this must be provided.- Type
- mandatory¶
Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value.
- Type
- class TrainingPhrase(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents an example that the agent is trained on.
- type_¶
Required. The type of the training phrase.
- parts¶
Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase.
Note: The API does not automatically annotate training phrases like the Dialogflow Console does.
Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated.
If the training phrase does not need to be annotated with parameters, you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set.
If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways:
Part.text
is set to a part of the phrase that has no parameters.Part.text
is set to a part of the phrase that you want to annotate, and theentity_type
,alias
, anduser_defined
fields are all set.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.TrainingPhrase.Part]
- times_added_count¶
Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased.
- Type
- class Part(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a part of a training phrase.
- entity_type¶
Optional. The entity type name prefixed with
@
. This field is required for annotated parts of the training phrase.- Type
- alias¶
Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase.
- Type
- class Type(value)[source]¶
Bases:
proto.enums.Enum
Represents different types of training phrases.
- Values:
- TYPE_UNSPECIFIED (0):
Not specified. This value should never be used.
- EXAMPLE (1):
Examples do not contain @-prefixed entity type names, but example parts can be annotated with entity types.
- TEMPLATE (2):
Templates are not annotated with entity types, but they can contain @-prefixed entity type names as substrings. Template mode has been deprecated. Example mode is the only supported way to create new training phrases. If you have existing training phrases that you’ve created in template mode, those will continue to work.
- class WebhookState(value)[source]¶
Bases:
proto.enums.Enum
Represents the different states that webhooks can be in.
- Values:
- WEBHOOK_STATE_UNSPECIFIED (0):
Webhook is disabled in the agent and in the intent.
- WEBHOOK_STATE_ENABLED (1):
Webhook is enabled in the agent and in the intent.
- WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING (2):
Webhook is enabled in the agent and in the intent. Also, each slot filling prompt is forwarded to the webhook.
- class google.cloud.dialogflow_v2.types.IntentBatch(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
This message is a wrapper around a collection of intents.
- intents¶
A collection of intents.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent]
- class google.cloud.dialogflow_v2.types.IntentSuggestion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents an intent suggestion.
- class google.cloud.dialogflow_v2.types.IntentView(value)[source]¶
Bases:
proto.enums.Enum
Represents the options for views of an intent. An intent can be a sizable object. Therefore, we provide a resource view that does not return training phrases in the response by default.
- Values:
- INTENT_VIEW_UNSPECIFIED (0):
Training phrases field is not populated in the response.
- INTENT_VIEW_FULL (1):
All fields are populated.
- class google.cloud.dialogflow_v2.types.KnowledgeAssistAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a Knowledge Assist answer.
- suggested_query¶
The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion.
- suggested_query_answer¶
The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query.
- answer_record¶
The name of the answer record. Format:
projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>
.- Type
- class KnowledgeAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents an answer from Knowledge. Currently supports FAQ and Generative answers.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- generative_source¶
Populated if the prediction was Generative.
This field is a member of oneof
source
.
- class FaqSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Details about source of FAQ answer.
- class GenerativeSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Details about source of Generative answer.
- snippets¶
All snippets used for this Generative Prediction, with their source URI and data.
- class Snippet(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Snippet Source for a Generative Prediction.
- metadata¶
Metadata of the document.
- class SuggestedQuery(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a suggested query.
- class google.cloud.dialogflow_v2.types.KnowledgeBase(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A knowledge base represents a collection of knowledge documents that you provide to Dialogflow. Your knowledge documents contain information that may be useful during conversations with end-users. Some Dialogflow features use knowledge bases when looking for a response to an end-user input.
For more information, see the knowledge base guide.
Note: The
projects.agent.knowledgeBases
resource is deprecated; only useprojects.knowledgeBases
.- name¶
The knowledge base resource name. The name must be empty when creating a knowledge base. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>
.- Type
- display_name¶
Required. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails.
- Type
- class google.cloud.dialogflow_v2.types.KnowledgeOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata in google::longrunning::Operation for Knowledge operations.
- state¶
Output only. The current state of this operation.
- export_operation_metadata¶
Metadata for the Export Data Operation such as the destination of export.
This field is a member of oneof
operation_metadata
.
- class State(value)[source]¶
Bases:
proto.enums.Enum
States of the operation.
- Values:
- STATE_UNSPECIFIED (0):
State unspecified.
- PENDING (1):
The operation has been created.
- RUNNING (2):
The operation is currently running.
- DONE (3):
The operation is done, either cancelled or completed.
- class google.cloud.dialogflow_v2.types.ListAnswerRecordsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
- parent¶
Required. The project to list all answer records for in reverse chronological order. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- filter¶
Optional. Filters to restrict results to specific answer records.
Marked deprecated as it hasn’t been, and isn’t currently, supported.
For more information about filtering, see API Filtering.
- Type
- page_size¶
Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.
- Type
- class google.cloud.dialogflow_v2.types.ListAnswerRecordsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
- answer_records¶
The list of answer records.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.AnswerRecord]
- next_page_token¶
A token to retrieve next page of results. Or empty if there are no more results. Pass this value in the [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] field in the subsequent call to
ListAnswerRecords
method to retrieve the next page of results.- Type
- class google.cloud.dialogflow_v2.types.ListContextsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
- parent¶
Required. The session to list all contexts from. Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListContextsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
- contexts¶
The list of contexts. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Context]
- class google.cloud.dialogflow_v2.types.ListConversationDatasetsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationDatasets.ListConversationDatasets][google.cloud.dialogflow.v2.ConversationDatasets.ListConversationDatasets].
- parent¶
Required. The project and location name to list all conversation datasets for. Format:
projects/<Project ID>/locations/<Location ID>
- Type
- page_size¶
Optional. Maximum number of conversation datasets to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListConversationDatasetsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [ConversationDatasets.ListConversationDatasets][google.cloud.dialogflow.v2.ConversationDatasets.ListConversationDatasets].
- conversation_datasets¶
The list of datasets to return.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.ConversationDataset]
- class google.cloud.dialogflow_v2.types.ListConversationModelEvaluationsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.ListConversationModelEvaluations][google.cloud.dialogflow.v2.ConversationModels.ListConversationModelEvaluations]
- parent¶
Required. The conversation model resource name. Format:
projects/<Project ID>/conversationModels/<Conversation Model ID>
- Type
- page_size¶
Optional. Maximum number of evaluations to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListConversationModelEvaluationsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [ConversationModels.ListConversationModelEvaluations][google.cloud.dialogflow.v2.ConversationModels.ListConversationModelEvaluations]
- conversation_model_evaluations¶
The list of evaluations to return.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.ConversationModelEvaluation]
- class google.cloud.dialogflow_v2.types.ListConversationModelsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.ListConversationModels][google.cloud.dialogflow.v2.ConversationModels.ListConversationModels]
- parent¶
Required. The project to list all conversation models for. Format:
projects/<Project ID>
- Type
- page_size¶
Optional. Maximum number of conversation models to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListConversationModelsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [ConversationModels.ListConversationModels][google.cloud.dialogflow.v2.ConversationModels.ListConversationModels]
- conversation_models¶
The list of models to return.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.ConversationModel]
- class google.cloud.dialogflow_v2.types.ListConversationProfilesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles].
- parent¶
Required. The project to list all conversation profiles from. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- page_size¶
The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListConversationProfilesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles].
- conversation_profiles¶
The list of project conversation profiles. There is a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.ConversationProfile]
- class google.cloud.dialogflow_v2.types.ListConversationsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations].
- parent¶
Required. The project from which to list all conversation. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- filter¶
Optional. A filter expression that filters conversations listed in the response. Only
lifecycle_state
can be filtered on in this way. For example, the following expression only returnsCOMPLETED
conversations:lifecycle_state = "COMPLETED"
For more information about filtering, see API Filtering.
- Type
- class google.cloud.dialogflow_v2.types.ListConversationsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Conversations.ListConversations][google.cloud.dialogflow.v2.Conversations.ListConversations].
- conversations¶
The list of conversations. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Conversation]
- class google.cloud.dialogflow_v2.types.ListDocumentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
- parent¶
Required. The knowledge base to list all documents for. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>
.- Type
- page_size¶
The maximum number of items to return in a single page. By default 10 and at most 100.
- Type
- filter¶
The filter expression used to filter documents returned by the list method. The expression has the following syntax:
[AND ] …
The following fields and operators are supported:
knowledge_types with has(:) operator
display_name with has(:) operator
state with equals(=) operator
Examples:
“knowledge_types:FAQ” matches documents with FAQ knowledge type.
“display_name:customer” matches documents whose display name contains “customer”.
“state=ACTIVE” matches documents with ACTIVE state.
“knowledge_types:FAQ AND state=ACTIVE” matches all active FAQ documents.
For more information about filtering, see API Filtering.
- Type
- class google.cloud.dialogflow_v2.types.ListDocumentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
- documents¶
The list of documents.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Document]
- class google.cloud.dialogflow_v2.types.ListEntityTypesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
- parent¶
Required. The agent to list all entity types from. Format:
projects/<Project ID>/agent
.- Type
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListEntityTypesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
- entity_types¶
The list of agent entity types. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType]
- class google.cloud.dialogflow_v2.types.ListEnvironmentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].
- parent¶
Required. The agent to list all environments from. Format:
projects/<Project ID>/agent
projects/<Project ID>/locations/<Location ID>/agent
- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListEnvironmentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].
- environments¶
The list of agent environments. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Environment]
- class google.cloud.dialogflow_v2.types.ListGeneratorsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message of ListGenerators.
- parent¶
Required. The project/location to list generators for. Format:
projects/<Project ID>/locations/<Location ID>
- Type
- page_size¶
Optional. Maximum number of conversation models to return in a single page. Default to 10.
- Type
- class google.cloud.dialogflow_v2.types.ListGeneratorsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response of ListGenerators.
- generators¶
List of generators retrieved.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Generator]
- class google.cloud.dialogflow_v2.types.ListIntentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
- parent¶
Required. The agent to list all intents from. Format:
projects/<Project ID>/agent
orprojects/<Project ID>/locations/<Location ID>/agent
.Alternatively, you can specify the environment to list intents for. Format:
projects/<Project ID>/agent/environments/<Environment ID>
orprojects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID>
. Note: training phrases of the intents will not be returned for non-draft environment.- Type
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- intent_view¶
Optional. The resource view to apply to the returned intent.
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListIntentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
- intents¶
The list of agent intents. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent]
- class google.cloud.dialogflow_v2.types.ListKnowledgeBasesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases].
- parent¶
Required. The project to list of knowledge bases for. Format:
projects/<Project ID>/locations/<Location ID>
.- Type
- page_size¶
The maximum number of items to return in a single page. By default 10 and at most 100.
- Type
- filter¶
The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax:
[AND ] …
The following fields and operators are supported:
display_name with has(:) operator
language_code with equals(=) operator
Examples:
‘language_code=en-us’ matches knowledge bases with en-us language code.
‘display_name:articles’ matches knowledge bases whose display name contains “articles”.
‘display_name:”Best Articles”’ matches knowledge bases whose display name contains “Best Articles”.
‘language_code=en-gb AND display_name=articles’ matches all knowledge bases whose display name contains “articles” and whose language code is “en-gb”.
Note: An empty filter string (i.e. “”) is a no-op and will result in no filtering.
For more information about filtering, see API Filtering.
- Type
- class google.cloud.dialogflow_v2.types.ListKnowledgeBasesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases].
- knowledge_bases¶
The list of knowledge bases.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.KnowledgeBase]
- class google.cloud.dialogflow_v2.types.ListMessagesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages].
- parent¶
Required. The name of the conversation to list messages for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
- Type
- filter¶
Optional. Filter on message fields. Currently predicates on
create_time
andcreate_time_epoch_microseconds
are supported.create_time
only support milliseconds accuracy. E.g.,create_time_epoch_microseconds > 1551790877964485
orcreate_time > 2017-01-15T01:30:15.01Z
.For more information about filtering, see API Filtering.
- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListMessagesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages].
- messages¶
The list of messages. There will be a maximum number of items returned based on the page_size field in the request.
messages
is sorted bycreate_time
in descending order.- Type
MutableSequence[google.cloud.dialogflow_v2.types.Message]
- class google.cloud.dialogflow_v2.types.ListParticipantsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
- parent¶
Required. The conversation to list all participants from. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
.- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListParticipantsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
- participants¶
The list of participants. There is a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Participant]
- class google.cloud.dialogflow_v2.types.ListSessionEntityTypesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
- parent¶
Required. The session to list all session entity types from. Format:
projects/<Project ID>/agent/sessions/<Session ID>
orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/ sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListSessionEntityTypesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
- session_entity_types¶
The list of session entity types. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SessionEntityType]
- class google.cloud.dialogflow_v2.types.ListVersionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions].
- parent¶
Required. The agent to list all versions from. Supported formats:
projects/<Project ID>/agent
projects/<Project ID>/locations/<Location ID>/agent
- Type
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.ListVersionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Versions.ListVersions][google.cloud.dialogflow.v2.Versions.ListVersions].
- versions¶
The list of agent versions. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Version]
- class google.cloud.dialogflow_v2.types.LoggingConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines logging behavior for conversation lifecycle events.
- enable_stackdriver_logging¶
Whether to log conversation events like [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to Stackdriver in the conversation project as JSON format [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos.
- Type
- class google.cloud.dialogflow_v2.types.Message(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a message posted into a conversation.
- name¶
Optional. The unique identifier of the message. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- language_code¶
Optional. The message language. This should be a BCP-47 language tag. Example: “en-US”.
- Type
- participant_role¶
Output only. The role of the participant.
- create_time¶
Output only. The time when the message was created in Contact Center AI.
- send_time¶
Optional. The time when the message was sent.
- message_annotation¶
Output only. The annotation for the message.
- sentiment_analysis¶
Output only. The sentiment analysis result for the message.
- class google.cloud.dialogflow_v2.types.MessageAnnotation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the result of annotation for the message.
- parts¶
The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
- Type
MutableSequence[google.cloud.dialogflow_v2.types.AnnotatedMessagePart]
- class google.cloud.dialogflow_v2.types.MessageEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a message entry of a conversation.
- role¶
Optional. Participant role of the message.
- language_code¶
Optional. The language of the text. See Language Support for a list of the currently supported language codes.
- Type
- create_time¶
Optional. Create time of the message entry.
- class Role(value)[source]¶
Bases:
proto.enums.Enum
Enumeration of the roles a participant can play in a conversation.
- Values:
- ROLE_UNSPECIFIED (0):
Participant role not set.
- HUMAN_AGENT (1):
Participant is a human agent.
- AUTOMATED_AGENT (2):
Participant is an automated agent, such as a Dialogflow agent.
- END_USER (3):
Participant is an end user that has called or chatted with Dialogflow services.
- class google.cloud.dialogflow_v2.types.NotificationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines notification behavior.
- topic¶
Name of the Pub/Sub topic to publish conversation events like [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] as serialized [ConversationEvent][google.cloud.dialogflow.v2.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-<Conversation Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com
theDialogflow 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/<Project ID>/locations/<Location ID>/topics/<Topic ID>
.- Type
- message_format¶
Format of message.
- class MessageFormat(value)[source]¶
Bases:
proto.enums.Enum
Format of cloud pub/sub message.
- Values:
- MESSAGE_FORMAT_UNSPECIFIED (0):
If it is unspecified, PROTO will be used.
- PROTO (1):
Pub/Sub message will be serialized proto.
- JSON (2):
Pub/Sub message will be json.
- class google.cloud.dialogflow_v2.types.OriginalDetectIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the contents of the original request that was passed to the
[Streaming]DetectIntent
call.- source¶
The source of this request, e.g.,
google
,facebook
,slack
. It is set by Dialogflow-owned servers.- Type
- version¶
Optional. The version of the protocol used for this request. This field is AoG-specific.
- Type
- payload¶
Optional. This field is set to the value of the
QueryParameters.payload
field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload.In particular, for the Dialogflow Phone Gateway integration, this field has the form:
{ "telephony": { "caller_id": "+18558363987" } }
Note: The caller ID field (
caller_id
) will be redacted for Trial Edition agents and populated with the caller ID in E.164 format for Essentials Edition agents.
- class google.cloud.dialogflow_v2.types.OutputAudio(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the natural language speech audio to be played to the end user.
- config¶
Instructs the speech synthesizer how to generate the speech audio.
- class google.cloud.dialogflow_v2.types.OutputAudioConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Instructs the speech synthesizer on how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.
- audio_encoding¶
Required. Audio encoding of the synthesized audio content.
- sample_rate_hertz¶
The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice’s natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
- Type
- synthesize_speech_config¶
Configuration of how speech should be synthesized.
- class google.cloud.dialogflow_v2.types.OutputAudioEncoding(value)[source]¶
Bases:
proto.enums.Enum
Audio encoding of the output audio format in Text-To-Speech.
- Values:
- OUTPUT_AUDIO_ENCODING_UNSPECIFIED (0):
Not specified.
- OUTPUT_AUDIO_ENCODING_LINEAR_16 (1):
Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
- OUTPUT_AUDIO_ENCODING_MP3 (2):
MP3 audio at 32kbps.
- OUTPUT_AUDIO_ENCODING_MP3_64_KBPS (4):
MP3 audio at 64kbps.
- OUTPUT_AUDIO_ENCODING_OGG_OPUS (3):
Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.
- OUTPUT_AUDIO_ENCODING_MULAW (5):
8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
- OUTPUT_AUDIO_ENCODING_ALAW (6):
8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law.
- class google.cloud.dialogflow_v2.types.Participant(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a conversation participant (human agent, virtual agent, end-user).
- name¶
Optional. The unique identifier of this participant. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- role¶
Immutable. The role this participant plays in the conversation. This field must be set during participant creation and is then immutable.
- sip_recording_media_label¶
Optional. Label applied to streams representing this participant in SIPREC XML metadata and SDP. This is used to assign transcriptions from that media stream to this participant. This field can be updated.
- Type
- obfuscated_external_user_id¶
Optional. Obfuscated user id that should be associated with the created participant.
You can specify a user id as follows:
If you set this field in [CreateParticipantRequest][google.cloud.dialogflow.v2.CreateParticipantRequest.participant] or [UpdateParticipantRequest][google.cloud.dialogflow.v2.UpdateParticipantRequest.participant], Dialogflow adds the obfuscated user id with the participant.
If you set this field in [AnalyzeContent][google.cloud.dialogflow.v2.AnalyzeContentRequest.obfuscated_external_user_id] or [StreamingAnalyzeContent][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.obfuscated_external_user_id], Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2.Participant.obfuscated_external_user_id].
Dialogflow returns an error if you try to add a user id for a non-[END_USER][google.cloud.dialogflow.v2.Participant.Role.END_USER] participant.
Dialogflow uses this user id for billing and measurement purposes. For example, Dialogflow determines whether a user in one conversation returned in a later conversation.
Note:
Please never pass raw user ids to Dialogflow. Always obfuscate your user id first.
Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a hash function like SHA-512.
The length of the user id must be <= 256 characters.
- Type
- documents_metadata_filters¶
Optional. Key-value filters on the metadata of documents returned by article suggestion. If specified, article suggestion only returns suggested documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple values for a metadata key should be concatenated by comma. For example, filters to match all documents that have ‘US’ or ‘CA’ in their market metadata values and ‘agent’ in their user metadata values will be
documents_metadata_filters { key: "market" value: "US,CA" } documents_metadata_filters { key: "user" value: "agent" }
- class DocumentsMetadataFiltersEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class Role(value)[source]¶
Bases:
proto.enums.Enum
Enumeration of the roles a participant can play in a conversation.
- Values:
- ROLE_UNSPECIFIED (0):
Participant role not set.
- HUMAN_AGENT (1):
Participant is a human agent.
- AUTOMATED_AGENT (2):
Participant is an automated agent, such as a Dialogflow agent.
- END_USER (3):
Participant is an end user that has called or chatted with Dialogflow services.
- class google.cloud.dialogflow_v2.types.QueryInput(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the query input. It can contain either:
- An audio config which instructs the speech recognizer how to
process the speech audio.
A conversational query in the form of text.
An event that specifies which intent to trigger.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- audio_config¶
Instructs the speech recognizer how to process the speech audio.
This field is a member of oneof
input
.
- text¶
The natural language text to be processed. Text length must not exceed 256 character for virtual agent interactions.
This field is a member of oneof
input
.
- class google.cloud.dialogflow_v2.types.QueryParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the parameters of the conversational query.
- time_zone¶
The time zone of this conversational query from the time zone database, e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in agent settings is used.
- Type
- geo_location¶
The geo location of this conversational query.
- Type
google.type.latlng_pb2.LatLng
- contexts¶
The collection of contexts to be activated before this query is executed.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Context]
- reset_contexts¶
Specifies whether to delete all contexts in the current session before the new ones are activated.
- Type
- session_entity_types¶
Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session of this query.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SessionEntityType]
- payload¶
This field can be used to pass custom data to your webhook. Arbitrary JSON objects are supported. If supplied, the value is used to populate the
WebhookRequest.original_detect_intent_request.payload
field sent to your webhook.
- sentiment_analysis_request_config¶
Configures the type of sentiment analysis to perform. If not provided, sentiment analysis is not performed.
- webhook_headers¶
This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook along with the headers that have been configured through the Dialogflow web console. The headers defined within this field will overwrite the headers configured through the Dialogflow console if there is a conflict. Header names are case-insensitive. Google’s specified headers are not allowed. Including:
“Host”, “Content-Length”, “Connection”, “From”, “User-Agent”, “Accept-Encoding”, “If-Modified-Since”, “If-None-Match”, “X-Forwarded-For”, etc.
- platform¶
The platform of the virtual agent response messages.
If not empty, only emits messages from this platform in the response. Valid values are the enum names of [platform][google.cloud.dialogflow.v2.Intent.Message.platform].
- Type
- class WebhookHeadersEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.QueryResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the result of conversational query or event processing.
- query_text¶
The original conversational query text:
If natural language text was provided as input,
query_text
contains a copy of the input.If natural language speech audio was provided as input,
query_text
contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked.If automatic spell correction is enabled,
query_text
will contain the corrected user input.
- Type
- language_code¶
The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes.
- Type
- speech_recognition_confidence¶
The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set.
This field is not guaranteed to be accurate or set. In particular this field isn’t set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult.
- Type
- parameters¶
The collection of extracted parameters.
Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:
MapKey type: string
MapKey value: parameter name
MapValue type: If parameter’s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
MapValue value: If parameter’s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
- all_required_params_present¶
This field is set to:
false
if the matched intent has required parameters and not all of the required parameter values have been collected.true
if all required parameter values have been collected, or if the matched intent doesn’t contain any required parameters.
- Type
- cancels_slot_filling¶
Indicates whether the conversational query triggers a cancellation for slot filling. For more information, see the cancel slot filling documentation.
- Type
- fulfillment_text¶
The text to be pronounced to the user or shown on the screen. Note: This is a legacy field,
fulfillment_messages
should be preferred.- Type
- fulfillment_messages¶
The collection of rich messages to present to the user.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message]
- webhook_source¶
If the query was fulfilled by a webhook call, this field is set to the value of the
source
field returned in the webhook response.- Type
- webhook_payload¶
If the query was fulfilled by a webhook call, this field is set to the value of the
payload
field returned in the webhook response.
- output_contexts¶
The collection of output contexts. If applicable,
output_contexts.parameters
contains entries with name<parameter name>.original
containing the original parameter values before the query.- Type
MutableSequence[google.cloud.dialogflow_v2.types.Context]
- intent¶
The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to:
name
,display_name
,end_interaction
andis_fallback
.
- intent_detection_confidence¶
The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. If there are
multiple knowledge_answers
messages, this value is set to the greatestknowledgeAnswers.match_confidence
value in the list.- Type
- diagnostic_info¶
Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain:
webhook call latency
webhook errors
- sentiment_analysis_result¶
The sentiment analysis result, which depends on the
sentiment_analysis_request_config
specified in the request.
- class google.cloud.dialogflow_v2.types.ReloadDocumentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2.Documents.ReloadDocument].
- name¶
Required. The name of the document to reload. Format:
projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
- Type
- content_uri¶
Optional. The path of gcs source file for reloading document content. For now, only gcs uri is supported.
For documents stored in Google Cloud Storage, these URIs must have the form
gs://<bucket-name>/<object-name>
.This field is a member of oneof
source
.- Type
- import_gcs_custom_metadata¶
Optional. Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
- Type
- class google.cloud.dialogflow_v2.types.RestoreAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- parent¶
Required. The project that the agent to restore is associated with. Format:
projects/<Project ID>
.- Type
- agent_uri¶
The URI to a Google Cloud Storage file containing the agent to restore. Note: The URI must start with “gs://”.
Dialogflow performs a read operation for the Cloud Storage object on the caller’s behalf, so your request authentication must have read permissions for the object. For more information, see Dialogflow access control.
This field is a member of oneof
agent
.- Type
- class google.cloud.dialogflow_v2.types.SearchAgentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
- page_size¶
Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
- Type
- class google.cloud.dialogflow_v2.types.SearchAgentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
- agents¶
The list of agents. There will be a maximum number of items returned based on the page_size field in the request.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Agent]
- class google.cloud.dialogflow_v2.types.SearchKnowledgeAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a SearchKnowledge answer.
- answer_type¶
The type of the answer.
- answer_sources¶
All sources used to generate the answer.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SearchKnowledgeAnswer.AnswerSource]
- answer_record¶
The name of the answer record. Format:
projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>
- Type
- class AnswerSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The sources of the answers.
- metadata¶
Metadata associated with the article.
- class AnswerType(value)[source]¶
Bases:
proto.enums.Enum
The type of the answer.
- Values:
- ANSWER_TYPE_UNSPECIFIED (0):
The answer has a unspecified type.
- FAQ (1):
The answer is from FAQ documents.
- GENERATIVE (2):
The answer is from generative model.
- INTENT (3):
The answer is from intent matching.
- class google.cloud.dialogflow_v2.types.SearchKnowledgeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge].
- parent¶
Required. The parent resource contains the conversation profile Format: ‘projects/’ or
projects/<Project ID>/locations/<Location ID>
.- Type
- query¶
Required. The natural language text query for knowledge search.
- conversation_profile¶
Required. The conversation profile used to configure the search. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
.- Type
- session_id¶
Required. 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.- Type
- conversation¶
Optional. The conversation (between human agent and end user) where the search request is triggered. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
.- Type
- latest_message¶
Optional. The name of the latest conversation message when the request is triggered. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- query_source¶
Optional. The source of the query in the request.
- end_user_metadata¶
Optional. Information about the end-user to improve the relevance and accuracy of generative answers.
This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure.
Example:
{ "subscription plan": "Business Premium Plus", "devices owned": [ {"model": "Google Pixel 7"}, {"model": "Google Pixel Tablet"} ] }
- search_config¶
Optional. Configuration specific to search queries with data stores.
- class QuerySource(value)[source]¶
Bases:
proto.enums.Enum
The source of the query. We use QuerySource to distinguish queries directly entered by agents and suggested queries from [Participants.SuggestKnowledgeAssist][google.cloud.dialogflow.v2.Participants.SuggestKnowledgeAssist]. If SUGGESTED_QUERY source is specified, we will treat it as a continuation of a SuggestKnowledgeAssist call.
- Values:
- QUERY_SOURCE_UNSPECIFIED (0):
Unknown query source.
- AGENT_QUERY (1):
The query is from agents.
- SUGGESTED_QUERY (2):
The query is a suggested query from [Participants.SuggestKnowledgeAssist][google.cloud.dialogflow.v2.Participants.SuggestKnowledgeAssist].
- class SearchConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration specific to search queries with data stores.
- boost_specs¶
Optional. Boost specifications for data stores.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SearchKnowledgeRequest.SearchConfig.BoostSpecs]
- filter_specs¶
Optional. Filter specification for data store queries.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SearchKnowledgeRequest.SearchConfig.FilterSpecs]
- class BoostSpecs(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Boost specifications for data stores.
- data_stores¶
Optional. Data Stores where the boosting configuration is applied. The full names of the referenced data stores. Formats:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}
projects/{project}/locations/{location}/dataStores/{data_store}
- Type
MutableSequence[str]
- spec¶
Optional. A list of boosting specifications.
- class BoostSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Boost specification to boost certain documents. A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation is available at https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec
- condition_boost_specs¶
Optional. Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
- class ConditionBoostSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Boost applies to documents which match a condition.
- condition¶
Optional. An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. Examples:
To boost documents with document ID “doc_1” or “doc_2”, and color “Red” or “Blue”:
(id: ANY(“doc_1”, “doc_2”)) AND (color: ANY(“Red”,”Blue”))
- Type
- boost¶
Optional. Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0.
Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents.
Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely.
Setting to 0.0 means no boost applied. The boosting condition is ignored.
- Type
- boost_control_spec¶
Optional. Complex specification for custom ranking based on customer defined attribute value.
- class BoostControlSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.
- field_name¶
Optional. The name of the field whose value will be used to determine the boost amount.
- Type
- attribute_type¶
Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).
- interpolation_type¶
Optional. The interpolation type to be applied to connect the control points listed below.
- control_points¶
Optional. The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
- class AttributeType(value)[source]¶
Bases:
proto.enums.Enum
The attribute(or function) for which the custom ranking is to be applied.
- Values:
- ATTRIBUTE_TYPE_UNSPECIFIED (0):
Unspecified AttributeType.
- NUMERICAL (1):
The value of the numerical field will be used to dynamically update the boost amount. In this case, the attribute_value (the x value) of the control point will be the actual value of the numerical field for which the boost_amount is specified.
- FRESHNESS (2):
For the freshness use case the attribute value will be the duration between the current time and the date in the datetime field specified. The value must be formatted as an XSD
dayTimeDuration
value (a restricted subset of an ISO 8601 duration value). The pattern for this is:[nD][T[nH][nM][nS]]
. E.g.5D
,3DT12H30M
,T24H
.
- class ControlPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
- class InterpolationType(value)[source]¶
Bases:
proto.enums.Enum
The interpolation type to be applied. Default will be linear (Piecewise Linear).
- Values:
- INTERPOLATION_TYPE_UNSPECIFIED (0):
Interpolation type is unspecified. In this case, it defaults to Linear.
- LINEAR (1):
Piecewise linear interpolation will be applied.
- class FilterSpecs(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Filter specification for data store queries.
- data_stores¶
Optional. The data store where the filter configuration is applied. Full resource name of data store, such as projects/{project}/locations/{location}/collections/{collectionId}/ dataStores/{dataStoreId}.
- Type
MutableSequence[str]
- filter¶
Optional. The filter expression to be applied. Expression syntax is documented at https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax
- Type
- class google.cloud.dialogflow_v2.types.SearchKnowledgeResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Conversations.SearchKnowledge][google.cloud.dialogflow.v2.Conversations.SearchKnowledge].
- answers¶
Most relevant snippets extracted from articles in the given knowledge base, ordered by confidence.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SearchKnowledgeAnswer]
- class google.cloud.dialogflow_v2.types.Sentiment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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.
- class google.cloud.dialogflow_v2.types.SentimentAnalysisRequestConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configures the types of sentiment analysis to perform.
- class google.cloud.dialogflow_v2.types.SentimentAnalysisResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. For [Participants.StreamingDetectIntent][], it needs to be configured in [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2.ConversationProfile.human_agent_assistant_config]
- query_text_sentiment¶
The sentiment analysis result for
query_text
.
- class google.cloud.dialogflow_v2.types.SessionEntityType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A session represents a conversation between a Dialogflow agent and an end-user. You can create special entities, called session entities, during a session. Session entities can extend or replace custom entity types and only exist during the session that they were created for. All session data, including session entities, is stored by Dialogflow for 20 minutes.
For more information, see the session entity guide.
- name¶
Required. The unique identifier of this session entity type. Format:
projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
, orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we assume default ‘-’ user.<Entity Type Display Name>
must be the display name of an existing entity type in the same agent that will be overridden or supplemented.- Type
- entity_override_mode¶
Required. Indicates whether the additional data should override or supplement the custom entity type definition.
- entities¶
Required. The collection of entities associated with this session entity type.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.EntityType.Entity]
- class EntityOverrideMode(value)[source]¶
Bases:
proto.enums.Enum
The types of modifications for a session entity type.
- Values:
- ENTITY_OVERRIDE_MODE_UNSPECIFIED (0):
Not specified. This value should be never used.
- ENTITY_OVERRIDE_MODE_OVERRIDE (1):
The collection of session entities overrides the collection of entities in the corresponding custom entity type.
- ENTITY_OVERRIDE_MODE_SUPPLEMENT (2):
The collection of session entities extends the collection of entities in the corresponding custom entity type.
Note: Even in this override mode calls to
ListSessionEntityTypes
,GetSessionEntityType
,CreateSessionEntityType
andUpdateSessionEntityType
only return the additional entities added in this session entity type. If you want to get the supplemented list, please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the custom entity type and merge.
- class google.cloud.dialogflow_v2.types.SetAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent].
- agent¶
Required. The agent to update.
- update_mask¶
Optional. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.SetSuggestionFeatureConfigOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationProfile.SetSuggestionFeatureConfig][] operation.
- conversation_profile¶
The resource name of the conversation profile. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
- Type
- participant_role¶
Required. The participant role to add or update the suggestion feature config. Only HUMAN_AGENT or END_USER can be used.
- suggestion_feature_type¶
Required. The type of the suggestion feature to add or update.
- create_time¶
Timestamp whe the request was created. The time is measured on server side.
- class google.cloud.dialogflow_v2.types.SetSuggestionFeatureConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.SetSuggestionFeature][].
- conversation_profile¶
Required. The Conversation Profile to add or update the suggestion feature config. Format:
projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>
.- Type
- participant_role¶
Required. The participant role to add or update the suggestion feature config. Only HUMAN_AGENT or END_USER can be used.
- suggestion_feature_config¶
Required. The suggestion feature config to add or update.
- class google.cloud.dialogflow_v2.types.SmartReplyAnswer(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a smart reply answer.
- confidence¶
Smart reply confidence. The system’s confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
- Type
- class google.cloud.dialogflow_v2.types.SmartReplyMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The evaluation metrics for smart reply model.
- allowlist_coverage¶
Percentage of target participant messages in the evaluation dataset for which similar messages have appeared at least once in the allowlist. Should be [0, 1].
- Type
- top_n_metrics¶
Metrics of top n smart replies, sorted by [TopNMetric.n][].
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SmartReplyMetrics.TopNMetrics]
- class TopNMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Evaluation metrics when retrieving
n
smart replies with the model.- n¶
Number of retrieved smart replies. For example, when
n
is 3, this evaluation contains metrics for when Dialogflow retrieves 3 smart replies with the model.- Type
- class google.cloud.dialogflow_v2.types.SmartReplyModelMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for smart reply models.
- training_model_type¶
Optional. Type of the smart reply model. If not provided, model_type is used.
- class google.cloud.dialogflow_v2.types.SpeechContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Hints for the speech recognizer to help with recognition in a specific conversation state.
- phrases¶
Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.
This list can be used to:
improve accuracy for words and phrases you expect the user to say, e.g. typical commands for your Dialogflow agent
add additional words to the speech recognizer vocabulary
…
See the Cloud Speech documentation for usage limits.
- Type
MutableSequence[str]
- boost¶
Optional. Boost for this context compared to other contexts:
If the boost is positive, Dialogflow will increase the probability that the phrases in this context are recognized over similar sounding phrases.
If the boost is unspecified or non-positive, Dialogflow will not apply any boost.
Dialogflow recommends that you use boosts in the range (0, 20] and that you find a value that fits your use case with binary search.
- Type
- class google.cloud.dialogflow_v2.types.SpeechModelVariant(value)[source]¶
Bases:
proto.enums.Enum
Variant of the specified [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use.
See the Cloud Speech documentation for which models have different variants. For example, the “phone_call” model has both a standard and an enhanced variant. When you use an enhanced model, you will generally receive higher quality results than for a standard model.
- Values:
- SPEECH_MODEL_VARIANT_UNSPECIFIED (0):
No model variant specified. In this case Dialogflow defaults to USE_BEST_AVAILABLE.
- USE_BEST_AVAILABLE (1):
Use the best available variant of the [Speech model][InputAudioConfig.model] that the caller is eligible for.
Please see the Dialogflow docs for how to make your project eligible for enhanced models.
- USE_STANDARD (2):
Use standard model variant even if an enhanced model is available. See the Cloud Speech documentation for details about enhanced models.
- USE_ENHANCED (3):
Use an enhanced model variant:
If an enhanced variant does not exist for the given [model][google.cloud.dialogflow.v2.InputAudioConfig.model] and request language, Dialogflow falls back to the standard variant.
The Cloud Speech documentation describes which models have enhanced variants.
If the API caller isn’t eligible for enhanced models, Dialogflow returns an error. Please see the Dialogflow docs for how to make your project eligible.
- class google.cloud.dialogflow_v2.types.SpeechToTextConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile].
- speech_model_variant¶
The speech model used in speech to text.
SPEECH_MODEL_VARIANT_UNSPECIFIED
,USE_BEST_AVAILABLE
will be treated asUSE_ENHANCED
. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.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.
- model¶
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 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 for model selection.
- Type
- phrase_sets¶
List of names of Cloud Speech phrase sets that are used for transcription.
- Type
MutableSequence[str]
- audio_encoding¶
Audio encoding of the audio content to process.
- sample_rate_hertz¶
Sample rate (in Hertz) of the audio content sent in the query. Refer to Cloud Speech API documentation for more details.
- Type
- language_code¶
The language of the supplied audio. Dialogflow does not do translations. See Language Support 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.
- Type
- enable_word_info¶
If
true
, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn’t return any word-level information.- Type
- class google.cloud.dialogflow_v2.types.SpeechWordInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Information for a word recognized by the speech recognizer.
- start_offset¶
Time offset relative to the beginning of the audio that corresponds to the start of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.
- end_offset¶
Time offset relative to the beginning of the audio that corresponds to the end of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.
- confidence¶
The Speech confidence between 0.0 and 1.0 for this word. A higher number indicates an estimated greater likelihood that the recognized word is correct. The default of 0.0 is a sentinel value indicating that confidence was not set.
This field is not guaranteed to be fully stable over time for the same audio input. Users should also not rely on it to always be provided.
- Type
- class google.cloud.dialogflow_v2.types.SsmlVoiceGender(value)[source]¶
Bases:
proto.enums.Enum
Gender of the voice as described in SSML voice element.
- Values:
- SSML_VOICE_GENDER_UNSPECIFIED (0):
An unspecified gender, which means that the client doesn’t care which gender the selected voice will have.
- SSML_VOICE_GENDER_MALE (1):
A male voice.
- SSML_VOICE_GENDER_FEMALE (2):
A female voice.
- SSML_VOICE_GENDER_NEUTRAL (3):
A gender-neutral voice.
- class google.cloud.dialogflow_v2.types.StreamingAnalyzeContentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The top-level message sent by the client to the [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method.
Multiple request messages should be sent in order:
The first message must contain [participant][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.participant], [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] and optionally [query_params][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.query_params]. If you want to receive an audio response, it should also contain [reply_audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.reply_audio_config]. The message must not contain [input][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input].
If [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in the first message was set to [audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.audio_config], all subsequent messages must contain [input_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_audio] to continue with Speech recognition. However, note that:
Dialogflow will bill you for the audio so far.
Dialogflow discards all Speech recognition results in favor of the text input.
If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in the first message was set to [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.text_config], then the second message must contain only [input_text][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_text]. Moreover, you must not send more than two messages.
After you sent all input, you must half-close or abort the request stream.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- participant¶
Required. The name of the participant this text comes from. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- audio_config¶
Instructs the speech recognizer how to process the speech audio.
This field is a member of oneof
config
.
- reply_audio_config¶
Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling StreamingAnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.
- input_audio¶
The input audio content to be recognized. Must be sent if
audio_config
is set in the first message. The complete audio over all streaming messages must not exceed 1 minute.This field is a member of oneof
input
.- Type
- input_text¶
The UTF-8 encoded natural language text to be processed. Must be sent if
text_config
is set in the first message. Text length must not exceed 256 bytes for virtual agent interactions. Theinput_text
field can be only sent once, and would cancel the speech recognition if any ongoing.This field is a member of oneof
input
.- Type
- input_dtmf¶
The DTMF digits used to invoke intent and fill in parameter value. This input is ignored if the previous response indicated that DTMF input is not accepted.
This field is a member of oneof
input
.
- query_params¶
Parameters for a Dialogflow virtual-agent query.
- assist_query_params¶
Parameters for a human assist query.
- cx_parameters¶
Additional parameters to be put into Dialogflow CX session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null.
Note: this field should only be used if you are connecting to a Dialogflow CX agent.
- enable_extended_streaming¶
Optional. Enable full bidirectional streaming. You can keep streaming the audio until timeout, and there’s no need to half close the stream to get the response.
Restrictions:
Timeout: 3 mins.
Audio Encoding: only supports [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16] and [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
Lifecycle: conversation should be in
Assist Stage
, go to [Conversation.CreateConversation][] for more information.
InvalidArgument Error will be returned if the one of restriction checks failed.
You can find more details in https://cloud.google.com/agent-assist/docs/extended-streaming
- Type
- enable_partial_automated_agent_reply¶
Enable partial virtual agent responses. If this flag is not enabled, response stream still contains only one final response even if some
Fulfillment
s in Dialogflow virtual agent have been configured to return partial responses.- Type
- class google.cloud.dialogflow_v2.types.StreamingAnalyzeContentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The top-level message returned from the
StreamingAnalyzeContent
method.Multiple response messages can be returned in order:
If the input was set to streaming audio, the first one or more messages contain
recognition_result
. Eachrecognition_result
represents a more complete transcript of what the user said. The lastrecognition_result
hasis_final
set totrue
.In virtual agent stage: if
enable_partial_automated_agent_reply
is true, the following N (currently 1 <= N <= 4) messages containautomated_agent_reply
and optionallyreply_audio
returned by the virtual agent. The first (N-1)automated_agent_reply
s will haveautomated_agent_reply_type
set toPARTIAL
. The lastautomated_agent_reply
hasautomated_agent_reply_type
set toFINAL
. Ifenable_partial_automated_agent_reply
is not enabled, response stream only contains the final reply.In human assist stage: the following N (N >= 1) messages contain
human_agent_suggestion_results
,end_user_suggestion_results
ormessage
.
- recognition_result¶
The result of speech recognition.
- reply_text¶
The output text content. This field is set if an automated agent responded with a text for the user.
- Type
- reply_audio¶
The audio data bytes encoded as specified in the request. This field is set if:
The
reply_audio_config
field is specified in the request.The automated agent, which this output comes from, responded with audio. In such case, the
reply_audio.config
field contains settings used to synthesize the speech.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
- automated_agent_reply¶
Only set if a Dialogflow automated agent has responded. Note that: [AutomatedAgentReply.detect_intent_response.output_audio][] and [AutomatedAgentReply.detect_intent_response.output_audio_config][] are always empty, use [reply_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.reply_audio] instead.
- message¶
Message analyzed by CCAI.
- human_agent_suggestion_results¶
The suggestions for most recent human agent. The order is the same as [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config].
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SuggestionResult]
- end_user_suggestion_results¶
The suggestions for end user. The order is the same as [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config].
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SuggestionResult]
- dtmf_parameters¶
Indicates the parameters of DTMF.
- debugging_info¶
Debugging info that would get populated when
StreamingAnalyzeContentRequest.enable_debugging_info
is set to true.
- class google.cloud.dialogflow_v2.types.StreamingDetectIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The top-level message sent by the client to the [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] method.
Multiple request messages should be sent in order:
The first message must contain [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session], [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. If the client wants to receive an audio response, it should also contain [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]. The message must not contain [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio].
If [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was set to [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], all subsequent messages must contain [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] to continue with Speech recognition. If you decide to rather detect an intent from text input after you already started Speech recognition, please send a message with [query_input.text][google.cloud.dialogflow.v2.QueryInput.text].
However, note that:
Dialogflow will bill you for the audio duration so far.
Dialogflow discards all Speech recognition results in favor of the input text.
Dialogflow will use the language code from the first message.
After you sent all input, you must half-close or abort the request stream.
- session¶
Required. The name of the session the query is sent to. Format of the session name:
projects/<Project ID>/agent/sessions/<Session ID>
, orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>
. IfEnvironment ID
is not specified, we assume default ‘draft’ environment. IfUser ID
is not specified, we are using “-”. It’s up to the API caller to choose an appropriateSession ID
andUser Id
. They can be a random number or some type of user and session identifiers (preferably hashed). The length of theSession ID
andUser ID
must not exceed 36 characters.For more information, see the API interactions guide.
Note: Always use agent versions for production traffic. See Versions and environments.
- Type
- query_params¶
The parameters of this query.
- query_input¶
Required. The input specification. It can be set to:
- an audio config which instructs the speech
recognizer how to process the speech audio,
- a conversational query in the form of text,
or
- an event that specifies which intent to
trigger.
- single_utterance¶
Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead. If
false
(default), recognition does not cease until the client closes the stream. Iftrue
, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio’s voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. This setting is ignored whenquery_input
is a piece of text or an event.- Type
- output_audio_config¶
Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated.
- output_audio_config_mask¶
Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this request-level config should override speech synthesizer settings defined at agent-level.
If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level config in its entirety.
- input_audio¶
The input audio content to be recognized. Must be sent if
query_input
was set to a streaming input audio config. The complete audio over all streaming messages must not exceed 1 minute.- Type
- class google.cloud.dialogflow_v2.types.StreamingDetectIntentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The top-level message returned from the
StreamingDetectIntent
method.Multiple response messages can be returned in order:
If the
StreamingDetectIntentRequest.input_audio
field was set, therecognition_result
field is populated for one or more messages. See the [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] message for details about the result message sequence.The next message contains
response_id
,query_result
and optionallywebhook_status
if a WebHook was called.
- response_id¶
The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
- Type
- recognition_result¶
The result of speech recognition.
- query_result¶
The result of the conversational query or event processing.
- webhook_status¶
Specifies the status of the webhook request.
- Type
google.rpc.status_pb2.Status
- output_audio¶
The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the
query_result.fulfillment_messages
field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty.In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
- Type
- output_audio_config¶
The config used by the speech synthesizer to generate the output audio.
- debugging_info¶
Debugging info that would get populated when
StreamingDetectIntentRequest.enable_debugging_info
is set to true.
- class google.cloud.dialogflow_v2.types.StreamingRecognitionResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Contains a speech recognition result corresponding to a portion of the audio that is currently being processed or an indication that this is the end of the single requested utterance.
While end-user audio is being processed, Dialogflow sends a series of results. Each result may contain a
transcript
value. A transcript represents a portion of the utterance. While the recognizer is processing audio, transcript values may be interim values or finalized values. Once a transcript is finalized, theis_final
value is set to true and processing continues for the next transcript.If
StreamingDetectIntentRequest.query_input.audio_config.single_utterance
was true, and the recognizer has completed processing audio, themessage_type
value is set to `END_OF_SINGLE_UTTERANCE and the following (last) result contains the last finalized transcript.The complete end-user utterance is determined by concatenating the finalized transcript values received for the series of results.
In the following example, single utterance is enabled. In the case where single utterance is not enabled, result 7 would not occur.
Num | transcript | message_type | is_final --- | ----------------------- | ----------------------- | -------- 1 | "tube" | TRANSCRIPT | false 2 | "to be a" | TRANSCRIPT | false 3 | "to be" | TRANSCRIPT | false 4 | "to be or not to be" | TRANSCRIPT | true 5 | "that's" | TRANSCRIPT | false 6 | "that is | TRANSCRIPT | false 7 | unset | END_OF_SINGLE_UTTERANCE | unset 8 | " that is the question" | TRANSCRIPT | true
Concatenating the finalized transcripts with
is_final
set to true, the complete utterance becomes “to be or not to be that is the question”.- message_type¶
Type of the result message.
- transcript¶
Transcript text representing the words that the user spoke. Populated if and only if
message_type
=TRANSCRIPT
.- Type
- is_final¶
If
false
, theStreamingRecognitionResult
represents an interim result that may change. Iftrue
, the recognizer will not return any further hypotheses about this piece of the audio. May only be populated formessage_type
=TRANSCRIPT
.- Type
- confidence¶
The Speech confidence between 0.0 and 1.0 for the current portion of audio. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set.
This field is typically only provided if
is_final
is true and you should not rely on it being accurate or even set.- Type
- speech_word_info¶
Word-specific information for the words recognized by Speech in [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if
message_type
=TRANSCRIPT
and [InputAudioConfig.enable_word_info] is set.- Type
MutableSequence[google.cloud.dialogflow_v2.types.SpeechWordInfo]
- speech_end_offset¶
Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for
message_type
=TRANSCRIPT
.
- class MessageType(value)[source]¶
Bases:
proto.enums.Enum
Type of the response message.
- Values:
- MESSAGE_TYPE_UNSPECIFIED (0):
Not specified. Should never be used.
- TRANSCRIPT (1):
Message contains a (possibly partial) transcript.
- END_OF_SINGLE_UTTERANCE (2):
This event indicates that the server has detected the end of the user’s speech utterance and expects no additional inputs. Therefore, the server will not process additional audio (although it may subsequently return additional results). The client should stop sending additional audio data, half-close the gRPC connection, and wait for any additional results until the server closes the gRPC connection. This message is only sent if
single_utterance
was set totrue
, and is not used otherwise.
- class google.cloud.dialogflow_v2.types.SuggestArticlesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
- parent¶
Required. The name of the participant to fetch suggestion for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- latest_message¶
Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Optional. Max number of messages prior to and including [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.
- Type
- assist_query_params¶
Parameters for a human assist query.
- class google.cloud.dialogflow_v2.types.SuggestArticlesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
- article_answers¶
Articles ordered by score in descending order.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.ArticleAnswer]
- latest_message¶
The name of the latest conversation message used to compile suggestion for.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Number of messages prior to and including [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the suggestion. It may be smaller than the [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there aren’t that many messages in the conversation.
- Type
- class google.cloud.dialogflow_v2.types.SuggestConversationSummaryRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2.Conversations.SuggestConversationSummary].
- conversation¶
Required. The conversation to fetch suggestion for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>
.- Type
- latest_message¶
Optional. The name of the latest conversation message used as context for compiling suggestion. If empty, the latest message of the conversation will be used.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Optional. 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.
- Type
- assist_query_params¶
Optional. Parameters for a human assist query. Only used for POC/demo purpose.
- class google.cloud.dialogflow_v2.types.SuggestConversationSummaryResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2.Conversations.SuggestConversationSummary].
- summary¶
Generated summary.
- latest_message¶
The name of the latest conversation message used as context for compiling suggestion.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Number of messages prior to and including [last_conversation_message][] used to compile the suggestion. It may be smaller than the [SuggestSummaryRequest.context_size][] field in the request if there weren’t that many messages in the conversation.
- Type
- class Summary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Generated summary for a conversation.
- text_sections¶
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.
- answer_record¶
The name of the answer record. Format:
“projects/<Project ID>/answerRecords/<Answer Record ID>”.
- Type
- baseline_model_version¶
The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.
- Type
- class TextSectionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.SuggestFaqAnswersRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
- parent¶
Required. The name of the participant to fetch suggestion for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- latest_message¶
Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.
- Type
- assist_query_params¶
Parameters for a human assist query.
- class google.cloud.dialogflow_v2.types.SuggestFaqAnswersResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
- faq_answers¶
Answers extracted from FAQ documents.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.FaqAnswer]
- latest_message¶
The name of the latest conversation message used to compile suggestion for.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Number of messages prior to and including [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the suggestion. It may be smaller than the [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there aren’t that many messages in the conversation.
- Type
- class google.cloud.dialogflow_v2.types.SuggestKnowledgeAssistRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.SuggestKnowledgeAssist][google.cloud.dialogflow.v2.Participants.SuggestKnowledgeAssist].
- parent¶
Required. The name of the participant to fetch suggestions for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- latest_message¶
Optional. The name of the latest conversation message to compile suggestions for. If empty, it will be the latest message of the conversation. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Optional. Max number of messages prior to and including [latest_message][google.cloud.dialogflow.v2.SuggestKnowledgeAssistRequest.latest_message] to use as context when compiling the suggestion. The context size is by default 100 and at most 100.
- Type
- class google.cloud.dialogflow_v2.types.SuggestKnowledgeAssistResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Participants.SuggestKnowledgeAssist][google.cloud.dialogflow.v2.Participants.SuggestKnowledgeAssist].
- knowledge_assist_answer¶
Output only. Knowledge Assist suggestion.
- latest_message¶
The name of the latest conversation message used to compile suggestion for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Number of messages prior to and including [latest_message][google.cloud.dialogflow.v2.SuggestKnowledgeAssistResponse.latest_message] to compile the suggestion. It may be smaller than the [SuggestKnowledgeAssistRequest.context_size][google.cloud.dialogflow.v2.SuggestKnowledgeAssistRequest.context_size] field in the request if there are fewer messages in the conversation.
- Type
- class google.cloud.dialogflow_v2.types.SuggestSmartRepliesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies].
- parent¶
Required. The name of the participant to fetch suggestion for. Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.- Type
- current_text_input¶
The current natural language text segment to compile suggestion for. This provides a way for user to get follow up smart reply suggestion after a smart reply selection, without sending a text message.
- latest_message¶
The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- class google.cloud.dialogflow_v2.types.SuggestSmartRepliesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2.Participants.SuggestSmartReplies].
- smart_reply_answers¶
Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SmartReplyAnswer]
- latest_message¶
The name of the latest conversation message used to compile suggestion for.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>
.- Type
- context_size¶
Number of messages prior to and including [latest_message][google.cloud.dialogflow.v2.SuggestSmartRepliesResponse.latest_message] to compile the suggestion. It may be smaller than the [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2.SuggestSmartRepliesRequest.context_size] field in the request if there aren’t that many messages in the conversation.
- Type
- class google.cloud.dialogflow_v2.types.SuggestionFeature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
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 thefeatures
list.- type_¶
Type of Human Agent Assistant API feature to request.
- class Type(value)[source]¶
Bases:
proto.enums.Enum
Defines the type of Human Agent Assistant feature.
- Values:
- TYPE_UNSPECIFIED (0):
Unspecified feature type.
- ARTICLE_SUGGESTION (1):
Run article suggestion model for chat.
- FAQ (2):
Run FAQ model for chat.
- SMART_REPLY (3):
Run smart reply model for chat.
- KNOWLEDGE_SEARCH (14):
Run knowledge search with text input from agent or text generated query.
- KNOWLEDGE_ASSIST (15):
Run knowledge assist with automatic query generation.
- class google.cloud.dialogflow_v2.types.SuggestionInput(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the selection of a suggestion.
- class google.cloud.dialogflow_v2.types.SuggestionResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
One response of different type of suggestion response which is used in the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent].
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- error¶
Error status if the request failed.
This field is a member of oneof
suggestion_response
.- Type
google.rpc.status_pb2.Status
- suggest_articles_response¶
SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
This field is a member of oneof
suggestion_response
.
- suggest_knowledge_assist_response¶
SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST.
This field is a member of oneof
suggestion_response
.
- suggest_faq_answers_response¶
SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
This field is a member of oneof
suggestion_response
.
- class google.cloud.dialogflow_v2.types.SummarizationContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Summarization context that customer can configure.
- summarization_sections¶
Optional. List of sections. Note it contains both predefined section sand customer defined sections.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SummarizationSection]
- few_shot_examples¶
Optional. List of few shot examples.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.FewShotExample]
- version¶
Optional. Version of the feature. If not set, default to latest version. Current candidates are [“1.0”].
- Type
- class google.cloud.dialogflow_v2.types.SummarizationSection(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the section of summarization.
- definition¶
Optional. Definition of the section, for example, “what the customer needs help with or has question about.”.
- Type
- type_¶
Optional. Type of the summarization section.
- class Type(value)[source]¶
Bases:
proto.enums.Enum
Type enum of the summarization sections.
- Values:
- TYPE_UNSPECIFIED (0):
Undefined section type, does not return anything.
- SITUATION (1):
What the customer needs help with or has question about. Section name: “situation”.
- ACTION (2):
What the agent does to help the customer. Section name: “action”.
- RESOLUTION (3):
Result of the customer service. A single word describing the result of the conversation. Section name: “resolution”.
- REASON_FOR_CANCELLATION (4):
Reason for cancellation if the customer requests for a cancellation. “N/A” otherwise. Section name: “reason_for_cancellation”.
- CUSTOMER_SATISFACTION (5):
“Unsatisfied” or “Satisfied” depending on the customer’s feelings at the end of the conversation. Section name: “customer_satisfaction”.
- ENTITIES (6):
Key entities extracted from the conversation, such as ticket number, order number, dollar amount, etc. Section names are prefixed by “entities/”.
- CUSTOMER_DEFINED (7):
Customer defined sections.
- class google.cloud.dialogflow_v2.types.SummarizationSectionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
List of summarization sections.
- summarization_sections¶
Optional. Summarization sections.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SummarizationSection]
- class google.cloud.dialogflow_v2.types.SummarySuggestion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Suggested summary of the conversation.
- summary_sections¶
Required. All the parts of generated summary.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.SummarySuggestion.SummarySection]
- class google.cloud.dialogflow_v2.types.SynthesizeSpeechConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration of how speech should be synthesized.
- speaking_rate¶
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.
- Type
- pitch¶
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.
- Type
- volume_gain_db¶
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.
- Type
- effects_profile_id¶
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.
- Type
MutableSequence[str]
- voice¶
Optional. The desired voice of the synthesized audio.
- class google.cloud.dialogflow_v2.types.TelephonyDtmf(value)[source]¶
Bases:
proto.enums.Enum
DTMF digit in Telephony Gateway.
- Values:
- TELEPHONY_DTMF_UNSPECIFIED (0):
Not specified. This value may be used to indicate an absent digit.
- DTMF_ONE (1):
Number: ‘1’.
- DTMF_TWO (2):
Number: ‘2’.
- DTMF_THREE (3):
Number: ‘3’.
- DTMF_FOUR (4):
Number: ‘4’.
- DTMF_FIVE (5):
Number: ‘5’.
- DTMF_SIX (6):
Number: ‘6’.
- DTMF_SEVEN (7):
Number: ‘7’.
- DTMF_EIGHT (8):
Number: ‘8’.
- DTMF_NINE (9):
Number: ‘9’.
- DTMF_ZERO (10):
Number: ‘0’.
- DTMF_A (11):
Letter: ‘A’.
- DTMF_B (12):
Letter: ‘B’.
- DTMF_C (13):
Letter: ‘C’.
- DTMF_D (14):
Letter: ‘D’.
- DTMF_STAR (15):
Asterisk/star: ‘*’.
- DTMF_POUND (16):
Pound/diamond/hash/square/gate/octothorpe: ‘#’.
- class google.cloud.dialogflow_v2.types.TelephonyDtmfEvents(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A wrapper of repeated TelephonyDtmf digits.
- dtmf_events¶
A sequence of TelephonyDtmf digits.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.TelephonyDtmf]
- class google.cloud.dialogflow_v2.types.TextInput(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Auxiliary proto messages.
Represents the natural language text to be processed.
- text¶
Required. The UTF-8 encoded natural language text to be processed. Text length must not exceed 256 characters for virtual agent interactions.
- Type
- language_code¶
Required. The language of this conversational query. See Language Support 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.
- Type
- class google.cloud.dialogflow_v2.types.TextToSpeechSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Instructs the speech synthesizer on how to generate the output audio content.
- enable_text_to_speech¶
Optional. Indicates whether text to speech is enabled. Even when this field is false, other settings in this proto are still retained.
- Type
- output_audio_encoding¶
Required. Audio encoding of the synthesized audio content.
- sample_rate_hertz¶
Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice’s natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
- Type
- synthesize_speech_configs¶
Optional. Configuration of how speech should be synthesized, mapping from language (https://cloud.google.com/dialogflow/docs/reference/language) to SynthesizeSpeechConfig.
- Type
MutableMapping[str, google.cloud.dialogflow_v2.types.SynthesizeSpeechConfig]
- class SynthesizeSpeechConfigsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.dialogflow_v2.types.TrainAgentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
- class google.cloud.dialogflow_v2.types.TriggerEvent(value)[source]¶
Bases:
proto.enums.Enum
The event that triggers the generator and LLM execution.
- Values:
- TRIGGER_EVENT_UNSPECIFIED (0):
Default value for TriggerEvent.
- END_OF_UTTERANCE (1):
Triggers when each chat message or voice utterance ends.
- MANUAL_CALL (2):
Triggers on the conversation manually by API calls, such as Conversations.GenerateStatelessSuggestion and Conversations.GenerateSuggestions.
- class google.cloud.dialogflow_v2.types.UndeployConversationModelOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for a [ConversationModels.UndeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModel] operation.
- conversation_model¶
The resource name of the conversation model. Format:
projects/<Project ID>/conversationModels/<Conversation Model Id>
- Type
- create_time¶
Timestamp when the request to undeploy conversation model was submitted. The time is measured on server side.
- class google.cloud.dialogflow_v2.types.UndeployConversationModelRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationModels.UndeployConversationModel][google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModel]
- class google.cloud.dialogflow_v2.types.UpdateAnswerRecordRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord].
- answer_record¶
Required. Answer record to update.
- update_mask¶
Required. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.UpdateContextRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext].
- context¶
Required. The context to update.
- update_mask¶
Optional. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.UpdateConversationProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile].
- conversation_profile¶
Required. The conversation profile to update.
- update_mask¶
Required. The mask to control which fields to update.
- class google.cloud.dialogflow_v2.types.UpdateDocumentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [Documents.UpdateDocument][google.cloud.dialogflow.v2.Documents.UpdateDocument].
- document¶
Required. The document to update.
- update_mask¶
Optional. Not specified means
update all
. Currently, onlydisplay_name
can be updated, an InvalidArgument will be returned for attempting to update other fields.
- class google.cloud.dialogflow_v2.types.UpdateEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType].
- entity_type¶
Required. The entity type to update.
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- update_mask¶
Optional. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.UpdateEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.v2.Environments.UpdateEnvironment].
- environment¶
Required. The environment to update.
- update_mask¶
Required. The mask to control which fields get updated.
- allow_load_to_draft_and_discard_changes¶
Optional. This field is used to prevent accidental overwrite of the default environment, which is an operation that cannot be undone. To confirm that the caller desires this overwrite, this field must be explicitly set to true when updating the default environment (environment ID =
-
).- Type
- class google.cloud.dialogflow_v2.types.UpdateFulfillmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Fulfillments.UpdateFulfillment][google.cloud.dialogflow.v2.Fulfillments.UpdateFulfillment].
- fulfillment¶
Required. The fulfillment to update.
- update_mask¶
Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.
- class google.cloud.dialogflow_v2.types.UpdateGeneratorRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request of UpdateGenerator.
- generator¶
Required. The generator to update. The name field of generator is to identify the generator to update.
- update_mask¶
Optional. The list of fields to update.
- class google.cloud.dialogflow_v2.types.UpdateIntentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent].
- intent¶
Required. The intent to update.
- language_code¶
Optional. The language used to access language-specific data. If not specified, the agent’s default language is used. For more information, see Multilingual intent and entity data.
- Type
- update_mask¶
Optional. The mask to control which fields get updated.
- intent_view¶
Optional. The resource view to apply to the returned intent.
- class google.cloud.dialogflow_v2.types.UpdateKnowledgeBaseRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBase].
- knowledge_base¶
Required. The knowledge base to update.
- update_mask¶
Optional. Not specified means
update all
. Currently, onlydisplay_name
can be updated, an InvalidArgument will be returned for attempting to update other fields.
- class google.cloud.dialogflow_v2.types.UpdateParticipantRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant].
- participant¶
Required. The participant to update.
- update_mask¶
Required. The mask to specify which fields to update.
- class google.cloud.dialogflow_v2.types.UpdateSessionEntityTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType].
- session_entity_type¶
Required. The session entity type to update.
- update_mask¶
Optional. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.UpdateVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for [Versions.UpdateVersion][google.cloud.dialogflow.v2.Versions.UpdateVersion].
- version¶
Required. The version to update. Supported formats:
projects/<Project ID>/agent/versions/<Version ID>
projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
- update_mask¶
Required. The mask to control which fields get updated.
- class google.cloud.dialogflow_v2.types.ValidationError(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents a single validation error.
- severity¶
The severity of the error.
- entries¶
The names of the entries that the error is associated with. Format:
projects/<Project ID>/agent
, if the error is associated with the entire agent.projects/<Project ID>/agent/intents/<Intent ID>
, if the error is associated with certain intents.projects/<Project ID>/agent/intents/<Intent Id>/trainingPhrases/<Training Phrase ID>
, if the error is associated with certain intent training phrases.projects/<Project ID>/agent/intents/<Intent Id>/parameters/<Parameter ID>
, if the error is associated with certain intent parameters.projects/<Project ID>/agent/entities/<Entity ID>
, if the error is associated with certain entities.
- Type
MutableSequence[str]
- class Severity(value)[source]¶
Bases:
proto.enums.Enum
Represents a level of severity.
- Values:
- SEVERITY_UNSPECIFIED (0):
Not specified. This value should never be used.
- INFO (1):
The agent doesn’t follow Dialogflow best practices.
- WARNING (2):
The agent may not behave as expected.
- ERROR (3):
The agent may experience partial failures.
- CRITICAL (4):
The agent may completely fail.
- class google.cloud.dialogflow_v2.types.ValidationResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the output of agent validation.
- validation_errors¶
Contains all validation errors.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.ValidationError]
- class google.cloud.dialogflow_v2.types.Version(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
You can create multiple versions of your agent and publish them to separate environments.
When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent.
When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for:
testing
development
production
etc.
For more information, see the versions and environments guide.
- name¶
Output only. The unique identifier of this agent version. Supported formats:
projects/<Project ID>/agent/versions/<Version ID>
projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
- Type
- version_number¶
Output only. The sequential number of this version. This field is read-only which means it cannot be set by create and update methods.
- Type
- create_time¶
Output only. The creation time of this version. This field is read-only, i.e., it cannot be set by create and update methods.
- status¶
Output only. The status of this version. This field is read-only and cannot be set by create and update methods.
- class VersionStatus(value)[source]¶
Bases:
proto.enums.Enum
The status of a version.
- Values:
- VERSION_STATUS_UNSPECIFIED (0):
Not specified. This value is not used.
- IN_PROGRESS (1):
Version is not ready to serve (e.g. training is in progress).
- READY (2):
Version is ready to serve.
- FAILED (3):
Version training failed.
- class google.cloud.dialogflow_v2.types.VoiceSelectionParams(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Description of which voice to use for speech synthesis.
- name¶
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][google.cloud.dialogflow.v2.VoiceSelectionParams.ssml_gender].
- Type
- ssml_gender¶
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][google.cloud.dialogflow.v2.VoiceSelectionParams.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.
- class google.cloud.dialogflow_v2.types.WebhookRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request message for a webhook call.
- session¶
The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Format:
projects/<Project ID>/agent/sessions/<Session ID>
, orprojects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>
.- Type
- response_id¶
The unique identifier of the response. Contains the same value as
[Streaming]DetectIntentResponse.response_id
.- Type
- query_result¶
The result of the conversational query or event processing. Contains the same value as
[Streaming]DetectIntentResponse.query_result
.
- original_detect_intent_request¶
Optional. The contents of the original request that was passed to
[Streaming]DetectIntent
call.
- class google.cloud.dialogflow_v2.types.WebhookResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The response message for a webhook call.
This response is validated by the Dialogflow server. If validation fails, an error will be returned in the [QueryResult.diagnostic_info][google.cloud.dialogflow.v2.QueryResult.diagnostic_info] field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error:
Use
""
for empty stringsUse
{}
ornull
for empty objectsUse
[]
ornull
for empty arrays
For more information, see the Protocol Buffers Language Guide.
- fulfillment_text¶
Optional. The text response message intended for the end-user. It is recommended to use
fulfillment_messages.text.text[0]
instead. When provided, Dialogflow uses this field to populate [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.- Type
- fulfillment_messages¶
Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Intent.Message]
- source¶
Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
- Type
- payload¶
Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. This field is also used by the Google Assistant integration for rich response messages. See the format definition at Google Assistant Dialogflow webhook format
- output_contexts¶
Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
- Type
MutableSequence[google.cloud.dialogflow_v2.types.Context]
- followup_event_input¶
Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the
fulfillment_text
,fulfillment_messages
, andpayload
fields.
- session_entity_types¶
Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using
detectIntent
,streamingDetectIntent
or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.- Type
MutableSequence[google.cloud.dialogflow_v2.types.SessionEntityType]