-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support import data from Cloud Spanner, BigTable, SQL and Fires…
…tore feat: add answer generation APIs feat: add standalone grounding API feat: add standalone ranking API feat: support advanced search boosting feat: add advanced engine model APIs docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 623543290 Source-Link: googleapis/googleapis@5fadb63 Source-Link: googleapis/googleapis-gen@589978b Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuRGlzY292ZXJ5RW5naW5lLlYxQmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiNTg5OTc4YjBhMzNkNDZlODdiN2JkMGQ4MDE3NzM5Y2RjYWUyYWNjYyJ9
- Loading branch information
1 parent
7a7acef
commit 2a2996a
Showing
106 changed files
with
37,717 additions
and
2,456 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
...ratedSnippets/ConversationalSearchServiceClient.AnswerQueryRequestObjectAsyncSnippet.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,56 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_AnswerQuery_async] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AnswerQueryAsync</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 AnswerQueryRequestObjectAsync() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
AnswerQueryRequest request = new AnswerQueryRequest | ||
{ | ||
ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"), | ||
Query = new Query(), | ||
SessionAsSessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"), | ||
SafetySpec = new AnswerQueryRequest.Types.SafetySpec(), | ||
RelatedQuestionsSpec = new AnswerQueryRequest.Types.RelatedQuestionsSpec(), | ||
AnswerGenerationSpec = new AnswerQueryRequest.Types.AnswerGenerationSpec(), | ||
SearchSpec = new AnswerQueryRequest.Types.SearchSpec(), | ||
QueryUnderstandingSpec = new AnswerQueryRequest.Types.QueryUnderstandingSpec(), | ||
AsynchronousMode = false, | ||
UserPseudoId = "", | ||
}; | ||
// Make the request | ||
AnswerQueryResponse response = await conversationalSearchServiceClient.AnswerQueryAsync(request); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_AnswerQuery_async] | ||
} |
55 changes: 55 additions & 0 deletions
55
....GeneratedSnippets/ConversationalSearchServiceClient.AnswerQueryRequestObjectSnippet.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,55 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_AnswerQuery_sync] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for AnswerQuery</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 AnswerQueryRequestObject() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create(); | ||
// Initialize request argument(s) | ||
AnswerQueryRequest request = new AnswerQueryRequest | ||
{ | ||
ServingConfigAsServingConfigName = ServingConfigName.FromProjectLocationDataStoreServingConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"), | ||
Query = new Query(), | ||
SessionAsSessionName = SessionName.FromProjectLocationDataStoreSession("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]"), | ||
SafetySpec = new AnswerQueryRequest.Types.SafetySpec(), | ||
RelatedQuestionsSpec = new AnswerQueryRequest.Types.RelatedQuestionsSpec(), | ||
AnswerGenerationSpec = new AnswerQueryRequest.Types.AnswerGenerationSpec(), | ||
SearchSpec = new AnswerQueryRequest.Types.SearchSpec(), | ||
QueryUnderstandingSpec = new AnswerQueryRequest.Types.QueryUnderstandingSpec(), | ||
AsynchronousMode = false, | ||
UserPseudoId = "", | ||
}; | ||
// Make the request | ||
AnswerQueryResponse response = conversationalSearchServiceClient.AnswerQuery(request); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_AnswerQuery_sync] | ||
} |
45 changes: 45 additions & 0 deletions
45
...V1Beta.GeneratedSnippets/ConversationalSearchServiceClient.CreateSessionAsyncSnippet.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,45 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_async_flattened] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSessionAsync</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 CreateSessionAsync() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]"; | ||
Session session = new Session(); | ||
// Make the request | ||
Session response = await conversationalSearchServiceClient.CreateSessionAsync(parent, session); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_async_flattened] | ||
} |
48 changes: 48 additions & 0 deletions
48
...tedSnippets/ConversationalSearchServiceClient.CreateSessionRequestObjectAsyncSnippet.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,48 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_async] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSessionAsync</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 CreateSessionRequestObjectAsync() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CreateSessionRequest request = new CreateSessionRequest | ||
{ | ||
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"), | ||
Session = new Session(), | ||
}; | ||
// Make the request | ||
Session response = await conversationalSearchServiceClient.CreateSessionAsync(request); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_async] | ||
} |
47 changes: 47 additions & 0 deletions
47
...eneratedSnippets/ConversationalSearchServiceClient.CreateSessionRequestObjectSnippet.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,47 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSession</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 CreateSessionRequestObject() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create(); | ||
// Initialize request argument(s) | ||
CreateSessionRequest request = new CreateSessionRequest | ||
{ | ||
ParentAsDataStoreName = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"), | ||
Session = new Session(), | ||
}; | ||
// Make the request | ||
Session response = conversationalSearchServiceClient.CreateSession(request); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync] | ||
} |
45 changes: 45 additions & 0 deletions
45
...tedSnippets/ConversationalSearchServiceClient.CreateSessionResourceNamesAsyncSnippet.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,45 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_async_flattened_resourceNames] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSessionAsync</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 CreateSessionResourceNamesAsync() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = await ConversationalSearchServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); | ||
Session session = new Session(); | ||
// Make the request | ||
Session response = await conversationalSearchServiceClient.CreateSessionAsync(parent, session); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_async_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
...eneratedSnippets/ConversationalSearchServiceClient.CreateSessionResourceNamesSnippet.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,44 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync_flattened_resourceNames] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSession</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 CreateSessionResourceNames() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create(); | ||
// Initialize request argument(s) | ||
DataStoreName parent = DataStoreName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); | ||
Session session = new Session(); | ||
// Make the request | ||
Session response = conversationalSearchServiceClient.CreateSession(parent, session); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
...gine.V1Beta.GeneratedSnippets/ConversationalSearchServiceClient.CreateSessionSnippet.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,44 @@ | ||
// Copyright 2024 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 discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync_flattened] | ||
using Google.Cloud.DiscoveryEngine.V1Beta; | ||
|
||
public sealed partial class GeneratedConversationalSearchServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSession</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 CreateSession() | ||
{ | ||
// Create client | ||
ConversationalSearchServiceClient conversationalSearchServiceClient = ConversationalSearchServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]"; | ||
Session session = new Session(); | ||
// Make the request | ||
Session response = conversationalSearchServiceClient.CreateSession(parent, session); | ||
} | ||
} | ||
// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync_flattened] | ||
} |
Oops, something went wrong.