tools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeInterpreterTool

type CodeInterpreterTool interface {
	Tool
}

func NewCodeInterpreterTool

func NewCodeInterpreterTool() CodeInterpreterTool

func NewCodeInterpreterToolFromJson

func NewCodeInterpreterToolFromJson(json *gjson.Json) CodeInterpreterTool

type CodeInterpreterToolCall

type CodeInterpreterToolCall interface {
	ToolCall
}

func NewCodeInterpreterToolCallFromJson

func NewCodeInterpreterToolCallFromJson(json *gjson.Json) CodeInterpreterToolCall

type FunctionCall

type FunctionCall struct {
	Name      string `json:"name"`
	Arguments string `json:"arguments"`
	Output    string `json:"output"`
}

type FunctionDefinition

type FunctionDefinition struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Parameters  map[string]interface{} `json:"parameters"`
}

type FunctionTool

type FunctionTool interface {
	Tool
	GetFunction() *FunctionDefinition
}

func NewFunctionTool

func NewFunctionTool(name, description string, parameters map[string]interface{}) FunctionTool

func NewFunctionToolFromJson

func NewFunctionToolFromJson(json *gjson.Json) FunctionTool

type FunctionToolCall

type FunctionToolCall interface {
	ToolCall
	GetFunction() *FunctionCall
}

func NewFunctionToolCallFromJson

func NewFunctionToolCallFromJson(json *gjson.Json) FunctionToolCall

type Tool

type Tool interface {
	GetType() string
}

func FromJsons

func FromJsons(jsons []*gjson.Json) (tools []Tool)

type ToolCall

type ToolCall interface {
	GetType() string
	GetId() string
}

func ToolCallsFromJsons

func ToolCallsFromJsons(jsons []*gjson.Json) (toolCalls []ToolCall)

type ToolOutput

type ToolOutput interface {
	GetToolCallId() string
	GetOutput() string
}

func NewToolOutput

func NewToolOutput(toolCallId string, output string) ToolOutput

Jump to

Keyboard shortcuts

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