llm

package
v0.0.0-...-4101898 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"llm",
	fx.Provide(fx.Annotate(NewService, fx.As(new(Chater)))),
)

Functions

This section is empty.

Types

type Chater

type Chater interface {
	Chat(ctx context.Context, systemContent, userContent string) (string, error)
}

Chater is an interface that defines a method to complete an LLM chat message.

type Service

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

func NewService

func NewService(cfg config.LLMConfig) *Service

func (*Service) Chat

func (s *Service) Chat(
	ctx context.Context,
	systemContent, userContent string,
) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳