TsgcHTTP_API_OpenAI › Methods › ModifyVectorStore
Updates the name, expiration policy or metadata of an existing vector store
function ModifyVectorStore(const aVectorStoreId: string; const aVectorStore: TsgcOpenAIClass_Request_VectorStore) : TsgcOpenAIClass_VectorStore;
| Name | Type | Description |
|---|---|---|
aVectorStoreId | const string | The identifier of the vector store to modify. |
aVectorStore | const TsgcOpenAIClass_Request_VectorStore | Mutable fields: Name, ExpiresAfter and Metadata. |
The updated vector store object (TsgcOpenAIClass_VectorStore)
Calls POST /v1/vector_stores/{vector_store_id}. Only name, expires_after and metadata can be changed after creation; to manage files use the dedicated VectorStoreFile endpoints. Omitted fields retain their previous values.
var oRequest: TsgcOpenAIClass_Request_VectorStore;
begin
oRequest := TsgcOpenAIClass_Request_VectorStore.Create;
try
oRequest.Name := 'Product Manuals v2';
oAPI.ModifyVectorStore('vs_abc123', oRequest);
finally
oRequest.Free;
end;
end;