llmtoolsutil

package
v0.0.95 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LLMToolsGoBuiltinCatalog = map[string]LLMToolMeta{

	"github.com/flexigpt/llmtools-go/fstool/readfile.ReadFile": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/fstool/searchfiles.SearchFiles": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/fstool/writefile.WriteFile": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: false,
	},
	"github.com/flexigpt/llmtools-go/fstool/deletefile.DeleteFile": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: false,
	},
	"github.com/flexigpt/llmtools-go/fstool/listdirectory.ListDirectory": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/fstool/statpath.StatPath": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/fstool/mimeforpath.MIMEForPath": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/fstool/mimeforextension.MIMEForExtension": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsFS),
		AutoExecReco: true,
	},

	"github.com/flexigpt/llmtools-go/imagetool/readimage.ReadImage": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsImage),
		AutoExecReco: true,
	},

	"github.com/flexigpt/llmtools-go/exectool/shellcommand.ShellCommand": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsExec),
		AutoExecReco: false,
	},
	"github.com/flexigpt/llmtools-go/exectool/runscript.RunScript": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsExec),
		AutoExecReco: false,
	},

	"github.com/flexigpt/llmtools-go/texttool/readtextrange.ReadTextRange": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsText),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/texttool/findtext.FindText": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsText),
		AutoExecReco: true,
	},
	"github.com/flexigpt/llmtools-go/texttool/inserttextlines.InsertTextLines": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsText),
		AutoExecReco: false,
	},
	"github.com/flexigpt/llmtools-go/texttool/replacetextlines.ReplaceTextLines": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsText),
		AutoExecReco: false,
	},
	"github.com/flexigpt/llmtools-go/texttool/deletetextlines.DeleteTextLines": {
		BundleID:     bundleitemutils.BundleID(builtin.BuiltinBundleIDLLMToolsText),
		AutoExecReco: false,
	},
}

LLMToolsGoBuiltinCatalog is the SINGLE source of truth for how llmtools-go builtins are represented in this app.

Key: exact Go FuncID string from llmtools-go (stable in your environment). Value: bundle routing + auto-exec recommendation.

When llmtools-go returns a tool that isn't mapped here, injectLLMToolsGoBuiltins fails with a clear error telling you to add it.

Functions

func CallUsingDefaultGoRegistry added in v0.0.79

func CallUsingDefaultGoRegistry(
	ctx context.Context,
	funcID string,
	args json.RawMessage,
	callOpts ...llmtools.CallOption,
) ([]llmtoolsSpec.ToolOutputUnion, error)

func CallUsingRegistry added in v0.0.82

func CallUsingRegistry(
	ctx context.Context,
	reg *llmtools.Registry,
	funcID string,
	args json.RawMessage,
	callOpts ...llmtools.CallOption,
) ([]llmtoolsSpec.ToolOutputUnion, error)

func RegisterOutputsToolUsingDefaultGoRegistry added in v0.0.79

func RegisterOutputsToolUsingDefaultGoRegistry[T any](
	tool llmtoolsSpec.Tool,
	fn func(context.Context, T) ([]llmtoolsSpec.ToolOutputUnion, error),
) error

func RegisterTypedAsTextToolUsingDefaultGoRegistry added in v0.0.79

func RegisterTypedAsTextToolUsingDefaultGoRegistry[T, R any](
	tool llmtoolsSpec.Tool,
	fn func(context.Context, T) (R, error),
) error

func StatPath

func StatPath(ctx context.Context, args fstool.StatPathArgs) (*fstool.StatPathOut, error)

func WriteFile

func WriteFile(ctx context.Context, args fstool.WriteFileArgs) (*fstool.WriteFileOut, error)

Types

type LLMToolMeta added in v0.0.79

type LLMToolMeta struct {
	BundleID     bundleitemutils.BundleID
	AutoExecReco bool
}

Jump to

Keyboard shortcuts

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