generator

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"generator",
	fx.Provide(NewService),
)

Functions

This section is empty.

Types

type Service

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

Service represents the service that generates questions via LLMs.

func NewService

func NewService(
	quizoryClient proto.QuizoryServiceClient,
	llm llm.Chater,
	meter otel.Meter,
) *Service

NewService creates a new instance of question.Service.

func (Service) GenerateBatch

func (s Service) GenerateBatch(ctx context.Context, batchSize int, topic enums.Topic) (err error)

GenerateBatch generates and persists a batch of questions about the given topic.

Jump to

Keyboard shortcuts

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