gen

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenCmd = &cobra.Command{
	Use:     "generate",
	Short:   "Generate Manglekit assets",
	Aliases: []string{"gen"},
	Args:    cobra.NoArgs,
	Run: func(cmd *cobra.Command, args []string) {
		cmd.Help()
	},
}

Functions

func AddCommands

func AddCommands(rootCmd *cobra.Command)

func GetICLContent

func GetICLContent(userPath string) (string, error)

GetICLContent returns the In-Context Learning content. If userPath is provided, it reads from that file. Otherwise, it returns the embedded golden rules.

func ValidatePolicySyntax

func ValidatePolicySyntax(ctx context.Context, datalog, schemaDeclarations string) error

ValidatePolicySyntax checks if the generated Datalog code is valid using the Mangle engine.

Types

type GeneratedPolicy

type GeneratedPolicy struct {
	// DatalogContent contains the raw .dl code.
	DatalogContent string `json:"datalog_content"`
	// Explanation provides a human-readable summary of the logic.
	Explanation string `json:"explanation"`
}

GeneratedPolicy represents the structured response from the LLM.

func GenerateWithFeedback

func GenerateWithFeedback(ctx context.Context, gen core.TextGenerator, userReq string, domainVocab []string, schema *inductor.SchemaHint, iclContent string) (*GeneratedPolicy, error)

GenerateWithFeedback orchestrates the Teacher-Student protocol.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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