Create vector store file
vector_stores.files.create(vector_store_id, **kwargs) -> VectorStoreFile { id, created_at, last_error, 6 more }
POST/vector_stores/{vector_store_id}/files
Create a vector store file by attaching a File to a vector store.
Parameters
vector_store_id: String
file_id: String
A File ID that the vector store should use. Useful for tools like file_search that can access files.
Returns
Create vector store file
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
vector_store_file = openai.vector_stores.files.create("vs_abc123", file_id: "file_id")
puts(vector_store_file){
"id": "id",
"created_at": 0,
"last_error": {
"code": "server_error",
"message": "message"
},
"object": "vector_store.file",
"status": "in_progress",
"usage_bytes": 0,
"vector_store_id": "vector_store_id",
"attributes": {
"foo": "string"
},
"chunking_strategy": {
"static": {
"chunk_overlap_tokens": 0,
"max_chunk_size_tokens": 100
},
"type": "static"
}
}Returns Examples
{
"id": "id",
"created_at": 0,
"last_error": {
"code": "server_error",
"message": "message"
},
"object": "vector_store.file",
"status": "in_progress",
"usage_bytes": 0,
"vector_store_id": "vector_store_id",
"attributes": {
"foo": "string"
},
"chunking_strategy": {
"static": {
"chunk_overlap_tokens": 0,
"max_chunk_size_tokens": 100
},
"type": "static"
}
}