List
List
client.Models.List(ctx) (*[]IDstringCreatedint64ObjectLlamaModelObjectOwnedBystringLlamaModel, error)
get/models
Lists the currently available models, and provides basic information about each one.
Returns
ModelListResponseEnvelopeDatatype
[]IDstringCreatedint64ObjectLlamaModelObjectOwnedBystringLlamaModel
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/-go"
"github.com/stainless-sdks/-go/option"
)
func main() {
client := llamaapi.NewClient(
option.WithAPIKey("My API Key"),
)
llamaModels, err := client.Models.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", llamaModels)
}
200 Example
{
"data": [
{
"id": "id",
"created": 0,
"object": "model",
"owned_by": "owned_by"
}
],
"object": "list"
}