Documentation ¶
Index ¶
Constants ¶
View Source
const ( EvaluateRatingLabel = corev1alpha1.Group + "/rating" EvaluatePipelineRunLabel = corev1alpha1.Group + "/pipelinerun" EvaluateDimensionLabel = corev1alpha1.Group + "/dimension" )
View Source
const DefaultOutputFormat = `json
{"rating": "xxx","assesement": "xxx"}
`
View Source
const (
DefaultPromptTemplate = `` /* 786-byte string literal not displayed */
)
Variables ¶
View Source
var (
ErrEmptyDimension = errors.New("empty dimension")
)
Functions ¶
func OnPromptUpdate ¶
func OnPromptUpdate(logger logr.Logger, c client.Client) func(event.UpdateEvent, workqueue.RateLimitingInterface)
Types ¶
type Data ¶
type Data struct { Owner *corev1alpha1.Rating FromRun string Dimension string Tasks []corev1alpha1.Task OutputFormat string }
+kubebuilder:object:generate=true
func (*Data) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Data.
func (*Data) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EvaluateOptions ¶
type EvaluateOptions struct {
// contains filtered or unexported fields
}
type EvaluateOptionsFunc ¶
type EvaluateOptionsFunc func(*EvaluateOptions)
func WithOutputFormat ¶
func WithOutputFormat(format string) EvaluateOptionsFunc
func WithTemplate ¶
func WithTemplate(template string) EvaluateOptionsFunc
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator implements the Evaluator interface with the help of open
func NewEvaluator ¶
func (*Evaluator) Evaluate ¶
func (evaluator *Evaluator) Evaluate(ctx context.Context, rating *corev1alpha1.Rating, opts ...EvaluateOptionsFunc) error
func (*Evaluator) EvaluateWithData ¶
Click to show internal directories.
Click to hide internal directories.