Retrieve vector store file
client.VectorStores.Files.Get(ctx, vectorStoreID, fileID) (*VectorStoreFile, error)
GET/vector_stores/{vector_store_id}/files/{file_id}
Retrieves a vector store file.
Parameters
vectorStoreID string
fileID string
Returns
Retrieve vector store file
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
vectorStoreFile, err := client.VectorStores.Files.Get(
context.TODO(),
"vs_abc123",
"file-abc123",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", vectorStoreFile.ID)
}
{
"id": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"vector_store_id": "vs_abcd",
"status": "completed",
"last_error": null
}
Returns Examples
{
"id": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"vector_store_id": "vs_abcd",
"status": "completed",
"last_error": null
}