openai package - github.com/CarriedWorldUniverse/bridle/provider/openai - Go Packages

openai

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package openai implements the bridle Provider interface for the OpenAI API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider implements bridle.Provider for the OpenAI API.

func New

func New(apiKey string) *Provider

New returns an OpenAI provider. If apiKey is empty, the OPENAI_API_KEY environment variable is used.

func NewWithClient

func NewWithClient(client *openai.Client) *Provider

NewWithClient returns an OpenAI provider using a pre-configured client.

func (*Provider) Capabilities

func (p *Provider) Capabilities() bridle.ProviderCapabilities

func (*Provider) Name

func (p *Provider) Name() bridle.ProviderID

func (*Provider) RunTurn

RunTurn calls the OpenAI Chat Completions API and emits bridle events to sink.

Jump to

Keyboard shortcuts

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