Documentation
¶
Overview ¶
Package api provides a client for interacting with the Braintrust API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is the main API client for Braintrust.
func NewClient ¶
NewClient creates a new Braintrust API client with the given API key and options. The apiKey must be non-empty (validated at config level).
func NewWithHTTPSClient ¶ added in v0.1.0
NewWithHTTPSClient creates a new Braintrust API client with the given https.Client. This is useful for tests that want to use a custom or VCR-wrapped client.
func (*API) Experiments ¶
func (a *API) Experiments() *experiments.API
Experiments is used to access the Experiments API
type Option ¶
type Option func(*options)
Option configures an API client.
func WithAPIURL ¶
WithAPIURL sets the API URL for the client. If not provided, defaults to "https://api.braintrust.dev".
func WithLogger ¶
WithLogger sets a custom logger for the client. If not provided, no logging will occur.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package datasets provides operations for managing Braintrust datasets.
|
Package datasets provides operations for managing Braintrust datasets. |
|
Package experiments provides operations for managing Braintrust experiments.
|
Package experiments provides operations for managing Braintrust experiments. |
|
Package functions provides operations for managing Braintrust functions (prompts, tools, scorers).
|
Package functions provides operations for managing Braintrust functions (prompts, tools, scorers). |
|
Package projects provides operations for managing Braintrust projects.
|
Package projects provides operations for managing Braintrust projects. |