Learn R Programming

openaiRtools (version 0.2.2)

VectorStoresClient: Vector Stores Client (Beta)

Description

A vector store automatically chunks, embeds, and indexes files so that an Assistant with the file_search tool can search over them using natural language queries.

Arguments

Sub-clients

$files

VectorStoreFilesClient — Add/remove files from a store

$file_batches

VectorStoreFileBatchesClient — Batch-add files

Typical workflow

  1. Upload files: client$files$create(file, purpose = "assistants")

  2. Create vector store: client$vector_stores$create(name = "...")

  3. Add files: client$vector_stores$files$create(store_id, file_id)

  4. Attach to assistant via tool_resources in client$assistants$create()

Methods


Method new()

Usage

VectorStoresClient$new(parent)


Method create()

Usage

VectorStoresClient$create(
  name = NULL,
  file_ids = NULL,
  expires_after = NULL,
  chunking_strategy = NULL,
  metadata = NULL
)


Method list()

Usage

VectorStoresClient$list(
  limit = NULL,
  order = NULL,
  after = NULL,
  before = NULL
)


Method retrieve()

Usage

VectorStoresClient$retrieve(vector_store_id)


Method update()

Usage

VectorStoresClient$update(vector_store_id, ...)


Method delete()

Usage

VectorStoresClient$delete(vector_store_id)


Method search()

Usage

VectorStoresClient$search(
  vector_store_id,
  query,
  filter = NULL,
  max_num_results = NULL,
  ranking_options = NULL,
  rewrite_query = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

VectorStoresClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Client for the OpenAI Vector Stores API v2 (Beta). Vector stores enable semantic file search for Assistants. Access via client$vector_stores.