llm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLM

type LLM interface {
	CreateChatCompletion(context.Context, string, []*db.Message) (string, error)
	CreateChatCompletionStream(context.Context, string, []*db.Message) (io.ReadCloser, error)
	SetAPIKey(string) error
}

TODO: fix coupling with db message

type Mock

type Mock struct{}

func NewMock

func NewMock() *Mock

func (*Mock) CreateChatCompletion

func (m *Mock) CreateChatCompletion(ctx context.Context, model, input string) (string, error)

func (*Mock) CreateChatCompletionStream

func (m *Mock) CreateChatCompletionStream(ctx context.Context, model, input string) (io.ReadCloser, error)

func (*Mock) SetAPIKey

func (m *Mock) SetAPIKey(string) error

Jump to

Keyboard shortcuts

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