xai

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 4 Imported by: 0

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

type Option func(*compat.Config)

Option configures the provider.

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL sets a custom base URL.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

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 New

func New(apiKey string, opts ...Option) *Provider

New creates a new xAI provider.

func (*Provider) Complete

func (*Provider) Stream

Jump to

Keyboard shortcuts

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