Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 7 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 {
	*bootstrap.ClientRef

	Samples *Samples
	// contains filtered or unexported fields
}

func Get

func Get(clientRef *bootstrap.ClientRef) *Client

func (*Client) Completion

func (c *Client) Completion(ctx context.Context, params openai.ChatCompletionNewParams) (
	*openai.ChatCompletion, error,
)

func (Client) GetModel

func (c Client) GetModel(ctx context.Context, tier ModelTier) string

type ModelTier

type ModelTier int
const (
	Tier1 ModelTier = iota + 1
)

type Samples

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

Samples implements a cheesy way to estimate the number of bytes per token registered through several calls to the LLM service.

func (*Samples) BytesPerTok

func (s *Samples) BytesPerTok() float32

Jump to

Keyboard shortcuts

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