tools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 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 GeocodeArgs added in v0.1.1

type GeocodeArgs struct {
	Address string `json:"address" desc:"The address to geocode into latitude/longitude coordinates."`
}

type GeocodeTool added in v0.1.1

type GeocodeTool struct{ toolkit.Tool[GeocodeArgs] }

GeocodeTool is a tool that geocodes an address +tool:name=geocode_tool +tool:description=Geocode tool geocodes an address and returns the latitude and longitude.

func NewGeocodeTool added in v0.1.1

func NewGeocodeTool() *GeocodeTool

func (*GeocodeTool) Definition added in v0.1.1

func (g *GeocodeTool) Definition() openai.FunctionDefinition

func (*GeocodeTool) Execute added in v0.1.1

func (g *GeocodeTool) Execute() string

type WeatherTool

type WeatherTool struct {
	toolkit.Tool[WeatherToolArgs]
}

WeatherTool is a tool that reports the current weather for a location +tool:name=weather_tool +tool:description=WeatherTool reports the current weather for a location

func NewWeatherTool

func NewWeatherTool() *WeatherTool

func (*WeatherTool) Definition

func (w *WeatherTool) Definition() openai.FunctionDefinition

func (*WeatherTool) Execute

func (g *WeatherTool) Execute() string

type WeatherToolArgs

type WeatherToolArgs struct {
	Latitude  float64 `json:"latitude" desc:"The latitude of the location."`
	Longitude float64 `json:"longitude" desc:"The longitude of the location."`
}

Jump to

Keyboard shortcuts

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