MCPcopy Create free account
hub / github.com/github/gh-aw / ValidateEffortParam

Function ValidateEffortParam

pkg/workflow/model_alias_validation.go:41–48  ·  view source on GitHub ↗

─── Known-parameter validation ─────────────────────────────────────────────── ValidateEffortParam validates the "effort" parameter value (V-MAF-002). Allowed values: low, medium, high.

(value string)

Source from the content-addressed store, hash-verified

39// ValidateEffortParam validates the "effort" parameter value (V-MAF-002).
40// Allowed values: low, medium, high.
41func ValidateEffortParam(value string) error {
42 switch value {
43 case "low", "medium", "high":
44 return nil
45 default:
46 return fmt.Errorf("model parameter 'effort': value %q is not valid; allowed values are: low, medium, high (V-MAF-002)", value)
47 }
48}
49
50// ValidateTemperatureParam validates the "temperature" parameter value (V-MAF-003).
51// Must be a finite decimal float in [0.0, 2.0].

Callers 2

ValidateKnownParamsFunction · 0.85
TestValidateEffortParamFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by 1

TestValidateEffortParamFunction · 0.68