Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ChatServiceProfile validates workflows for the chat service ChatServiceProfile = ValidationProfile{ RequiredReturnType: "chat_history", AllowConvertibleTypes: false, RequiredInputType: "chat_history", } // OpenAIChatServiceProfile validates workflows for OpenAI-compatible service OpenAIChatServiceProfile = ValidationProfile{ RequiredReturnType: "openai_chat_response", AllowConvertibleTypes: true, RequiredInputType: "openai_chat", } )
Standard validation profiles
Functions ¶
This section is empty.
Types ¶
type ValidationProfile ¶
type ValidationProfile struct {
// RequiredReturnType specifies the data type that must be returned
RequiredReturnType string
// AllowConvertibleTypes specifies if types that can be converted are acceptable
AllowConvertibleTypes bool
// RequiredInputType specifies the expected input type (optional)
RequiredInputType string
}
ValidationProfile defines what a workflow should guarantee
type Validator ¶
type Validator struct{}
Validator validates workflows for specific use cases
func (*Validator) ValidateWorkflow ¶
func (v *Validator) ValidateWorkflow(chain *taskengine.TaskChainDefinition, profile ValidationProfile) error
ValidateWorkflow ensures a workflow is compatible with the given profile
Click to show internal directories.
Click to hide internal directories.