Documentation
¶
Overview ¶
Package xai provides a xai LLM provider for langrails.
It uses an OpenAI-compatible API and is a thin wrapper around the compat package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option configures the provider.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements langrails.Provider for xAI's API.
func (*Provider) Complete ¶
func (p *Provider) Complete(ctx context.Context, req *langrails.CompletionRequest) (*langrails.CompletionResponse, error)
func (*Provider) Stream ¶
func (p *Provider) Stream(ctx context.Context, req *langrails.CompletionRequest) (<-chan langrails.StreamEvent, error)
Click to show internal directories.
Click to hide internal directories.