workflowvalidator

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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 New

func New() *Validator

New creates a new workflow validator

func (*Validator) ValidateWorkflow

func (v *Validator) ValidateWorkflow(chain *taskengine.TaskChainDefinition, profile ValidationProfile) error

ValidateWorkflow ensures a workflow is compatible with the given profile

Jump to

Keyboard shortcuts

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