Compartilhar via


AgentsClient.CreateVectorStoreFileAsync Method

Definition

Overloads

CreateVectorStoreFileAsync(String, RequestContent, RequestContext)

[Protocol Method] Create a vector store file by attaching a file to a vector store.

CreateVectorStoreFileAsync(String, String, IEnumerable<VectorStoreDataSource>, VectorStoreChunkingStrategyRequest, CancellationToken)

Create a vector store file by attaching a file to a vector store.

CreateVectorStoreFileAsync(String, RequestContent, RequestContext)

Source:
AgentsClient.cs

[Protocol Method] Create a vector store file by attaching a file to a vector store.

public virtual System.Threading.Tasks.Task<Azure.Response> CreateVectorStoreFileAsync (string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member CreateVectorStoreFileAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CreateVectorStoreFileAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function CreateVectorStoreFileAsync (vectorStoreId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

vectorStoreId
String

Identifier of the vector store.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

vectorStoreId or content is null.

vectorStoreId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

CreateVectorStoreFileAsync(String, String, IEnumerable<VectorStoreDataSource>, VectorStoreChunkingStrategyRequest, CancellationToken)

Source:
AgentsClient.cs

Create a vector store file by attaching a file to a vector store.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.VectorStoreFile>> CreateVectorStoreFileAsync (string vectorStoreId, string fileId = default, System.Collections.Generic.IEnumerable<Azure.AI.Projects.VectorStoreDataSource> dataSources = default, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateVectorStoreFileAsync : string * string * seq<Azure.AI.Projects.VectorStoreDataSource> * Azure.AI.Projects.VectorStoreChunkingStrategyRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.VectorStoreFile>>
override this.CreateVectorStoreFileAsync : string * string * seq<Azure.AI.Projects.VectorStoreDataSource> * Azure.AI.Projects.VectorStoreChunkingStrategyRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.VectorStoreFile>>
Public Overridable Function CreateVectorStoreFileAsync (vectorStoreId As String, Optional fileId As String = Nothing, Optional dataSources As IEnumerable(Of VectorStoreDataSource) = Nothing, Optional chunkingStrategy As VectorStoreChunkingStrategyRequest = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of VectorStoreFile))

Parameters

vectorStoreId
String

Identifier of the vector store.

fileId
String

Identifier of the file.

dataSources
IEnumerable<VectorStoreDataSource>

Azure asset ID.

chunkingStrategy
VectorStoreChunkingStrategyRequest

The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

vectorStoreId is null.

vectorStoreId is an empty string, and was expected to be non-empty.

Applies to