public abstract class VertexRagDataServiceClient
Reference documentation and code samples for the Cloud AI Platform v1beta1 API class VertexRagDataServiceClient.
VertexRagDataService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.AIPlatform.V1Beta1Assembly
Google.Cloud.AIPlatform.V1Beta1.dll
Remarks
A service for managing user data for RAG.
Properties
CreateRagCorpusOperationsClient
public virtual OperationsClient CreateRagCorpusOperationsClient { get; }
The long-running operations client for CreateRagCorpus
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the VertexRagDataService service, which is a host of "aiplatform.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default VertexRagDataService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default VertexRagDataService scopes are:
DeleteRagCorpusOperationsClient
public virtual OperationsClient DeleteRagCorpusOperationsClient { get; }
The long-running operations client for DeleteRagCorpus
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteRagFileOperationsClient
public virtual OperationsClient DeleteRagFileOperationsClient { get; }
The long-running operations client for DeleteRagFile
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual VertexRagDataService.VertexRagDataServiceClient GrpcClient { get; }
The underlying gRPC VertexRagDataService client
Property Value | |
---|---|
Type | Description |
VertexRagDataServiceVertexRagDataServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
ImportRagFilesOperationsClient
public virtual OperationsClient ImportRagFilesOperationsClient { get; }
The long-running operations client for ImportRagFiles
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static VertexRagDataServiceClient Create()
Synchronously creates a VertexRagDataServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VertexRagDataServiceClientBuilder.
Returns | |
---|---|
Type | Description |
VertexRagDataServiceClient |
The created VertexRagDataServiceClient. |
CreateAsync(CancellationToken)
public static Task<VertexRagDataServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a VertexRagDataServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VertexRagDataServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskVertexRagDataServiceClient |
The task representing the created VertexRagDataServiceClient. |
CreateRagCorpus(LocationName, RagCorpus, CallSettings)
public virtual Operation<RagCorpus, CreateRagCorpusOperationMetadata> CreateRagCorpus(LocationName parent, RagCorpus ragCorpus, CallSettings callSettings = null)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the RagCorpus in.
Format: |
ragCorpus |
RagCorpus Required. The RagCorpus to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRagCorpusCreateRagCorpusOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
RagCorpus ragCorpus = new RagCorpus();
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = vertexRagDataServiceClient.CreateRagCorpus(parent, ragCorpus);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceCreateRagCorpus(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpus(CreateRagCorpusRequest, CallSettings)
public virtual Operation<RagCorpus, CreateRagCorpusOperationMetadata> CreateRagCorpus(CreateRagCorpusRequest request, CallSettings callSettings = null)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
CreateRagCorpusRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRagCorpusCreateRagCorpusOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
CreateRagCorpusRequest request = new CreateRagCorpusRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
RagCorpus = new RagCorpus(),
};
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = vertexRagDataServiceClient.CreateRagCorpus(request);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceCreateRagCorpus(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpus(string, RagCorpus, CallSettings)
public virtual Operation<RagCorpus, CreateRagCorpusOperationMetadata> CreateRagCorpus(string parent, RagCorpus ragCorpus, CallSettings callSettings = null)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the RagCorpus in.
Format: |
ragCorpus |
RagCorpus Required. The RagCorpus to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRagCorpusCreateRagCorpusOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
RagCorpus ragCorpus = new RagCorpus();
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = vertexRagDataServiceClient.CreateRagCorpus(parent, ragCorpus);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceCreateRagCorpus(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpusAsync(LocationName, RagCorpus, CallSettings)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> CreateRagCorpusAsync(LocationName parent, RagCorpus ragCorpus, CallSettings callSettings = null)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the RagCorpus in.
Format: |
ragCorpus |
RagCorpus Required. The RagCorpus to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
RagCorpus ragCorpus = new RagCorpus();
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = await vertexRagDataServiceClient.CreateRagCorpusAsync(parent, ragCorpus);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceCreateRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpusAsync(LocationName, RagCorpus, CancellationToken)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> CreateRagCorpusAsync(LocationName parent, RagCorpus ragCorpus, CancellationToken cancellationToken)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location to create the RagCorpus in.
Format: |
ragCorpus |
RagCorpus Required. The RagCorpus to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
RagCorpus ragCorpus = new RagCorpus();
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = await vertexRagDataServiceClient.CreateRagCorpusAsync(parent, ragCorpus);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceCreateRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpusAsync(CreateRagCorpusRequest, CallSettings)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> CreateRagCorpusAsync(CreateRagCorpusRequest request, CallSettings callSettings = null)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
CreateRagCorpusRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
CreateRagCorpusRequest request = new CreateRagCorpusRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
RagCorpus = new RagCorpus(),
};
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = await vertexRagDataServiceClient.CreateRagCorpusAsync(request);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceCreateRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpusAsync(CreateRagCorpusRequest, CancellationToken)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> CreateRagCorpusAsync(CreateRagCorpusRequest request, CancellationToken cancellationToken)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
CreateRagCorpusRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
CreateRagCorpusRequest request = new CreateRagCorpusRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
RagCorpus = new RagCorpus(),
};
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = await vertexRagDataServiceClient.CreateRagCorpusAsync(request);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceCreateRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpusAsync(string, RagCorpus, CallSettings)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> CreateRagCorpusAsync(string parent, RagCorpus ragCorpus, CallSettings callSettings = null)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the RagCorpus in.
Format: |
ragCorpus |
RagCorpus Required. The RagCorpus to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
RagCorpus ragCorpus = new RagCorpus();
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = await vertexRagDataServiceClient.CreateRagCorpusAsync(parent, ragCorpus);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceCreateRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
CreateRagCorpusAsync(string, RagCorpus, CancellationToken)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> CreateRagCorpusAsync(string parent, RagCorpus ragCorpus, CancellationToken cancellationToken)
Creates a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location to create the RagCorpus in.
Format: |
ragCorpus |
RagCorpus Required. The RagCorpus to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
RagCorpus ragCorpus = new RagCorpus();
// Make the request
Operation<RagCorpus, CreateRagCorpusOperationMetadata> response = await vertexRagDataServiceClient.CreateRagCorpusAsync(parent, ragCorpus);
// Poll until the returned long-running operation is complete
Operation<RagCorpus, CreateRagCorpusOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RagCorpus result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RagCorpus, CreateRagCorpusOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceCreateRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
RagCorpus retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpus(DeleteRagCorpusRequest, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteRagCorpus(DeleteRagCorpusRequest request, CallSettings callSettings = null)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
DeleteRagCorpusRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
DeleteRagCorpusRequest request = new DeleteRagCorpusRequest
{
RagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
Force = false,
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = vertexRagDataServiceClient.DeleteRagCorpus(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceDeleteRagCorpus(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpus(RagCorpusName, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteRagCorpus(RagCorpusName name, CallSettings callSettings = null)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
RagCorpusName Required. The name of the RagCorpus resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagCorpusName name = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = vertexRagDataServiceClient.DeleteRagCorpus(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceDeleteRagCorpus(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpus(string, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteRagCorpus(string name, CallSettings callSettings = null)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagCorpus resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = vertexRagDataServiceClient.DeleteRagCorpus(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceDeleteRagCorpus(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpusAsync(DeleteRagCorpusRequest, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagCorpusAsync(DeleteRagCorpusRequest request, CallSettings callSettings = null)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
DeleteRagCorpusRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteRagCorpusRequest request = new DeleteRagCorpusRequest
{
RagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
Force = false,
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagCorpusAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpusAsync(DeleteRagCorpusRequest, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagCorpusAsync(DeleteRagCorpusRequest request, CancellationToken cancellationToken)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
DeleteRagCorpusRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteRagCorpusRequest request = new DeleteRagCorpusRequest
{
RagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
Force = false,
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagCorpusAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpusAsync(RagCorpusName, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagCorpusAsync(RagCorpusName name, CallSettings callSettings = null)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
RagCorpusName Required. The name of the RagCorpus resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName name = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagCorpusAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpusAsync(RagCorpusName, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagCorpusAsync(RagCorpusName name, CancellationToken cancellationToken)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
RagCorpusName Required. The name of the RagCorpus resource to be deleted.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName name = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagCorpusAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpusAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagCorpusAsync(string name, CallSettings callSettings = null)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagCorpus resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagCorpusAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagCorpusAsync(string, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagCorpusAsync(string name, CancellationToken cancellationToken)
Deletes a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagCorpus resource to be deleted.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagCorpusAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagCorpusAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFile(DeleteRagFileRequest, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteRagFile(DeleteRagFileRequest request, CallSettings callSettings = null)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
request |
DeleteRagFileRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
DeleteRagFileRequest request = new DeleteRagFileRequest
{
RagFileName = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = vertexRagDataServiceClient.DeleteRagFile(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceDeleteRagFile(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFile(RagFileName, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteRagFile(RagFileName name, CallSettings callSettings = null)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
name |
RagFileName Required. The name of the RagFile resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagFileName name = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = vertexRagDataServiceClient.DeleteRagFile(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceDeleteRagFile(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFile(string, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteRagFile(string name, CallSettings callSettings = null)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagFile resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]/ragFiles/[RAG_FILE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = vertexRagDataServiceClient.DeleteRagFile(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceDeleteRagFile(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFileAsync(DeleteRagFileRequest, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagFileAsync(DeleteRagFileRequest request, CallSettings callSettings = null)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
request |
DeleteRagFileRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteRagFileRequest request = new DeleteRagFileRequest
{
RagFileName = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagFileAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagFileAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFileAsync(DeleteRagFileRequest, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagFileAsync(DeleteRagFileRequest request, CancellationToken cancellationToken)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
request |
DeleteRagFileRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteRagFileRequest request = new DeleteRagFileRequest
{
RagFileName = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagFileAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagFileAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFileAsync(RagFileName, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagFileAsync(RagFileName name, CallSettings callSettings = null)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
name |
RagFileName Required. The name of the RagFile resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagFileName name = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagFileAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagFileAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFileAsync(RagFileName, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagFileAsync(RagFileName name, CancellationToken cancellationToken)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
name |
RagFileName Required. The name of the RagFile resource to be deleted.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagFileName name = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagFileAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagFileAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFileAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagFileAsync(string name, CallSettings callSettings = null)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagFile resource to be deleted.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]/ragFiles/[RAG_FILE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagFileAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagFileAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteRagFileAsync(string, CancellationToken)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteRagFileAsync(string name, CancellationToken cancellationToken)
Deletes a RagFile.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagFile resource to be deleted.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]/ragFiles/[RAG_FILE]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await vertexRagDataServiceClient.DeleteRagFileAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceDeleteRagFileAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetRagCorpus(GetRagCorpusRequest, CallSettings)
public virtual RagCorpus GetRagCorpus(GetRagCorpusRequest request, CallSettings callSettings = null)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
GetRagCorpusRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RagCorpus |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
GetRagCorpusRequest request = new GetRagCorpusRequest
{
RagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
};
// Make the request
RagCorpus response = vertexRagDataServiceClient.GetRagCorpus(request);
GetRagCorpus(RagCorpusName, CallSettings)
public virtual RagCorpus GetRagCorpus(RagCorpusName name, CallSettings callSettings = null)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
RagCorpusName Required. The name of the RagCorpus resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RagCorpus |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagCorpusName name = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
RagCorpus response = vertexRagDataServiceClient.GetRagCorpus(name);
GetRagCorpus(string, CallSettings)
public virtual RagCorpus GetRagCorpus(string name, CallSettings callSettings = null)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagCorpus resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RagCorpus |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
RagCorpus response = vertexRagDataServiceClient.GetRagCorpus(name);
GetRagCorpusAsync(GetRagCorpusRequest, CallSettings)
public virtual Task<RagCorpus> GetRagCorpusAsync(GetRagCorpusRequest request, CallSettings callSettings = null)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
GetRagCorpusRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRagCorpus |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
GetRagCorpusRequest request = new GetRagCorpusRequest
{
RagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
};
// Make the request
RagCorpus response = await vertexRagDataServiceClient.GetRagCorpusAsync(request);
GetRagCorpusAsync(GetRagCorpusRequest, CancellationToken)
public virtual Task<RagCorpus> GetRagCorpusAsync(GetRagCorpusRequest request, CancellationToken cancellationToken)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
GetRagCorpusRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskRagCorpus |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
GetRagCorpusRequest request = new GetRagCorpusRequest
{
RagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
};
// Make the request
RagCorpus response = await vertexRagDataServiceClient.GetRagCorpusAsync(request);
GetRagCorpusAsync(RagCorpusName, CallSettings)
public virtual Task<RagCorpus> GetRagCorpusAsync(RagCorpusName name, CallSettings callSettings = null)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
RagCorpusName Required. The name of the RagCorpus resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRagCorpus |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName name = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
RagCorpus response = await vertexRagDataServiceClient.GetRagCorpusAsync(name);
GetRagCorpusAsync(RagCorpusName, CancellationToken)
public virtual Task<RagCorpus> GetRagCorpusAsync(RagCorpusName name, CancellationToken cancellationToken)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
RagCorpusName Required. The name of the RagCorpus resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskRagCorpus |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName name = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
RagCorpus response = await vertexRagDataServiceClient.GetRagCorpusAsync(name);
GetRagCorpusAsync(string, CallSettings)
public virtual Task<RagCorpus> GetRagCorpusAsync(string name, CallSettings callSettings = null)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagCorpus resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRagCorpus |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
RagCorpus response = await vertexRagDataServiceClient.GetRagCorpusAsync(name);
GetRagCorpusAsync(string, CancellationToken)
public virtual Task<RagCorpus> GetRagCorpusAsync(string name, CancellationToken cancellationToken)
Gets a RagCorpus.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagCorpus resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskRagCorpus |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
RagCorpus response = await vertexRagDataServiceClient.GetRagCorpusAsync(name);
GetRagFile(GetRagFileRequest, CallSettings)
public virtual RagFile GetRagFile(GetRagFileRequest request, CallSettings callSettings = null)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
request |
GetRagFileRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RagFile |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
GetRagFileRequest request = new GetRagFileRequest
{
RagFileName = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"),
};
// Make the request
RagFile response = vertexRagDataServiceClient.GetRagFile(request);
GetRagFile(RagFileName, CallSettings)
public virtual RagFile GetRagFile(RagFileName name, CallSettings callSettings = null)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
name |
RagFileName Required. The name of the RagFile resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RagFile |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagFileName name = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
// Make the request
RagFile response = vertexRagDataServiceClient.GetRagFile(name);
GetRagFile(string, CallSettings)
public virtual RagFile GetRagFile(string name, CallSettings callSettings = null)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagFile resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RagFile |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]/ragFiles/[RAG_FILE]";
// Make the request
RagFile response = vertexRagDataServiceClient.GetRagFile(name);
GetRagFileAsync(GetRagFileRequest, CallSettings)
public virtual Task<RagFile> GetRagFileAsync(GetRagFileRequest request, CallSettings callSettings = null)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
request |
GetRagFileRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRagFile |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
GetRagFileRequest request = new GetRagFileRequest
{
RagFileName = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"),
};
// Make the request
RagFile response = await vertexRagDataServiceClient.GetRagFileAsync(request);
GetRagFileAsync(GetRagFileRequest, CancellationToken)
public virtual Task<RagFile> GetRagFileAsync(GetRagFileRequest request, CancellationToken cancellationToken)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
request |
GetRagFileRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskRagFile |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
GetRagFileRequest request = new GetRagFileRequest
{
RagFileName = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]"),
};
// Make the request
RagFile response = await vertexRagDataServiceClient.GetRagFileAsync(request);
GetRagFileAsync(RagFileName, CallSettings)
public virtual Task<RagFile> GetRagFileAsync(RagFileName name, CallSettings callSettings = null)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
name |
RagFileName Required. The name of the RagFile resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRagFile |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagFileName name = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
// Make the request
RagFile response = await vertexRagDataServiceClient.GetRagFileAsync(name);
GetRagFileAsync(RagFileName, CancellationToken)
public virtual Task<RagFile> GetRagFileAsync(RagFileName name, CancellationToken cancellationToken)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
name |
RagFileName Required. The name of the RagFile resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskRagFile |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagFileName name = RagFileName.FromProjectLocationRagCorpusRagFile("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
// Make the request
RagFile response = await vertexRagDataServiceClient.GetRagFileAsync(name);
GetRagFileAsync(string, CallSettings)
public virtual Task<RagFile> GetRagFileAsync(string name, CallSettings callSettings = null)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagFile resource.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskRagFile |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]/ragFiles/[RAG_FILE]";
// Make the request
RagFile response = await vertexRagDataServiceClient.GetRagFileAsync(name);
GetRagFileAsync(string, CancellationToken)
public virtual Task<RagFile> GetRagFileAsync(string name, CancellationToken cancellationToken)
Gets a RagFile.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the RagFile resource.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskRagFile |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]/ragFiles/[RAG_FILE]";
// Make the request
RagFile response = await vertexRagDataServiceClient.GetRagFileAsync(name);
ImportRagFiles(ImportRagFilesRequest, CallSettings)
public virtual Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> ImportRagFiles(ImportRagFilesRequest request, CallSettings callSettings = null)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
ImportRagFilesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportRagFilesResponseImportRagFilesOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
ImportRagFilesRequest request = new ImportRagFilesRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
ImportRagFilesConfig = new ImportRagFilesConfig(),
};
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = vertexRagDataServiceClient.ImportRagFiles(request);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceImportRagFiles(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFiles(RagCorpusName, ImportRagFilesConfig, CallSettings)
public virtual Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> ImportRagFiles(RagCorpusName parent, ImportRagFilesConfig importRagFilesConfig, CallSettings callSettings = null)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The name of the RagCorpus resource into which to import files.
Format:
|
importRagFilesConfig |
ImportRagFilesConfig Required. The config for the RagFiles to be synced and imported into the RagCorpus. [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportRagFilesResponseImportRagFilesOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
ImportRagFilesConfig importRagFilesConfig = new ImportRagFilesConfig();
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = vertexRagDataServiceClient.ImportRagFiles(parent, importRagFilesConfig);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceImportRagFiles(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFiles(string, ImportRagFilesConfig, CallSettings)
public virtual Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> ImportRagFiles(string parent, ImportRagFilesConfig importRagFilesConfig, CallSettings callSettings = null)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The name of the RagCorpus resource into which to import files.
Format:
|
importRagFilesConfig |
ImportRagFilesConfig Required. The config for the RagFiles to be synced and imported into the RagCorpus. [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportRagFilesResponseImportRagFilesOperationMetadata |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
ImportRagFilesConfig importRagFilesConfig = new ImportRagFilesConfig();
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = vertexRagDataServiceClient.ImportRagFiles(parent, importRagFilesConfig);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = vertexRagDataServiceClient.PollOnceImportRagFiles(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFilesAsync(ImportRagFilesRequest, CallSettings)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> ImportRagFilesAsync(ImportRagFilesRequest request, CallSettings callSettings = null)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
ImportRagFilesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
ImportRagFilesRequest request = new ImportRagFilesRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
ImportRagFilesConfig = new ImportRagFilesConfig(),
};
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = await vertexRagDataServiceClient.ImportRagFilesAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceImportRagFilesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFilesAsync(ImportRagFilesRequest, CancellationToken)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> ImportRagFilesAsync(ImportRagFilesRequest request, CancellationToken cancellationToken)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
ImportRagFilesRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
ImportRagFilesRequest request = new ImportRagFilesRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
ImportRagFilesConfig = new ImportRagFilesConfig(),
};
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = await vertexRagDataServiceClient.ImportRagFilesAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceImportRagFilesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFilesAsync(RagCorpusName, ImportRagFilesConfig, CallSettings)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> ImportRagFilesAsync(RagCorpusName parent, ImportRagFilesConfig importRagFilesConfig, CallSettings callSettings = null)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The name of the RagCorpus resource into which to import files.
Format:
|
importRagFilesConfig |
ImportRagFilesConfig Required. The config for the RagFiles to be synced and imported into the RagCorpus. [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
ImportRagFilesConfig importRagFilesConfig = new ImportRagFilesConfig();
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = await vertexRagDataServiceClient.ImportRagFilesAsync(parent, importRagFilesConfig);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceImportRagFilesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFilesAsync(RagCorpusName, ImportRagFilesConfig, CancellationToken)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> ImportRagFilesAsync(RagCorpusName parent, ImportRagFilesConfig importRagFilesConfig, CancellationToken cancellationToken)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The name of the RagCorpus resource into which to import files.
Format:
|
importRagFilesConfig |
ImportRagFilesConfig Required. The config for the RagFiles to be synced and imported into the RagCorpus. [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
ImportRagFilesConfig importRagFilesConfig = new ImportRagFilesConfig();
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = await vertexRagDataServiceClient.ImportRagFilesAsync(parent, importRagFilesConfig);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceImportRagFilesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFilesAsync(string, ImportRagFilesConfig, CallSettings)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> ImportRagFilesAsync(string parent, ImportRagFilesConfig importRagFilesConfig, CallSettings callSettings = null)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The name of the RagCorpus resource into which to import files.
Format:
|
importRagFilesConfig |
ImportRagFilesConfig Required. The config for the RagFiles to be synced and imported into the RagCorpus. [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
ImportRagFilesConfig importRagFilesConfig = new ImportRagFilesConfig();
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = await vertexRagDataServiceClient.ImportRagFilesAsync(parent, importRagFilesConfig);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceImportRagFilesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ImportRagFilesAsync(string, ImportRagFilesConfig, CancellationToken)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> ImportRagFilesAsync(string parent, ImportRagFilesConfig importRagFilesConfig, CancellationToken cancellationToken)
Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The name of the RagCorpus resource into which to import files.
Format:
|
importRagFilesConfig |
ImportRagFilesConfig Required. The config for the RagFiles to be synced and imported into the RagCorpus. [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1beta1.VertexRagDataService.ImportRagFiles]. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
ImportRagFilesConfig importRagFilesConfig = new ImportRagFilesConfig();
// Make the request
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> response = await vertexRagDataServiceClient.ImportRagFilesAsync(parent, importRagFilesConfig);
// Poll until the returned long-running operation is complete
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportRagFilesResponse result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> retrievedResponse = await vertexRagDataServiceClient.PollOnceImportRagFilesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportRagFilesResponse retrievedResult = retrievedResponse.Result;
}
ListRagCorpora(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListRagCorporaResponse, RagCorpus> ListRagCorpora(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagCorpora in a Location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location from which to list the
RagCorpora. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListRagCorporaResponseRagCorpus |
A pageable sequence of RagCorpus resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListRagCorporaResponse, RagCorpus> response = vertexRagDataServiceClient.ListRagCorpora(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RagCorpus item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRagCorporaResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagCorpus item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagCorpus> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagCorpus item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagCorpora(ListRagCorporaRequest, CallSettings)
public virtual PagedEnumerable<ListRagCorporaResponse, RagCorpus> ListRagCorpora(ListRagCorporaRequest request, CallSettings callSettings = null)
Lists RagCorpora in a Location.
Parameters | |
---|---|
Name | Description |
request |
ListRagCorporaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListRagCorporaResponseRagCorpus |
A pageable sequence of RagCorpus resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
ListRagCorporaRequest request = new ListRagCorporaRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListRagCorporaResponse, RagCorpus> response = vertexRagDataServiceClient.ListRagCorpora(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (RagCorpus item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRagCorporaResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagCorpus item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagCorpus> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagCorpus item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagCorpora(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListRagCorporaResponse, RagCorpus> ListRagCorpora(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagCorpora in a Location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location from which to list the
RagCorpora. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListRagCorporaResponseRagCorpus |
A pageable sequence of RagCorpus resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListRagCorporaResponse, RagCorpus> response = vertexRagDataServiceClient.ListRagCorpora(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RagCorpus item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRagCorporaResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagCorpus item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagCorpus> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagCorpus item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagCorporaAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListRagCorporaResponse, RagCorpus> ListRagCorporaAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagCorpora in a Location.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The resource name of the Location from which to list the
RagCorpora. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListRagCorporaResponseRagCorpus |
A pageable asynchronous sequence of RagCorpus resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListRagCorporaResponse, RagCorpus> response = vertexRagDataServiceClient.ListRagCorporaAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RagCorpus item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRagCorporaResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagCorpus item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagCorpus> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagCorpus item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagCorporaAsync(ListRagCorporaRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListRagCorporaResponse, RagCorpus> ListRagCorporaAsync(ListRagCorporaRequest request, CallSettings callSettings = null)
Lists RagCorpora in a Location.
Parameters | |
---|---|
Name | Description |
request |
ListRagCorporaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListRagCorporaResponseRagCorpus |
A pageable asynchronous sequence of RagCorpus resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
ListRagCorporaRequest request = new ListRagCorporaRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListRagCorporaResponse, RagCorpus> response = vertexRagDataServiceClient.ListRagCorporaAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RagCorpus item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRagCorporaResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagCorpus item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagCorpus> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagCorpus item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagCorporaAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListRagCorporaResponse, RagCorpus> ListRagCorporaAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagCorpora in a Location.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the Location from which to list the
RagCorpora. Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListRagCorporaResponseRagCorpus |
A pageable asynchronous sequence of RagCorpus resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListRagCorporaResponse, RagCorpus> response = vertexRagDataServiceClient.ListRagCorporaAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RagCorpus item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRagCorporaResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagCorpus item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagCorpus> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagCorpus item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagFiles(ListRagFilesRequest, CallSettings)
public virtual PagedEnumerable<ListRagFilesResponse, RagFile> ListRagFiles(ListRagFilesRequest request, CallSettings callSettings = null)
Lists RagFiles in a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
ListRagFilesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListRagFilesResponseRagFile |
A pageable sequence of RagFile resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
ListRagFilesRequest request = new ListRagFilesRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
};
// Make the request
PagedEnumerable<ListRagFilesResponse, RagFile> response = vertexRagDataServiceClient.ListRagFiles(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (RagFile item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRagFilesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagFile item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagFile> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagFile item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagFiles(RagCorpusName, string, int?, CallSettings)
public virtual PagedEnumerable<ListRagFilesResponse, RagFile> ListRagFiles(RagCorpusName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagFiles in a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The resource name of the RagCorpus from which to list the
RagFiles. Format:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListRagFilesResponseRagFile |
A pageable sequence of RagFile resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
PagedEnumerable<ListRagFilesResponse, RagFile> response = vertexRagDataServiceClient.ListRagFiles(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RagFile item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRagFilesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagFile item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagFile> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagFile item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagFiles(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListRagFilesResponse, RagFile> ListRagFiles(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagFiles in a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the RagCorpus from which to list the
RagFiles. Format:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListRagFilesResponseRagFile |
A pageable sequence of RagFile resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
PagedEnumerable<ListRagFilesResponse, RagFile> response = vertexRagDataServiceClient.ListRagFiles(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RagFile item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRagFilesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagFile item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagFile> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagFile item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagFilesAsync(ListRagFilesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListRagFilesResponse, RagFile> ListRagFilesAsync(ListRagFilesRequest request, CallSettings callSettings = null)
Lists RagFiles in a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
ListRagFilesRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListRagFilesResponseRagFile |
A pageable asynchronous sequence of RagFile resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
ListRagFilesRequest request = new ListRagFilesRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
};
// Make the request
PagedAsyncEnumerable<ListRagFilesResponse, RagFile> response = vertexRagDataServiceClient.ListRagFilesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RagFile item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRagFilesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagFile item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagFile> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagFile item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagFilesAsync(RagCorpusName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListRagFilesResponse, RagFile> ListRagFilesAsync(RagCorpusName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagFiles in a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The resource name of the RagCorpus from which to list the
RagFiles. Format:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListRagFilesResponseRagFile |
A pageable asynchronous sequence of RagFile resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
// Make the request
PagedAsyncEnumerable<ListRagFilesResponse, RagFile> response = vertexRagDataServiceClient.ListRagFilesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RagFile item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRagFilesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagFile item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagFile> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagFile item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRagFilesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListRagFilesResponse, RagFile> ListRagFilesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists RagFiles in a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the RagCorpus from which to list the
RagFiles. Format:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListRagFilesResponseRagFile |
A pageable asynchronous sequence of RagFile resources. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
// Make the request
PagedAsyncEnumerable<ListRagFilesResponse, RagFile> response = vertexRagDataServiceClient.ListRagFilesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RagFile item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRagFilesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RagFile item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RagFile> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RagFile item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceCreateRagCorpus(string, CallSettings)
public virtual Operation<RagCorpus, CreateRagCorpusOperationMetadata> PollOnceCreateRagCorpus(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateRagCorpus
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRagCorpusCreateRagCorpusOperationMetadata |
The result of polling the operation. |
PollOnceCreateRagCorpusAsync(string, CallSettings)
public virtual Task<Operation<RagCorpus, CreateRagCorpusOperationMetadata>> PollOnceCreateRagCorpusAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateRagCorpus
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRagCorpusCreateRagCorpusOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteRagCorpus(string, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteRagCorpus(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteRagCorpus
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The result of polling the operation. |
PollOnceDeleteRagCorpusAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteRagCorpusAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteRagCorpus
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteRagFile(string, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteRagFile(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteRagFile
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata |
The result of polling the operation. |
PollOnceDeleteRagFileAsync(string, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteRagFileAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteRagFile
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata |
A task representing the result of polling the operation. |
PollOnceImportRagFiles(string, CallSettings)
public virtual Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata> PollOnceImportRagFiles(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ImportRagFiles
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportRagFilesResponseImportRagFilesOperationMetadata |
The result of polling the operation. |
PollOnceImportRagFilesAsync(string, CallSettings)
public virtual Task<Operation<ImportRagFilesResponse, ImportRagFilesOperationMetadata>> PollOnceImportRagFilesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportRagFiles
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportRagFilesResponseImportRagFilesOperationMetadata |
A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UploadRagFile(RagCorpusName, RagFile, UploadRagFileConfig, CallSettings)
public virtual UploadRagFileResponse UploadRagFile(RagCorpusName parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig, CallSettings callSettings = null)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The name of the RagCorpus resource into which to upload the file.
Format:
|
ragFile |
RagFile Required. The RagFile to upload. |
uploadRagFileConfig |
UploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UploadRagFileResponse |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
RagFile ragFile = new RagFile();
UploadRagFileConfig uploadRagFileConfig = new UploadRagFileConfig();
// Make the request
UploadRagFileResponse response = vertexRagDataServiceClient.UploadRagFile(parent, ragFile, uploadRagFileConfig);
UploadRagFile(UploadRagFileRequest, CallSettings)
public virtual UploadRagFileResponse UploadRagFile(UploadRagFileRequest request, CallSettings callSettings = null)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
UploadRagFileRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UploadRagFileResponse |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
UploadRagFileRequest request = new UploadRagFileRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
RagFile = new RagFile(),
UploadRagFileConfig = new UploadRagFileConfig(),
};
// Make the request
UploadRagFileResponse response = vertexRagDataServiceClient.UploadRagFile(request);
UploadRagFile(string, RagFile, UploadRagFileConfig, CallSettings)
public virtual UploadRagFileResponse UploadRagFile(string parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig, CallSettings callSettings = null)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The name of the RagCorpus resource into which to upload the file.
Format:
|
ragFile |
RagFile Required. The RagFile to upload. |
uploadRagFileConfig |
UploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
UploadRagFileResponse |
The RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = VertexRagDataServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
RagFile ragFile = new RagFile();
UploadRagFileConfig uploadRagFileConfig = new UploadRagFileConfig();
// Make the request
UploadRagFileResponse response = vertexRagDataServiceClient.UploadRagFile(parent, ragFile, uploadRagFileConfig);
UploadRagFileAsync(RagCorpusName, RagFile, UploadRagFileConfig, CallSettings)
public virtual Task<UploadRagFileResponse> UploadRagFileAsync(RagCorpusName parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig, CallSettings callSettings = null)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The name of the RagCorpus resource into which to upload the file.
Format:
|
ragFile |
RagFile Required. The RagFile to upload. |
uploadRagFileConfig |
UploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUploadRagFileResponse |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
RagFile ragFile = new RagFile();
UploadRagFileConfig uploadRagFileConfig = new UploadRagFileConfig();
// Make the request
UploadRagFileResponse response = await vertexRagDataServiceClient.UploadRagFileAsync(parent, ragFile, uploadRagFileConfig);
UploadRagFileAsync(RagCorpusName, RagFile, UploadRagFileConfig, CancellationToken)
public virtual Task<UploadRagFileResponse> UploadRagFileAsync(RagCorpusName parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig, CancellationToken cancellationToken)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
RagCorpusName Required. The name of the RagCorpus resource into which to upload the file.
Format:
|
ragFile |
RagFile Required. The RagFile to upload. |
uploadRagFileConfig |
UploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUploadRagFileResponse |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
RagCorpusName parent = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
RagFile ragFile = new RagFile();
UploadRagFileConfig uploadRagFileConfig = new UploadRagFileConfig();
// Make the request
UploadRagFileResponse response = await vertexRagDataServiceClient.UploadRagFileAsync(parent, ragFile, uploadRagFileConfig);
UploadRagFileAsync(UploadRagFileRequest, CallSettings)
public virtual Task<UploadRagFileResponse> UploadRagFileAsync(UploadRagFileRequest request, CallSettings callSettings = null)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
UploadRagFileRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUploadRagFileResponse |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
UploadRagFileRequest request = new UploadRagFileRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
RagFile = new RagFile(),
UploadRagFileConfig = new UploadRagFileConfig(),
};
// Make the request
UploadRagFileResponse response = await vertexRagDataServiceClient.UploadRagFileAsync(request);
UploadRagFileAsync(UploadRagFileRequest, CancellationToken)
public virtual Task<UploadRagFileResponse> UploadRagFileAsync(UploadRagFileRequest request, CancellationToken cancellationToken)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
request |
UploadRagFileRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUploadRagFileResponse |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
UploadRagFileRequest request = new UploadRagFileRequest
{
ParentAsRagCorpusName = RagCorpusName.FromProjectLocationRagCorpus("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]"),
RagFile = new RagFile(),
UploadRagFileConfig = new UploadRagFileConfig(),
};
// Make the request
UploadRagFileResponse response = await vertexRagDataServiceClient.UploadRagFileAsync(request);
UploadRagFileAsync(string, RagFile, UploadRagFileConfig, CallSettings)
public virtual Task<UploadRagFileResponse> UploadRagFileAsync(string parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig, CallSettings callSettings = null)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The name of the RagCorpus resource into which to upload the file.
Format:
|
ragFile |
RagFile Required. The RagFile to upload. |
uploadRagFileConfig |
UploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskUploadRagFileResponse |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
RagFile ragFile = new RagFile();
UploadRagFileConfig uploadRagFileConfig = new UploadRagFileConfig();
// Make the request
UploadRagFileResponse response = await vertexRagDataServiceClient.UploadRagFileAsync(parent, ragFile, uploadRagFileConfig);
UploadRagFileAsync(string, RagFile, UploadRagFileConfig, CancellationToken)
public virtual Task<UploadRagFileResponse> UploadRagFileAsync(string parent, RagFile ragFile, UploadRagFileConfig uploadRagFileConfig, CancellationToken cancellationToken)
Upload a file into a RagCorpus.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The name of the RagCorpus resource into which to upload the file.
Format:
|
ragFile |
RagFile Required. The RagFile to upload. |
uploadRagFileConfig |
UploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1beta1.VertexRagDataService.UploadRagFile]. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskUploadRagFileResponse |
A Task containing the RPC response. |
// Create client
VertexRagDataServiceClient vertexRagDataServiceClient = await VertexRagDataServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/ragCorpora/[RAG_CORPUS]";
RagFile ragFile = new RagFile();
UploadRagFileConfig uploadRagFileConfig = new UploadRagFileConfig();
// Make the request
UploadRagFileResponse response = await vertexRagDataServiceClient.UploadRagFileAsync(parent, ragFile, uploadRagFileConfig);