List models
package main
import (
"context"
"fmt"
"github.com/cadenya/cadenya-go"
"github.com/cadenya/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Models.List(context.TODO(), cadenya.ModelListParams{
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"family": "family",
"inputPricePerMillionTokens": "inputPricePerMillionTokens",
"maxInputTokens": 0,
"maxOutputTokens": 0,
"outputPricePerMillionTokens": "outputPricePerMillionTokens",
"provider": "provider",
"status": "MODEL_STATUS_UNSPECIFIED"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"family": "family",
"inputPricePerMillionTokens": "inputPricePerMillionTokens",
"maxInputTokens": 0,
"maxOutputTokens": 0,
"outputPricePerMillionTokens": "outputPricePerMillionTokens",
"provider": "provider",
"status": "MODEL_STATUS_UNSPECIFIED"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}