tool

package
v0.0.0-...-cdc720d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FollowUp

func FollowUp(ctx context.Context, input *FollowUpToolInput) (string, error)

func GetFollowUpTool

func GetFollowUpTool() tool.InvokableTool

Types

type ApprovalInfo

type ApprovalInfo struct {
	ToolName        string
	ArgumentsInJSON string
}

func (*ApprovalInfo) String

func (ai *ApprovalInfo) String() string

type ApprovalResult

type ApprovalResult struct {
	Approved         bool
	DisapproveReason *string
}

type FollowUpInfo

type FollowUpInfo struct {
	Questions  []string
	UserAnswer string // This field will be populated by the user.
}

FollowUpInfo is the information presented to the user during an interrupt.

func (*FollowUpInfo) String

func (fi *FollowUpInfo) String() string

type FollowUpState

type FollowUpState struct {
	Questions []string
}

FollowUpState is the state saved during the interrupt.

type FollowUpToolInput

type FollowUpToolInput struct {
	Questions []string `json:"questions"`
}

FollowUpToolInput defines the input schema for our tool.

type InvokableApprovableTool

type InvokableApprovableTool struct {
	tool.InvokableTool
}

func (InvokableApprovableTool) Info

func (InvokableApprovableTool) InvokableRun

func (i InvokableApprovableTool) InvokableRun(ctx context.Context, argumentsInJSON string,
	opts ...tool.Option) (string, error)

type InvokableReviewEditTool

type InvokableReviewEditTool struct {
	tool.InvokableTool
}

InvokableReviewEditTool is a wrapper that enforces a review-and-edit step.

func (InvokableReviewEditTool) Info

func (InvokableReviewEditTool) InvokableRun

func (i InvokableReviewEditTool) InvokableRun(ctx context.Context, argumentsInJSON string,
	opts ...tool.Option) (string, error)

type ReviewEditInfo

type ReviewEditInfo struct {
	ToolName        string
	ArgumentsInJSON string
	ReviewResult    *ReviewEditResult
}

ReviewEditInfo is presented to the user for editing.

func (*ReviewEditInfo) String

func (re *ReviewEditInfo) String() string

type ReviewEditResult

type ReviewEditResult struct {
	EditedArgumentsInJSON *string
	NoNeedToEdit          bool
	Disapproved           bool
	DisapproveReason      *string
}

ReviewEditResult is the result of the user's review.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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