model

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapabilityRepairCode added in v0.6.0

type CapabilityRepairCode interface {
	// RepairCode queries the model to repair a source code with compilation error.
	RepairCode(ctx Context) (assessments metrics.Assessments, err error)
}

CapabilityRepairCode defines the capability of a model to repair code.

type CapabilityTranspile added in v0.6.0

type CapabilityTranspile interface {
	// Transpile queries the model to transpile source code to another language.
	Transpile(ctx Context) (assessments metrics.Assessments, err error)
}

CapabilityTranspile defines the capability of a model to transpile code.

type CapabilityWriteTests added in v0.6.0

type CapabilityWriteTests interface {
	// WriteTests generates test files for the given implementation file in a repository.
	WriteTests(ctx Context) (assessments metrics.Assessments, err error)
}

CapabilityWriteTests defines the capability of a model to generate tests.

type Context added in v0.6.0

type Context struct {
	// Language holds the language for which the task should be evaluated.
	Language language.Language

	// RepositoryPath holds the absolute path to the repository.
	RepositoryPath string
	// FilePath holds the path to the file the model should act on.
	FilePath string

	// Arguments holds extra data that can be used in a query prompt.
	Arguments any

	// Logger is used for logging during evaluation.
	Logger *log.Logger
}

Context holds the data needed by a model for running a task.

type Model

type Model interface {
	// ID returns the unique ID of this model.
	ID() (id string)
}

Model defines a model that can be queried for generations.

type SetQueryAttempts added in v0.5.0

type SetQueryAttempts interface {
	// SetQueryAttempts sets the number of query attempts to perform when a model request errors in the process of solving a task.
	SetQueryAttempts(attempts uint)
}

SetQueryAttempts defines a model that can set the number of query attempts when a model request errors in the process of solving a task.

Directories

Path Synopsis
llm

Jump to

Keyboard shortcuts

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