OpenAIClientExtensions.CreateVectorStoreAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a vector store asynchronously.
public static System.Threading.Tasks.Task<string> CreateVectorStoreAsync(this OpenAI.OpenAIClient client, System.Collections.Generic.IEnumerable<string> fileIds, bool waitUntilCompleted = true, string? storeName = default, OpenAI.VectorStores.VectorStoreExpirationPolicy? expirationPolicy = default, OpenAI.VectorStores.FileChunkingStrategy? chunkingStrategy = default, System.Collections.Generic.IReadOnlyDictionary<string,string>? metadata = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateVectorStoreAsync : OpenAI.OpenAIClient * seq<string> * bool * string * OpenAI.VectorStores.VectorStoreExpirationPolicy * OpenAI.VectorStores.FileChunkingStrategy * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
<Extension()>
Public Function CreateVectorStoreAsync (client As OpenAIClient, fileIds As IEnumerable(Of String), Optional waitUntilCompleted As Boolean = true, Optional storeName As String = Nothing, Optional expirationPolicy As VectorStoreExpirationPolicy = Nothing, Optional chunkingStrategy As FileChunkingStrategy = Nothing, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Parameters
- client
- OpenAI.OpenAIClient
The OpenAI client instance.
- fileIds
- IEnumerable<String>
The collection of file identifiers to include in the vector store.
- waitUntilCompleted
- Boolean
Indicates whether to wait until the operation is completed.
- storeName
- String
The name of the vector store.
- expirationPolicy
- OpenAI.VectorStores.VectorStoreExpirationPolicy
The expiration policy for the vector store.
- chunkingStrategy
- OpenAI.VectorStores.FileChunkingStrategy
The chunking strategy for the vector store.
- metadata
- IReadOnlyDictionary<String,String>
The metadata associated with the vector store.
- cancellationToken
- CancellationToken
The cancellation token to monitor for cancellation requests.
Returns
The identifier of the created vector store.