TsgcHTTP_API_OpenAIMethods › RetrieveVectorStore

RetrieveVectorStore Method

Retrieves a vector store by its identifier

Syntax

function RetrieveVectorStore(const aVectorStoreId: string) : TsgcOpenAIClass_VectorStore;

Parameters

NameTypeDescription
aVectorStoreIdconst stringThe identifier of the vector store to retrieve (e.g. vs_abc123).

Return Value

The vector store object with current file counts, byte usage and expiration data (TsgcOpenAIClass_VectorStore)

Remarks

Calls GET /v1/vector_stores/{vector_store_id} to return the current state of a vector store. Inspect FileCounts to monitor how many attached files are still being processed versus ready for search.

Example

var oStore: TsgcOpenAIClass_VectorStore;
begin
  oStore := oAPI.RetrieveVectorStore('vs_abc123');
  ShowMessage(oStore.Name + ' (' + IntToStr(oStore.FileCounts.Total) + ' files)');
end;

Back to Methods