prompt

package module
v0.0.0-...-20bcb34 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressXML

func CompressXML(xml string) string

CompressXML removes unnecessary whitespace and formatting from XML to minimize tokens

func PruneSnapshot

func PruneSnapshot(doc xmldom.Document)

PruneSnapshot removes redundant information from the snapshot to reduce token usage. It removes: - The static datamodel definition (since runtime:datamodel has the actual values) - event:schema attributes (since they're in the function declarations) - All action/executable content elements while preserving state structure

Types

type SendFunction

type SendFunction struct {
	Name        string
	Description string
	Schema      *jsonschema.Schema
}

SendFunction represents a send_* function declaration for LLMs

func BuildSendFunctions

func BuildSendFunctions(transitions []xmldom.Element) []SendFunction

BuildSendFunctions builds function declarations for send events from available transitions. This is used by multiple LLM integrations (Gemini, Ollama, etc.) to create consistent function declarations for state machine event sending.

Jump to

Keyboard shortcuts

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