requesty

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package requesty provides a Requesty language model implementation for GoAI.

Requesty is a unified, OpenAI-compatible LLM gateway that routes to multiple providers through a single endpoint, with caching, failover, and cost optimization. See https://requesty.ai and https://docs.requesty.ai.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(modelID string, opts ...Option) provider.LanguageModel

Chat creates a Requesty language model for the given model ID.

Model IDs use the provider/model naming convention, e.g. "openai/gpt-4o-mini" or "anthropic/claude-sonnet-4-5".

Types

type Option

type Option func(*options)

Option configures the Requesty provider.

func WithAPIKey

func WithAPIKey(key string) Option

WithAPIKey sets a static API key for authentication.

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL overrides the default API base URL.

func WithHTTPClient

func WithHTTPClient(c *http.Client) Option

WithHTTPClient sets a custom HTTP client for all requests.

func WithHeaders

func WithHeaders(h map[string]string) Option

WithHeaders sets additional HTTP headers sent with every request.

func WithTokenSource

func WithTokenSource(ts provider.TokenSource) Option

WithTokenSource sets a dynamic token source for authentication.

Jump to

Keyboard shortcuts

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