executor

package
v1.210.0-test.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MaxToolIterations is the maximum number of tool execution loops to prevent infinite loops.
	MaxToolIterations = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

Executor handles non-interactive AI execution with tool support.

func NewExecutor

func NewExecutor(client ai.Client, toolExecutor *tools.Executor, atmosConfig *schema.AtmosConfiguration) *Executor

NewExecutor creates a new non-interactive executor.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, opts Options) *formatter.ExecutionResult

Execute runs a single prompt and returns the formatted result.

type Options

type Options struct {
	// Prompt is the user's prompt/question.
	Prompt string

	// ToolsEnabled indicates if tool execution is allowed.
	ToolsEnabled bool

	// SessionID is an optional session ID for conversation context.
	SessionID string

	// IncludeContext includes stack context in the prompt.
	IncludeContext bool
}

Options contains execution options.

Jump to

Keyboard shortcuts

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