native

package
v0.1.23 Latest Latest
Warning

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

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

Documentation

Overview

Package native implements the built-in Eino-backed Leros runtime.

Package native provides the built-in Leros (Eino) Runtime.

Index

Constants

View Source
const (
	// Kind is the canonical runtime kind for the built-in Leros runtime.
	Kind = agent.RuntimeKindLeros
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Execute(context.Context, agent.ExecutionRequest, agent.NodeObserver) (agent.ExecutionResult, error)
}

Executor is the in-process execution backend used by the native Runtime.

type Runner

type Runner struct{}

Runner 是 Leros 内置 Eino 运行时入口。

func NewRunner

func NewRunner(context.Context) (*Runner, error)

NewRunner 创建基于 Eino Flow 的 Leros 内置 Agent。

func (*Runner) Execute

Execute runs one prepared native request and emits only activity events.

type Runtime

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

Runtime executes requests directly through the in-process Eino runner.

func New

func New() (*Runtime, error)

New creates the native Runtime.

func NewWithExecutor

func NewWithExecutor(executor Executor) (*Runtime, error)

NewWithExecutor creates a native Runtime with an injected execution backend.

func (*Runtime) Execute

func (r *Runtime) Execute(
	ctx context.Context,
	request agent.ExecutionRequest,
	observer agent.NodeObserver,
) (agent.ExecutionResult, error)

func (*Runtime) Name

func (r *Runtime) Name() string

Jump to

Keyboard shortcuts

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