Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: allowed custom to specify webhook headers through query paramet…
Browse files Browse the repository at this point in the history
…ers docs: suggested to always use version for production traffic when calling DetectIntent (#44)

PiperOrigin-RevId: 346434847

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Dec 8 16:24:31 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: e4d01555afeb93d2f3b467056ea884b092567d1b
Source-Link: googleapis/googleapis@e4d0155
  • Loading branch information
yoshi-automation authored Dec 21, 2020
1 parent 6d87d1b commit 0ffd0b7
Show file tree
Hide file tree
Showing 7 changed files with 844 additions and 737 deletions.
38 changes: 19 additions & 19 deletions protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,25 @@ message ResponseMessage {
bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Specifies an audio clip to be played by the client as part of the response.
message PlayAudio {
// Required. URI of the audio clip. Dialogflow does not impose any validation on this
// value. It is specific to the client that reads it.
string audio_uri = 1 [(google.api.field_behavior) = REQUIRED];

// Output only. Whether the playback of this message can be interrupted by the end
// user's speech and the client can then starts the next Dialogflow
// request.
bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Indicates that interaction with the Dialogflow agent has ended.
// This message is generated by Dialogflow only and not supposed to be
// defined by the user.
message EndInteraction {

}

// Represents an audio message that is composed of both segments
// synthesized from the Dialogflow agent prompts and ones hosted externally
// at the specified URIs.
Expand Down Expand Up @@ -144,25 +163,6 @@ message ResponseMessage {
repeated Segment segments = 1;
}

// Indicates that interaction with the Dialogflow agent has ended.
// This message is generated by Dialogflow only and not supposed to be
// defined by the user.
message EndInteraction {

}

// Specifies an audio clip to be played by the client as part of the response.
message PlayAudio {
// Required. URI of the audio clip. Dialogflow does not impose any validation on this
// value. It is specific to the client that reads it.
string audio_uri = 1 [(google.api.field_behavior) = REQUIRED];

// Output only. Whether the playback of this message can be interrupted by the end
// user's speech and the client can then starts the next Dialogflow
// request.
bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Required. The rich response message.
oneof message {
// Returns a text response.
Expand Down
26 changes: 26 additions & 0 deletions protos/google/cloud/dialogflow/cx/v3beta1/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ service Sessions {
// as a result. This method is not idempotent, because it may cause session
// entity types to be updated, which in turn might affect results of future
// queries.
//
// Note: Always use agent versions for production traffic.
// See [Versions and
// environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) {
option (google.api.http) = {
post: "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent"
Expand All @@ -71,6 +75,10 @@ service Sessions {
// Processes a natural language query in audio format in a streaming fashion
// and returns structured, actionable data as a result. This method is only
// available via the gRPC API (not REST).
//
// Note: Always use agent versions for production traffic.
// See [Versions and
// environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
}

Expand Down Expand Up @@ -116,6 +124,10 @@ message DetectIntentRequest {
//
// For more information, see the [sessions
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
//
// Note: Always use agent versions for production traffic.
// See [Versions and
// environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
string session = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -201,6 +213,10 @@ message StreamingDetectIntentRequest {
//
// For more information, see the [sessions
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
//
// Note: Always use agent versions for production traffic.
// See [Versions and
// environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
string session = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Session"
}];
Expand Down Expand Up @@ -374,6 +390,16 @@ message QueryParameters {
// Configures whether sentiment analysis should be performed. If not
// provided, sentiment analysis is not performed.
bool analyze_query_text_sentiment = 8;

// 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 Dialogflow web console. The headers defined
// within this field will overwrite the headers configured through 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.
map<string, string> webhook_headers = 10;
}

// Represents the query input. It can contain one of:
Expand Down
Loading

0 comments on commit 0ffd0b7

Please sign in to comment.