List Vector Stores
client.VectorStores.List(ctx, query) (*CursorPageByName[VectorStore], error)
GET/v5/vector-stores
List all vector stores in your account with pagination.
Returns vector stores sorted by creation date (newest first). Each store includes its configuration, embedding model, dimensions, indexed fields, and timestamps.
List Vector Stores
package main
import (
"context"
"fmt"
"github.com/scaleapi/sgp-dev-go"
"github.com/scaleapi/sgp-dev-go/option"
)
func main() {
client := sgpdev.NewClient(
option.WithAPIKey("My API Key"),
option.WithAccountID("My Account ID"),
)
page, err := client.VectorStores.List(context.TODO(), sgpdev.VectorStoreListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"has_more": true,
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"embedding_dimensions": 0,
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z",
"embedding_config": {
"model_deployment_id": "model_deployment_id",
"type": "models_api"
},
"indexed_metadata_fields": {
"foo": "string"
}
}
],
"total": 0,
"limit": 0,
"object": "list"
}Returns Examples
{
"has_more": true,
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"embedding_dimensions": 0,
"name": "name",
"updated_at": "2019-12-27T18:11:19.117Z",
"embedding_config": {
"model_deployment_id": "model_deployment_id",
"type": "models_api"
},
"indexed_metadata_fields": {
"foo": "string"
}
}
],
"total": 0,
"limit": 0,
"object": "list"
}