Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBaseURL = "https://api.typesafe.ai" OpenRouterDefaultBaseURL = "https://openrouter.ai" )
Variables ¶
This section is empty.
Functions ¶
func IsTokenLimitError ¶
Types ¶
type Client ¶
type Client interface {
Evaluate(context.Context, EvaluationRequest) (EvaluationResponse, error)
Stats() Stats
}
type EvaluationRequest ¶
type EvaluationRequest struct {
Model string `json:"model"`
State string `json:"state"`
Questions []Question `json:"questions"`
StructuredState json.RawMessage `json:"structured_state,omitempty"`
}
type EvaluationResponse ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(options HTTPOptions) (*HTTPClient, error)
func NewOpenRouterClient ¶
func NewOpenRouterClient(options HTTPOptions) (*HTTPClient, error)
func NewProviderClient ¶
func NewProviderClient(provider string, options HTTPOptions) (*HTTPClient, error)
func (*HTTPClient) Evaluate ¶
func (c *HTTPClient) Evaluate(ctx context.Context, request EvaluationRequest) (EvaluationResponse, error)
func (*HTTPClient) Stats ¶
func (c *HTTPClient) Stats() Stats
type HTTPOptions ¶
type Question ¶
type Question struct {
ID string `json:"id"`
Instructions string `json:"instructions"`
Criteria *decision.NoulCriteria `json:"criteria,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.