openai

package
v0.0.0-...-90abbe5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVisionModel = openai.GPT4VisionPreview
	DefaultModel       = openai.GPT4TurboPreview
	DefaultMaxTokens   = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() (*Client, error)

func (*Client) Call

func (c *Client) Call(ctx context.Context, k8s kclient.Client, namespace string, messageRequest CompletionRequest, status chan<- v1.MessageBody) (*v1.MessageBody, error)

type CompletionRequest

type CompletionRequest struct {
	Model        string
	Vision       bool
	Tools        []v1.Tool
	Messages     []v1.MessageBody
	MaxToken     int
	JSONResponse bool
	Cache        *bool
}

Jump to

Keyboard shortcuts

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