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.
Click to show internal directories.
Click to hide internal directories.