base

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements a base client with common functionality

func New

func New(config Config) *Client

New creates a new base client

func (*Client) Config

func (c *Client) Config() Config

Config returns the client configuration

func (*Client) HTTPClient

func (c *Client) HTTPClient() *http.Client

HTTPClient returns the underlying HTTP client

func (*Client) Retry

func (c *Client) Retry(ctx context.Context, fn func() error) error

Retry executes a function with retry logic

type Config

type Config struct {
	APIKey      string // API key for the LLM provider
	AuthToken   string // Auth token for the LLM provider (alternative to APIKey)
	Model       string
	BaseURL     string
	Timeout     time.Duration
	MaxRetries  int
	Temperature float64
	MaxTokens   int
}

Config defines common configuration for all LLM clients

Jump to

Keyboard shortcuts

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