imageedit

package
v0.2.39 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Tool)

Option represents an option for configuring the tool

func WithDefaultModel

func WithDefaultModel(model string) Option

WithDefaultModel sets the default model for new sessions

func WithMaxPromptLength

func WithMaxPromptLength(maxLen int) Option

WithMaxPromptLength sets maximum prompt length

func WithMaxSessions

func WithMaxSessions(max int) Option

WithMaxSessions sets the maximum number of concurrent sessions

func WithSessionTimeout

func WithSessionTimeout(timeout time.Duration) Option

WithSessionTimeout sets the session timeout duration

type Tool

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

Tool implements multi-turn image editing as an agent tool. It manages sessions that allow iterative image creation and refinement through conversation, maintaining context between edits.

func New

func New(editor interfaces.MultiTurnImageEditor, storage storage.ImageStorage, options ...Option) *Tool

New creates a new multi-turn image editing tool.

func (*Tool) Description

func (t *Tool) Description() string

Description returns what the tool does

func (*Tool) DisplayName

func (t *Tool) DisplayName() string

DisplayName returns a human-friendly name

func (*Tool) Execute

func (t *Tool) Execute(ctx context.Context, args string) (string, error)

Execute implements the tool execution

func (*Tool) GetActiveSessions

func (t *Tool) GetActiveSessions() int

GetActiveSessions returns the number of active sessions (useful for monitoring)

func (*Tool) GetActiveSessionsForOrg

func (t *Tool) GetActiveSessionsForOrg(orgID string) int

GetActiveSessionsForOrg returns the number of active sessions for a specific organization

func (*Tool) Internal

func (t *Tool) Internal() bool

Internal returns false as this is a user-visible tool

func (*Tool) Name

func (t *Tool) Name() string

Name returns the tool name

func (*Tool) Parameters

func (t *Tool) Parameters() map[string]interfaces.ParameterSpec

Parameters returns the tool's parameter specifications

func (*Tool) Run

func (t *Tool) Run(ctx context.Context, input string) (string, error)

Run executes the tool with the given input

Jump to

Keyboard shortcuts

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