Skip to content

Commit

Permalink
feat: extended StreamingListCallCompanionEvents timeout to 600 seconds
Browse files Browse the repository at this point in the history
feat: added debug info for StreamingDetectIntent
feat: added GenerateStatelessSummary method

PiperOrigin-RevId: 530102437

Source-Link: googleapis/googleapis@cea4ed9

Source-Link: googleapis/googleapis-gen@624b26c
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlhbG9nZmxvdy5WMi8uT3dsQm90LnlhbWwiLCJoIjoiNjI0YjI2YzA5OWZiMmM2MDE3NDFkNzc0MDE1NTAyYmVmOTllMWJlYSJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed May 7, 2023
1 parent 00b27cd commit ddd7f08
Show file tree
Hide file tree
Showing 33 changed files with 3,189 additions and 510 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START dialogflow_v2_generated_Conversations_GenerateStatelessSummary_async]
using Google.Cloud.Dialogflow.V2;
using System.Threading.Tasks;

public sealed partial class GeneratedConversationsClientSnippets
{
/// <summary>Snippet for GenerateStatelessSummaryAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GenerateStatelessSummaryRequestObjectAsync()
{
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
GenerateStatelessSummaryRequest request = new GenerateStatelessSummaryRequest
{
StatelessConversation = new GenerateStatelessSummaryRequest.Types.MinimalConversation(),
ConversationProfile = new ConversationProfile(),
LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
MaxContextSize = 0,
};
// Make the request
GenerateStatelessSummaryResponse response = await conversationsClient.GenerateStatelessSummaryAsync(request);
}
}
// [END dialogflow_v2_generated_Conversations_GenerateStatelessSummary_async]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace GoogleCSharpSnippets
{
// [START dialogflow_v2_generated_Conversations_GenerateStatelessSummary_sync]
using Google.Cloud.Dialogflow.V2;

public sealed partial class GeneratedConversationsClientSnippets
{
/// <summary>Snippet for GenerateStatelessSummary</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GenerateStatelessSummaryRequestObject()
{
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
GenerateStatelessSummaryRequest request = new GenerateStatelessSummaryRequest
{
StatelessConversation = new GenerateStatelessSummaryRequest.Types.MinimalConversation(),
ConversationProfile = new ConversationProfile(),
LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
MaxContextSize = 0,
};
// Make the request
GenerateStatelessSummaryResponse response = conversationsClient.GenerateStatelessSummary(request);
}
}
// [END dialogflow_v2_generated_Conversations_GenerateStatelessSummary_sync]
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public async Task StreamingAnalyzeContent()
AssistQueryParams = new AssistQueryParameters(),
EnablePartialAutomatedAgentReply = false,
CxParameters = new Struct(),
EnableDebuggingInfo = false,
};
// Stream a request to the server
await response.WriteAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public async Task StreamingDetectIntent()
OutputAudioConfig = new OutputAudioConfig(),
InputAudio = ByteString.Empty,
OutputAudioConfigMask = new FieldMask(),
EnableDebuggingInfo = false,
};
// Stream a request to the server
await response.WriteAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11862,6 +11862,103 @@
}
]
},
{
"regionTag": "dialogflow_v2_generated_Conversations_GenerateStatelessSummary_sync",
"title": "GenerateStatelessSummaryRequestObject",
"description": "Snippet for GenerateStatelessSummary",
"file": "ConversationsClient.GenerateStatelessSummaryRequestObjectSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "GenerateStatelessSummary",
"fullName": "Google.Cloud.Dialogflow.V2.ConversationsClient.GenerateStatelessSummary",
"parameters": [
{
"type": "Google.Cloud.Dialogflow.V2.GenerateStatelessSummaryRequest",
"name": "request"
},
{
"type": "Google.Api.Gax.Grpc.CallSettings",
"name": "callSettings"
}
],
"resultType": "Google.Cloud.Dialogflow.V2.GenerateStatelessSummaryResponse",
"client": {
"shortName": "ConversationsClient",
"fullName": "Google.Cloud.Dialogflow.V2.ConversationsClient"
},
"method": {
"shortName": "GenerateStatelessSummary",
"fullName": "google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary",
"service": {
"shortName": "Conversations",
"fullName": "google.cloud.dialogflow.v2.Conversations"
}
}
},
"canonical": true,
"origin": "API_DEFINITION",
"segments": [
{
"start": 20,
"end": 47,
"type": "FULL"
},
{
"start": 34,
"end": 45,
"type": "SHORT"
}
]
},
{
"regionTag": "dialogflow_v2_generated_Conversations_GenerateStatelessSummary_async",
"title": "GenerateStatelessSummaryRequestObjectAsync",
"description": "Snippet for GenerateStatelessSummaryAsync",
"file": "ConversationsClient.GenerateStatelessSummaryRequestObjectAsyncSnippet.g.cs",
"language": "C_SHARP",
"clientMethod": {
"shortName": "GenerateStatelessSummaryAsync",
"fullName": "Google.Cloud.Dialogflow.V2.ConversationsClient.GenerateStatelessSummaryAsync",
"async": true,
"parameters": [
{
"type": "Google.Cloud.Dialogflow.V2.GenerateStatelessSummaryRequest",
"name": "request"
},
{
"type": "Google.Api.Gax.Grpc.CallSettings",
"name": "callSettings"
}
],
"resultType": "System.Threading.Tasks.Task<Google.Cloud.Dialogflow.V2.GenerateStatelessSummaryResponse>",
"client": {
"shortName": "ConversationsClient",
"fullName": "Google.Cloud.Dialogflow.V2.ConversationsClient"
},
"method": {
"shortName": "GenerateStatelessSummary",
"fullName": "google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary",
"service": {
"shortName": "Conversations",
"fullName": "google.cloud.dialogflow.v2.Conversations"
}
}
},
"canonical": true,
"origin": "API_DEFINITION",
"segments": [
{
"start": 20,
"end": 48,
"type": "FULL"
},
{
"start": 35,
"end": 46,
"type": "SHORT"
}
]
},
{
"regionTag": "dialogflow_v2_generated_Documents_ListDocuments_sync",
"title": "ListDocumentsRequestObject",
Expand Down Expand Up @@ -25419,12 +25516,12 @@
"segments": [
{
"start": 20,
"end": 86,
"end": 87,
"type": "FULL"
},
{
"start": 38,
"end": 84,
"end": 85,
"type": "SHORT"
}
]
Expand Down Expand Up @@ -28119,12 +28216,12 @@
"segments": [
{
"start": 20,
"end": 84,
"end": 85,
"type": "FULL"
},
{
"start": 38,
"end": 82,
"end": 83,
"type": "SHORT"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,5 +1062,44 @@ public async Task SuggestConversationSummaryResourceNamesAsync()
SuggestConversationSummaryResponse response = await conversationsClient.SuggestConversationSummaryAsync(conversation);
// End snippet
}

/// <summary>Snippet for GenerateStatelessSummary</summary>
public void GenerateStatelessSummaryRequestObject()
{
// Snippet: GenerateStatelessSummary(GenerateStatelessSummaryRequest, CallSettings)
// Create client
ConversationsClient conversationsClient = ConversationsClient.Create();
// Initialize request argument(s)
GenerateStatelessSummaryRequest request = new GenerateStatelessSummaryRequest
{
StatelessConversation = new GenerateStatelessSummaryRequest.Types.MinimalConversation(),
ConversationProfile = new ConversationProfile(),
LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
MaxContextSize = 0,
};
// Make the request
GenerateStatelessSummaryResponse response = conversationsClient.GenerateStatelessSummary(request);
// End snippet
}

/// <summary>Snippet for GenerateStatelessSummaryAsync</summary>
public async Task GenerateStatelessSummaryRequestObjectAsync()
{
// Snippet: GenerateStatelessSummaryAsync(GenerateStatelessSummaryRequest, CallSettings)
// Additional: GenerateStatelessSummaryAsync(GenerateStatelessSummaryRequest, CancellationToken)
// Create client
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();
// Initialize request argument(s)
GenerateStatelessSummaryRequest request = new GenerateStatelessSummaryRequest
{
StatelessConversation = new GenerateStatelessSummaryRequest.Types.MinimalConversation(),
ConversationProfile = new ConversationProfile(),
LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"),
MaxContextSize = 0,
};
// Make the request
GenerateStatelessSummaryResponse response = await conversationsClient.GenerateStatelessSummaryAsync(request);
// End snippet
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ public async Task StreamingAnalyzeContent()
AssistQueryParams = new AssistQueryParameters(),
EnablePartialAutomatedAgentReply = false,
CxParameters = new Struct(),
EnableDebuggingInfo = false,
};
// Stream a request to the server
await response.WriteAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public async Task StreamingDetectIntent()
OutputAudioConfig = new OutputAudioConfig(),
InputAudio = ByteString.Empty,
OutputAudioConfigMask = new FieldMask(),
EnableDebuggingInfo = false,
};
// Stream a request to the server
await response.WriteAsync(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// source: google/cloud/dialogflow/v2/agent.proto
// </auto-generated>
// Original file comments:
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,8 @@ public sealed partial class AnswerFeedback : pb::IMessage<AnswerFeedback>
/// <summary>
/// Indicates whether the answer/item was clicked by the human agent
/// or not. Default to false.
/// For knowledge search, the answer record is considered to be clicked if the
/// answer was copied or any URI was clicked.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// source: google/cloud/dialogflow/v2/answer_record.proto
// </auto-generated>
// Original file comments:
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit ddd7f08

Please sign in to comment.