vector_store_files
Creates, updates, deletes, gets or lists a vector_store_files
resource.
Overview
Name | vector_store_files |
Type | Resource |
Id | openai.vector_stores.vector_store_files |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The identifier, which can be referenced in API endpoints. |
chunking_strategy | object | The strategy used to chunk the file. |
created_at | integer | The Unix timestamp (in seconds) for when the vector store file was created. |
last_error | object | The last error associated with this vector store file. Will be null if there are no errors. |
object | string | The object type, which is always vector_store.file . |
status | string | The status of the vector store file, which can be either in_progress , completed , cancelled , or failed . The status completed indicates that the vector store file is ready for use. |
usage_bytes | integer | The total vector store usage in bytes. Note that this may be different from the original file size. |
vector_store_id | string | The ID of the vector store that the File is attached to. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_vector_store_file | SELECT | file_id, vector_store_id | |
list_vector_store_files | SELECT | vector_store_id | |
create_vector_store_file | INSERT | vector_store_id, data__file_id | |
delete_vector_store_file | DELETE | file_id, vector_store_id |
SELECT
examples
SELECT
id,
chunking_strategy,
created_at,
last_error,
object,
status,
usage_bytes,
vector_store_id
FROM openai.vector_stores.vector_store_files
WHERE vector_store_id = '{{ vector_store_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new vector_store_files
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO openai.vector_stores.vector_store_files (
data__file_id,
data__chunking_strategy,
vector_store_id
)
SELECT
'{{ file_id }}',
'{{ chunking_strategy }}',
'{{ vector_store_id }}'
;
/*+ create */
INSERT INTO openai.vector_stores.vector_store_files (
data__file_id,
vector_store_id
)
SELECT
'{{ file_id }}',
'{{ vector_store_id }}'
;
- name: vector_store_files
props:
- name: vector_store_id
value: string
- name: data__file_id
value: string
- name: file_id
value: string
- name: chunking_strategy
props:
- name: type
value: string
DELETE
example
Deletes the specified vector_store_files
resource.
/*+ delete */
DELETE FROM openai.vector_stores.vector_store_files
WHERE file_id = '{{ file_id }}'
AND vector_store_id = '{{ vector_store_id }}';