v2026.5.3
All Bundles
Bundle OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai.

VectorStoreFile

Vector store files represent files inside a vector store

Inherits: EndPoint
store := API.OpenAI.VectorStore->Load(store_id, token);
file := API.OpenAI.File->Load(file_id, token);
if(store <> Nil & file <> Nil) {
  VectorStoreFile->Create(file, store, token)->ToString()->PrintLine();
};

Operations

Create # function

Create a vector store

function : Create(file:API.OpenAI.File, store:VectorStore, token:String) ~ VectorStoreFile

Parameters

NameTypeDescription
fileFilefile to add to store
storeVectorStorestore to add file to
tokenStringAPI token

Return

TypeDescription
VectorStoreFilevector store file

Delete # function

Deletes a file store

function : Delete(store_file_id:String, store:VectorStore, token:String) ~ Bool

Parameters

NameTypeDescription
store_file_idStringvector store file ID
storeVectorStorevector store that the files belong to
tokenStringAPI token

Return

TypeDescription
Booltrue if successful, false otherwise

GetBytes #

Get the store's usage in bytes

method : public : GetBytes() ~ Int

Return

TypeDescription
Intstore's usage in bytes

GetCreatedAt #

Unix timestamp (in seconds) of when the object instance was created

method : public : GetCreatedAt() ~ Int

Return

TypeDescription
Inttime with the object instance was created

GetId #

Get object instance API ID

method : public : GetId() ~ String

Return

TypeDescription
Stringinstance ID

GetObject #

Get the object type

method : public : GetObject() ~ String

Return

TypeDescription
Stringobject type

GetStatus #

Get the store's status

method : public : GetStatus() ~ String

Return

TypeDescription
Stringstore's status

GetVectorStore #

Get vector store

method : public : GetVectorStore() ~ VectorStore

Return

TypeDescription
VectorStorevector store

ListStoreFiles # function

Lists vector store files

function : ListStoreFiles(store:VectorStore, token:String) ~ Vector<VectorStoreFile>

Parameters

NameTypeDescription
storeVectorStorevector store that the files belong to
tokenStringAPI token

Return

TypeDescription
Vector<VectorStoreFile>list of vector store files

Load # function

Loads vector store file

function : Load(store_file_id:String, store:VectorStore, token:String) ~ VectorStoreFile

Parameters

NameTypeDescription
store_file_idStringvector store file ID
storeVectorStorevector store that the files belong to
tokenStringAPI token

Return

TypeDescription
VectorStoreFilestore file

ToString #

String representation of the object

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation