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
file_id: String
A File ID that the vector store should use. Useful for tools like file_search that can access files. For multi-file ingestion, we recommend file_batches to minimize per-vector-store write requests.
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": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"usage_bytes": 1234,
"vector_store_id": "vs_abcd",
"status": "completed",
"last_error": null
}
Returns Examples
{
"id": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"usage_bytes": 1234,
"vector_store_id": "vs_abcd",
"status": "completed",
"last_error": null
}