runtime

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime struct {
	LLM llm.Client

	DB          *db.DB
	Attachments blobs.Store
	Registry    *tools.Registry
	// Events tells those who watch the thread of the items the run records and the text the model streams.
	Events event.Emitter

	// Role is the role the turn names, which Run loads the turn into and runs it as.
	Role role.Role
}

A Runtime runs one turn. It is given where the data is kept and what its user runs on, and reads the rest itself: the turn, its conversation and workspace, the items, the user's settings and the permissions.

func (*Runtime) Run

func (rt *Runtime) Run(ctx context.Context, turnID string) (bool, db.Usage, error)

Run runs the turn, which names Role, until it ends with the final answer, which it reports, or waits. It loads the turn into the role, which keeps the user's secrets with their key and takes in their memory, before the first model call.

Jump to

Keyboard shortcuts

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