llm

package
v0.9.5-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Call(ctx context.Context, messageRequest types.CompletionRequest, status chan<- types.CompletionStatus) (*types.CompletionMessage, error)
	ListModels(ctx context.Context, providers ...string) (result []string, _ error)
	Supports(ctx context.Context, modelName string) (bool, error)
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) AddClient

func (r *Registry) AddClient(client Client) error

func (*Registry) Call

func (r *Registry) Call(ctx context.Context, messageRequest types.CompletionRequest, status chan<- types.CompletionStatus) (*types.CompletionMessage, error)

func (*Registry) ListModels

func (r *Registry) ListModels(ctx context.Context, providers ...string) (result []string, _ error)

func (*Registry) ProxyInfo added in v0.9.5

func (r *Registry) ProxyInfo() (string, string, error)

func (*Registry) ServeHTTP added in v0.9.5

func (r *Registry) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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