openai

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Overview

Package openai adapts OpenAI-compatible Chat Completions APIs to enno.Provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey  string
	BaseURL string
	Model   string
	// MaxHTTPRetries overrides the SDK HTTP retry count when positive (option.WithMaxRetries).
	// Zero selects defaultHTTPMaxRetries. The SDK retries 429, 5xx, timeouts, and connection errors.
	MaxHTTPRetries int
	// HTTPProxy is an optional proxy URL (http(s):// or socks5://). Empty uses SDK default (environment proxy vars still apply).
	HTTPProxy string
}

type Provider

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

func New

func New(config Config) (*Provider, error)

func (*Provider) Complete

func (p *Provider) Complete(ctx context.Context, req enno.Request) (enno.Response, error)

func (*Provider) Stream added in v0.7.0

func (p *Provider) Stream(ctx context.Context, req enno.Request) (enno.Stream, error)

Jump to

Keyboard shortcuts

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