openai

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAIProvider

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

OpenAIProvider implements the Provider interface for OpenAI-compatible APIs.

func NewProvider

func NewProvider(id, apiKey, baseURL string) *OpenAIProvider

NewProvider creates a new OpenAIProvider.

func (*OpenAIProvider) Generate

Generate streams responses for the given conversation.

func (*OpenAIProvider) ID

func (p *OpenAIProvider) ID() string

ID returns the provider ID.

func (*OpenAIProvider) ListModels

func (p *OpenAIProvider) ListModels(ctx context.Context) ([]provider.ModelInfo, error)

ListModels returns a list of available models.

Jump to

Keyboard shortcuts

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