openai

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "openai"

	ModelGPT4o     = "gpt-4o"
	ModelGPT4oMini = "gpt-4o-mini"

	DefaultModel = ModelGPT4o
)

Variables

This section is empty.

Functions

func IsModelSupported

func IsModelSupported(model string) bool

func Models

func Models() []string

Types

type Client

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

func (*Client) ContextWindow

func (c *Client) ContextWindow(model string) int

func (*Client) DefaultModel

func (c *Client) DefaultModel() string

func (*Client) EstimateTokens

func (c *Client) EstimateTokens(s string) int

func (*Client) Name

func (c *Client) Name() string

func (*Client) Pricing

func (c *Client) Pricing(model string) provider.Pricing

func (*Client) Review

func (c *Client) Review(ctx context.Context, req provider.Request) (provider.Response, error)

func (*Client) ReviewStream

func (c *Client) ReviewStream(ctx context.Context, req provider.Request) (<-chan provider.Event, error)

func (*Client) TestConnection

func (c *Client) TestConnection(ctx context.Context) error

Jump to

Keyboard shortcuts

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