-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added speech endpointing setting
feat: added Knowledge Search API PiperOrigin-RevId: 560215389 Source-Link: googleapis/googleapis@b1666e6 Source-Link: googleapis/googleapis-gen@07e82b4 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlhbG9nZmxvdy5WMi8uT3dsQm90LnlhbWwiLCJoIjoiMDdlODJiNGQ0OTE3NDk0ZDg1MDM5NzIyZjY3M2Q0MDljNGM3MzA1ZiJ9
- Loading branch information
1 parent
d5f12a7
commit b08f369
Showing
14 changed files
with
4,176 additions
and
827 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...ow.V2.GeneratedSnippets/ConversationsClient.SearchKnowledgeRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// 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_SearchKnowledge_async] | ||
using Google.Cloud.Dialogflow.V2; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConversationsClientSnippets | ||
{ | ||
/// <summary>Snippet for SearchKnowledgeAsync</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 SearchKnowledgeRequestObjectAsync() | ||
{ | ||
// Create client | ||
ConversationsClient conversationsClient = await ConversationsClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
SearchKnowledgeRequest request = new SearchKnowledgeRequest | ||
{ | ||
Query = new TextInput(), | ||
ConversationProfileAsConversationProfileName = ConversationProfileName.FromProjectConversationProfile("[PROJECT]", "[CONVERSATION_PROFILE]"), | ||
SessionId = "", | ||
ConversationAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"), | ||
LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"), | ||
Parent = "", | ||
}; | ||
// Make the request | ||
SearchKnowledgeResponse response = await conversationsClient.SearchKnowledgeAsync(request); | ||
} | ||
} | ||
// [END dialogflow_v2_generated_Conversations_SearchKnowledge_async] | ||
} |
51 changes: 51 additions & 0 deletions
51
...logflow.V2.GeneratedSnippets/ConversationsClient.SearchKnowledgeRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// 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_SearchKnowledge_sync] | ||
using Google.Cloud.Dialogflow.V2; | ||
|
||
public sealed partial class GeneratedConversationsClientSnippets | ||
{ | ||
/// <summary>Snippet for SearchKnowledge</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 SearchKnowledgeRequestObject() | ||
{ | ||
// Create client | ||
ConversationsClient conversationsClient = ConversationsClient.Create(); | ||
// Initialize request argument(s) | ||
SearchKnowledgeRequest request = new SearchKnowledgeRequest | ||
{ | ||
Query = new TextInput(), | ||
ConversationProfileAsConversationProfileName = ConversationProfileName.FromProjectConversationProfile("[PROJECT]", "[CONVERSATION_PROFILE]"), | ||
SessionId = "", | ||
ConversationAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"), | ||
LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"), | ||
Parent = "", | ||
}; | ||
// Make the request | ||
SearchKnowledgeResponse response = conversationsClient.SearchKnowledge(request); | ||
} | ||
} | ||
// [END dialogflow_v2_generated_Conversations_SearchKnowledge_sync] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.