tool

package
v0.0.0-...-cbd2597 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	ID        string `json:"id"`
	Type      string `json:"type"`
	Name      string `json:"name"`
	Arguments string `json:"arguments"`
}

type ExecuteHADevice

type ExecuteHADevice struct {
}

func (*ExecuteHADevice) Description

func (e *ExecuteHADevice) Description() string

func (*ExecuteHADevice) Execute

func (e *ExecuteHADevice) Execute(ctx context.Context, input string) (string, error)

func (*ExecuteHADevice) Name

func (e *ExecuteHADevice) Name() string

func (*ExecuteHADevice) Schema

func (e *ExecuteHADevice) Schema() map[string]interface{}

type GetHADevices

type GetHADevices struct {
}

func (*GetHADevices) Description

func (g *GetHADevices) Description() string

func (*GetHADevices) Execute

func (g *GetHADevices) Execute(ctx context.Context, input string) (string, error)

func (*GetHADevices) Name

func (g *GetHADevices) Name() string

func (*GetHADevices) Schema

func (g *GetHADevices) Schema() map[string]interface{}

type GetWeather

type GetWeather struct {
}

func (*GetWeather) Description

func (w *GetWeather) Description() string

func (*GetWeather) Execute

func (w *GetWeather) Execute(ctx context.Context, input string) (string, error)

func (*GetWeather) Name

func (w *GetWeather) Name() string

func (*GetWeather) Schema

func (w *GetWeather) Schema() map[string]interface{}

type GoogleSearch

type GoogleSearch struct {
}

func (*GoogleSearch) Description

func (w *GoogleSearch) Description() string

func (*GoogleSearch) Execute

func (w *GoogleSearch) Execute(ctx context.Context, input string) (string, error)

func (*GoogleSearch) Name

func (w *GoogleSearch) Name() string

func (*GoogleSearch) Schema

func (w *GoogleSearch) Schema() map[string]interface{}

type Tool

type Tool interface {
	Name() string
	Description() string
	Schema() map[string]interface{}
	Execute(context.Context, string) (string, error)
}

func DefaultTools

func DefaultTools() []Tool

func GetTools

func GetTools(names []string) []Tool

func NewExecuteHADevice

func NewExecuteHADevice() Tool

func NewGetHADevices

func NewGetHADevices() Tool

func NewGetWeather

func NewGetWeather() Tool

func NewGoogleSearch

func NewGoogleSearch() Tool

func NewWebPageSummary

func NewWebPageSummary() Tool

type WebPageSummary

type WebPageSummary struct {
}

func (*WebPageSummary) Description

func (w *WebPageSummary) Description() string

func (*WebPageSummary) Execute

func (w *WebPageSummary) Execute(ctx context.Context, input string) (string, error)

func (*WebPageSummary) Name

func (w *WebPageSummary) Name() string

func (*WebPageSummary) Schema

func (w *WebPageSummary) Schema() map[string]interface{}

Jump to

Keyboard shortcuts

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