Documentation
¶
Index ¶
Constants ¶
View Source
const ( JSONEncoding = "json" TextEncoding = "text" // SchemaVersion - Current schema version. SchemaVersion = "2026-01-01" VersionOne = "v1.0.0" )
Variables ¶
View Source
var SchemaStartTime = time.Date(2026, 1, 1, 12, 0, 0, 0, time.UTC)
Functions ¶
This section is empty.
Types ¶
type GoToolImpl ¶
type GoToolImpl struct {
// Fully-qualified registration key, e.g.
// "github.com/acme/flexigpt/tools.Weather"
FuncID FuncID `json:"funcID" validate:"required"`
}
GoToolImpl - Register-by-name pattern for Go tools.
type ImageDetail ¶
type ImageDetail string
const ( ImageDetailHigh ImageDetail = "high" ImageDetailLow ImageDetail = "low" ImageDetailAuto ImageDetail = "auto" )
type JSONRawString ¶
type JSONRawString string
type JSONSchema ¶
type JSONSchema json.RawMessage
type Tool ¶
type Tool struct {
SchemaVersion string `json:"schemaVersion"`
ID string `json:"id"` // UUID-v7
Slug string `json:"slug"`
Version string `json:"version"` // opaque
DisplayName string `json:"displayName"`
Description string `json:"description"`
// ArgSchema describes the JSON arguments that are passed when the tool is invoked.
ArgSchema JSONSchema `json:"argSchema"`
GoImpl GoToolImpl `json:"goImpl"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
Tags []string `json:"tags,omitempty"`
}
type ToolFunc ¶
type ToolFunc func(ctx context.Context, in json.RawMessage) ([]ToolOutputUnion, error)
ToolFunc is the low-level function signature stored in the registry. It receives JSON-encoded args and returns one or more tool outputs.
type ToolOutputFile ¶ added in v0.11.0
type ToolOutputImage ¶ added in v0.11.0
type ToolOutputImage struct {
Detail ImageDetail `json:"detail"`
ImageName string `json:"imageName"`
ImageMIME string `json:"imageMIME"`
ImageData string `json:"imageData"`
}
type ToolOutputKind ¶ added in v0.11.0
type ToolOutputKind string
const ( ToolOutputKindNone ToolOutputKind = "none" ToolOutputKindText ToolOutputKind = "text" ToolOutputKindImage ToolOutputKind = "image" ToolOutputKindFile ToolOutputKind = "file" )
type ToolOutputText ¶ added in v0.11.0
type ToolOutputText struct {
Text string `json:"text"`
}
type ToolOutputUnion ¶ added in v0.11.0
type ToolOutputUnion struct {
Kind ToolOutputKind `json:"kind"`
TextItem *ToolOutputText `json:"textItem,omitempty"`
ImageItem *ToolOutputImage `json:"imageItem,omitempty"`
FileItem *ToolOutputFile `json:"fileItem,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.