layerengine

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 8 Imported by: 0

README ¶

layerengine

Simple AI generated code running engine based on LLMs & Lua written in Golang

🚧 WIP experimental project.

This project is under development and has experimental status and is not intended for serious or production use. Expect frequent changes and occasional breaking updates.

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func ConvertGoValueToLuaValue ¶

func ConvertGoValueToLuaValue(input interface{}) lua.LValue

func ConvertGoValuesToLuaValues ¶

func ConvertGoValuesToLuaValues(inputs []interface{}) []lua.LValue

func ConvertLuaValueToGoValue ¶

func ConvertLuaValueToGoValue(val lua.LValue) interface{}

func ConvertLuaValuesToGoValues ¶

func ConvertLuaValuesToGoValues(inputs []lua.LValue) []interface{}

func ParseAndCompileLuaCode ¶

func ParseAndCompileLuaCode(codeStr string) (*lua.FunctionProto, error)

Types ¶

type Layer ¶

type Layer struct {
	Name    string
	FnProto *lua.FunctionProto
	Input   []string
	Output  []string
	Code    string
}

type LayerEngine ¶

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

func NewBlankLayerEngine ¶ added in v0.0.1

func NewBlankLayerEngine() *LayerEngine

func NewLayerEngine ¶

func NewLayerEngine(codegenertor *codegen.CodeGen) *LayerEngine

func (*LayerEngine) LoadFlow ¶

func (le *LayerEngine) LoadFlow(flows map[string][]string)

func (*LayerEngine) LoadLayers ¶

func (le *LayerEngine) LoadLayers(layers []Layer)

func (*LayerEngine) LoadSpec ¶ added in v0.0.1

func (le *LayerEngine) LoadSpec(spec string) error

func (*LayerEngine) RunFlow ¶

func (le *LayerEngine) RunFlow(name string, inputValues map[string]any) (any, error)

func (*LayerEngine) RunLayer ¶

func (le *LayerEngine) RunLayer(name string, inputValues []any) (any, error)

type LayerRunner ¶

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

func NewLayerRunner ¶

func NewLayerRunner() *LayerRunner

func (*LayerRunner) Close ¶

func (cr *LayerRunner) Close()

func (*LayerRunner) LoadFunction ¶

func (cr *LayerRunner) LoadFunction(fnProto *lua.FunctionProto) error

func (*LayerRunner) ReadResult ¶

func (cr *LayerRunner) ReadResult(outputLen int) ([]lua.LValue, error)

func (*LayerRunner) RunFunction ¶

func (cr *LayerRunner) RunFunction(funName string, arguments []lua.LValue, outputLen int) error

type RunType ¶

type RunType string
const (
	LAYER RunType = "layer"
	FLOW  RunType = "flow"
)

Directories ¶

Path Synopsis

Jump to

Keyboard shortcuts

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