tools

package
v1.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndJourneyTool

type EndJourneyTool struct{}

EndJourneyTool completes the current workflow.

func NewEndJourneyTool

func NewEndJourneyTool() *EndJourneyTool

NewEndJourneyTool creates a new end_journey tool.

func (*EndJourneyTool) Definition

func (t *EndJourneyTool) Definition() chat.Tool

Definition returns the tool definition for the chat API.

func (*EndJourneyTool) Execute

Execute runs the tool and returns a typed result.

func (*EndJourneyTool) Name

func (t *EndJourneyTool) Name() string

Name returns the tool name.

type QueryTool

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

QueryTool executes read-only SQL queries against the local catalog.

func NewQueryTool

func NewQueryTool(db sqlite.DB) *QueryTool

NewQueryTool creates a new query tool.

func (*QueryTool) Definition

func (t *QueryTool) Definition() chat.Tool

Definition returns the tool definition for the chat API.

func (*QueryTool) Execute

func (t *QueryTool) Execute(input json.RawMessage) (tools.QueryResult, error)

Execute runs the query and returns a typed result.

func (*QueryTool) Name

func (t *QueryTool) Name() string

Name returns the tool name.

type Registry

type Registry struct {
	Query        *QueryTool
	StartJourney *StartJourneyTool
	EndJourney   *EndJourneyTool
}

Registry holds tool instances and provides definitions.

func (*Registry) Definitions

func (r *Registry) Definitions() []chat.Tool

Definitions returns tool definitions for the chat API.

type StartJourneyTool

type StartJourneyTool struct{}

StartJourneyTool begins a guided workflow.

func NewStartJourneyTool

func NewStartJourneyTool() *StartJourneyTool

NewStartJourneyTool creates a new start_journey tool.

func (*StartJourneyTool) Definition

func (t *StartJourneyTool) Definition() chat.Tool

Definition returns the tool definition for the chat API.

func (*StartJourneyTool) Execute

Execute runs the tool and returns a typed result.

func (*StartJourneyTool) Name

func (t *StartJourneyTool) Name() string

Name returns the tool name.

Jump to

Keyboard shortcuts

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