openai

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewAzureClient added in v0.3.0

func NewAzureClient(ctx context.Context, model, key, baseURL, path string, proxyURL ...string) *Client

func NewClient

func NewClient(ctx context.Context, model, key, baseURL, path string, proxyURL ...string) *Client

func (*Client) ChatCompletion

func (c *Client) ChatCompletion(ctx context.Context, request model.ChatCompletionRequest) (res model.ChatCompletionResponse, err error)

func (*Client) ChatCompletionStream

func (c *Client) ChatCompletionStream(ctx context.Context, request model.ChatCompletionRequest) (responseChan chan *model.ChatCompletionResponse, err error)

func (*Client) Image

func (c *Client) Image(ctx context.Context, request model.ImageRequest) (res model.ImageResponse, err error)

Jump to

Keyboard shortcuts

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