Documentation
¶
Overview ¶
Package fimtool exposes Fill-in-the-Middle code completion as a Seshat tool.
Index ¶
- Constants
- type Tool
- func (t *Tool) BackfillInput(_ context.Context, input map[string]any) map[string]any
- func (t *Tool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
- func (t *Tool) CheckPermissions(_ context.Context, _ map[string]any, _ tool.ToolUseContext) types.PermissionResult
- func (t *Tool) Definition() tool.Definition
- func (t *Tool) Description(_ context.Context) (string, error)
- func (t *Tool) FormatResult(data any) string
- func (t *Tool) IsConcurrencySafe(_ map[string]any) bool
- func (t *Tool) IsEnabled() bool
- func (t *Tool) IsReadOnly(_ map[string]any) bool
- func (t *Tool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)
Constants ¶
const ( ToolName = "code_complete" ToolDescription = `` /* 596-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool implements the code_complete built-in tool.
func New ¶
New creates a code_complete Tool. When completer is nil, IsEnabled returns false and the tool is not surfaced to the LLM.
func (*Tool) BackfillInput ¶
BackfillInput implements tool.Tool.
func (*Tool) Call ¶
func (t *Tool) Call(ctx context.Context, input tool.CallInput, _ types.CanUseToolFn) (tool.CallResult, error)
Call implements tool.Tool.
func (*Tool) CheckPermissions ¶
func (t *Tool) CheckPermissions(_ context.Context, _ map[string]any, _ tool.ToolUseContext) types.PermissionResult
CheckPermissions implements tool.Tool — FIM calls are read-only, always allowed.
func (*Tool) Definition ¶
func (t *Tool) Definition() tool.Definition
Definition implements tool.Tool.
func (*Tool) Description ¶
Description implements tool.Tool.
func (*Tool) FormatResult ¶
FormatResult implements tool.Tool.
func (*Tool) IsConcurrencySafe ¶
IsConcurrencySafe implements tool.Tool — FIM calls are stateless HTTP requests.
func (*Tool) IsReadOnly ¶
IsReadOnly implements tool.Tool — FIM only reads code, it never writes files.