powered by
Shortcut that creates an OpenAI client from the OPENAI_API_KEY environment variable and retrieves a vector store by its ID.
OPENAI_API_KEY
retrieve_vector_store(vector_store_id)
A vector store object with $id, $name, $status, and $file_counts.
$id
$name
$status
$file_counts
Character. Required. The vector store ID (e.g. "vs_abc123").
"vs_abc123"
if (FALSE) { Sys.setenv(OPENAI_API_KEY = "sk-xxxxxx") vs <- retrieve_vector_store("vs_abc123") cat("Name:", vs$name) cat("Files:", vs$file_counts$completed, "ready") }
Run the code above in your browser using DataLab