VectorStoreFile
Vector store files represent files inside a vector store
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
Create a vector store
function : Create(file:API.OpenAI.File, store:VectorStore, token:String) ~ VectorStoreFileParameters
| Name | Type | Description |
|---|---|---|
| file | File | file to add to store |
| store | VectorStore | store to add file to |
| token | String | API token |
Return
| Type | Description |
|---|---|
| VectorStoreFile | vector store file |
Delete
Deletes a file store
function : Delete(store_file_id:String, store:VectorStore, token:String) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| store_file_id | String | vector store file ID |
| store | VectorStore | vector store that the files belong to |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Bool | true if successful, false otherwise |
GetBytes
Get the store's usage in bytes
method : public : GetBytes() ~ IntReturn
| Type | Description |
|---|---|
| Int | store's usage in bytes |
GetCreatedAt
Unix timestamp (in seconds) of when the object instance was created
method : public : GetCreatedAt() ~ IntReturn
| Type | Description |
|---|---|
| Int | time with the object instance was created |
GetId
Get object instance API ID
method : public : GetId() ~ StringReturn
| Type | Description |
|---|---|
| String | instance ID |
GetObject
Get the object type
method : public : GetObject() ~ StringReturn
| Type | Description |
|---|---|
| String | object type |
GetStatus
Get the store's status
method : public : GetStatus() ~ StringReturn
| Type | Description |
|---|---|
| String | store's status |
GetVectorStore
Get vector store
method : public : GetVectorStore() ~ VectorStoreReturn
| Type | Description |
|---|---|
| VectorStore | vector store |
ListStoreFiles
Lists vector store files
function : ListStoreFiles(store:VectorStore, token:String) ~ Vector<VectorStoreFile>Parameters
| Name | Type | Description |
|---|---|---|
| store | VectorStore | vector store that the files belong to |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Vector<VectorStoreFile> | list of vector store files |
Load
Loads vector store file
function : Load(store_file_id:String, store:VectorStore, token:String) ~ VectorStoreFileParameters
| Name | Type | Description |
|---|---|---|
| store_file_id | String | vector store file ID |
| store | VectorStore | vector store that the files belong to |
| token | String | API token |
Return
| Type | Description |
|---|---|
| VectorStoreFile | store file |
ToString
String representation of the object
method : public : ToString() ~ StringReturn
| Type | Description |
|---|---|
| String | string representation |