xai

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey             string
	Model              string
	BaseURL            string
	EndpointURL        string
	AllowUnsafeURL     bool
	HTTPClient         *http.Client
	UseChatCompletions bool
	Retry              gaugo.RetryConfig
	MaxResponseBody    int64
}

Config configures an xAI judge.

func (Config) Validate

func (cfg Config) Validate() error

Validate reports invalid xAI configuration.

type Judge

type Judge struct {
	// contains filtered or unexported fields
}

Judge evaluates metric prompts with xAI.

func New

func New(cfg Config) (*Judge, error)

New returns a configured xAI judge.

func (*Judge) EvaluateJSON

func (j *Judge) EvaluateJSON(ctx context.Context, req gaugo.JudgeRequest) (gaugo.JudgeResponse, error)

EvaluateJSON evaluates one structured metric request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL