providers

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package providers selects the wire protocol for the enhancer's model provider. It is the single place that maps a protocol-neutral Spec onto a concrete enhancer.Provider (OpenAI-compatible or Anthropic), so cmd entrypoints stay protocol-agnostic and the enhancer core never learns about HTTP schemas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s Spec) (enhancer.Provider, error)

New builds the enhancer.Provider for the spec's protocol. Unknown/empty Provider defaults to the OpenAI-compatible client, preserving prior behaviour.

Types

type Spec

type Spec struct {
	Provider  string
	BaseURL   string
	APIKey    string
	Model     string
	Timeout   time.Duration
	MaxTokens int
}

Spec is the protocol-neutral provider configuration. Provider selects the wire protocol; the rest are shared connection fields. MaxTokens is only consumed by providers that require it (Anthropic).

Directories

Path Synopsis
Package anthropic implements enhancer.Provider against the Anthropic Messages API (POST /v1/messages), for gateways that only speak Anthropic's protocol rather than the OpenAI /v1/chat/completions schema.
Package anthropic implements enhancer.Provider against the Anthropic Messages API (POST /v1/messages), for gateways that only speak Anthropic's protocol rather than the OpenAI /v1/chat/completions schema.
Package useragent centralizes the HTTP User-Agent openPE presents to model gateways.
Package useragent centralizes the HTTP User-Agent openPE presents to model gateways.

Jump to

Keyboard shortcuts

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