openai

package
v1.4.63 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*common.Configurable
	ApiKey     *common.SetupQuestion
	ApiBaseURL *common.SetupQuestion
	ApiClient  *openai.Client
}

func NewClient

func NewClient() (ret *Client)

func NewClientCompatible

func NewClientCompatible(vendorName string, defaultBaseUrl string, configureCustom func() error) (ret *Client)

func (*Client) ListModels

func (o *Client) ListModels() (ret []string, err error)

func (*Client) Send

func (o *Client) Send(ctx context.Context, msgs []*common.Message, opts *common.ChatOptions) (ret string, err error)

func (*Client) SendStream

func (o *Client) SendStream(
	msgs []*common.Message, opts *common.ChatOptions, channel chan string,
) (err error)

Jump to

Keyboard shortcuts

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