Documentation
¶
Overview ¶
Package benchgecko provides an official Go client for the BenchGecko API.
BenchGecko tracks every major AI model, benchmark, and provider. This package wraps the public REST API so you can query model data, benchmark scores, and run comparisons from Go applications.
Quick start:
client := benchgecko.NewClient(nil)
models, err := client.Models()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Tracking %d models\n", len(models))
Index ¶
Constants ¶
View Source
const ( // DefaultBaseURL is the default BenchGecko API base URL. DefaultBaseURL = "https://benchgecko.ai" // Version is the SDK version. Version = "0.1.0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Benchmark ¶
type Benchmark struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Slug string `json:"slug,omitempty"`
Category string `json:"category,omitempty"`
Extra map[string]interface{} `json:"-"`
}
Benchmark represents a benchmark tracked by BenchGecko.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the BenchGecko API client.
func NewClient ¶
func NewClient(opts *ClientOptions) *Client
NewClient creates a new BenchGecko API client. Pass nil for default options.
func (*Client) Benchmarks ¶
Benchmarks returns all benchmarks tracked by BenchGecko.
type ClientOptions ¶
type ClientOptions struct {
// BaseURL overrides the default API URL. Leave empty for production.
BaseURL string
// Timeout sets the HTTP request timeout. Defaults to 30 seconds.
Timeout time.Duration
// HTTPClient allows providing a custom http.Client.
HTTPClient *http.Client
}
ClientOptions configures the BenchGecko client.
type ComparisonResult ¶
type ComparisonResult struct {
Models []json.RawMessage `json:"models,omitempty"`
Extra map[string]interface{} `json:"-"`
}
ComparisonResult holds the result of comparing two or more models.
Click to show internal directories.
Click to hide internal directories.