eval

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "eval"
	RequestPort   = "request"
	ResponsePort  = "response"
	ErrorPort     = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

func (*Component) GetInfo

func (h *Component) GetInfo() module.ComponentInfo

func (*Component) Handle

func (h *Component) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Component) Instance

func (h *Component) Instance() module.Component

func (*Component) Ports

func (h *Component) Ports() []module.Port

type Context

type Context any

type Error

type Error struct {
	Context Context `json:"context"`
	Error   string  `json:"error"`
}

type InputData

type InputData any

type OutputData

type OutputData any

type Request

type Request struct {
	Context   Context   `` /* 135-byte string literal not displayed */
	InputData InputData `json:"inputData,omitempty" configurable:"true" title:"Input data" description:"Input data" prompt:"generate JSON schema"`
}

type Response

type Response struct {
	Context    Context    `json:"context"`
	OutputData OutputData `json:"outputData"`
}

type Script

type Script struct {
	Name    string `json:"name" required:"true" title:"File name" Description:"e.g. utils.js"`
	Content string `json:"content" required:"true" language:"javascript" title:"Javascript code" format:"code"`
}

type ScriptItem

type ScriptItem Script

ScriptItem to avoid confusion of Script definition generated from Scripts array and from Script property

type Settings

type Settings struct {
	EnableErrorPort bool         `` /* 148-byte string literal not displayed */
	OutputData      OutputData   `` /* 134-byte string literal not displayed */
	Script          Script       `` /* 131-byte string literal not displayed */
	Modules         []ScriptItem `` /* 149-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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