TsgcHTTP_API_OpenAI › Methods › RetrieveVectorStoreFile
Retrieves the status of a file attached to a vector store
function RetrieveVectorStoreFile(const aVectorStoreId, aFileId: string) : TsgcOpenAIClass_VectorStoreFile;
| Name | Type | Description |
|---|---|---|
aVectorStoreId | const string | The identifier of the vector store that contains the file. |
aFileId | const string | The identifier of the file within the vector store. |
The VectorStoreFile object with its current indexing Status and any processing errors (TsgcOpenAIClass_VectorStoreFile)
Calls GET /v1/vector_stores/{vector_store_id}/files/{file_id} to inspect the indexing state of a single file. Poll until Status is completed before relying on the file for search, or read LastError when it reports failed.
var oFile: TsgcOpenAIClass_VectorStoreFile;
begin
oFile := oAPI.RetrieveVectorStoreFile('vs_abc123', 'file_abc123');
ShowMessage(oFile.Id + ' / ' + oFile.Status);
end;