Table of Contents

Class CreateVectorStoreRequest

Namespace
OpenAI.VectorStores
Assembly
OpenAI-DotNet.dll
public sealed class CreateVectorStoreRequest
Inheritance
CreateVectorStoreRequest
Inherited Members

Constructors

CreateVectorStoreRequest(string, IReadOnlyList<FileResponse>, int?, ChunkingStrategy, IReadOnlyDictionary<string, string>)

public CreateVectorStoreRequest(string name, IReadOnlyList<FileResponse> files, int? expiresAfter = null, ChunkingStrategy chunkingStrategy = null, IReadOnlyDictionary<string, string> metadata = null)

Parameters

name string
files IReadOnlyList<FileResponse>
expiresAfter int?
chunkingStrategy ChunkingStrategy
metadata IReadOnlyDictionary<string, string>

CreateVectorStoreRequest(string, IReadOnlyList<string>, int?, ChunkingStrategy, IReadOnlyDictionary<string, string>)

Constructor.

public CreateVectorStoreRequest(string name = null, IReadOnlyList<string> fileIds = null, int? expiresAfter = null, ChunkingStrategy chunkingStrategy = null, IReadOnlyDictionary<string, string> metadata = null)

Parameters

name string

Custom name for the vector store.

fileIds IReadOnlyList<string>

A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.

expiresAfter int?
chunkingStrategy ChunkingStrategy

The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty.

metadata IReadOnlyDictionary<string, string>

Optional, set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.

Properties

ChunkingStrategy

[JsonPropertyName("chunking_strategy")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ChunkingStrategy ChunkingStrategy { get; }

Property Value

ChunkingStrategy

ExpiresAfter

The expiration policy for a vector store.

[JsonPropertyName("expires_after")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ExpirationPolicy ExpiresAfter { get; }

Property Value

ExpirationPolicy

FileIds

A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.

[JsonPropertyName("file_ids")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public IReadOnlyList<string> FileIds { get; }

Property Value

IReadOnlyList<string>

Metadata

Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.

[JsonPropertyName("metadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public IReadOnlyDictionary<string, string> Metadata { get; }

Property Value

IReadOnlyDictionary<string, string>

Name

Custom name for the vector store.

[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Name { get; }

Property Value

string