Documentation
¶
Index ¶
Constants ¶
View Source
const ( JSONEncoding = "json" TextEncoding = "text" // SchemaVersion - Current schema version. SchemaVersion = "2026-01-01" )
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) ([]ToolStoreOutputUnion, error)
ToolFunc is the low-level function signature stored in the registry. It receives JSON-encoded args and returns one or more tool-store outputs.
type ToolStoreOutputFile ¶
type ToolStoreOutputImage ¶
type ToolStoreOutputImage struct {
Detail ImageDetail `json:"detail"`
ImageName string `json:"imageName"`
ImageMIME string `json:"imageMIME"`
ImageData string `json:"imageData"`
}
type ToolStoreOutputKind ¶
type ToolStoreOutputKind string
const ( ToolStoreOutputKindNone ToolStoreOutputKind = "none" ToolStoreOutputKindText ToolStoreOutputKind = "text" ToolStoreOutputKindImage ToolStoreOutputKind = "image" ToolStoreOutputKindFile ToolStoreOutputKind = "file" )
type ToolStoreOutputText ¶
type ToolStoreOutputText struct {
Text string `json:"text"`
}
type ToolStoreOutputUnion ¶
type ToolStoreOutputUnion struct {
Kind ToolStoreOutputKind `json:"kind"`
TextItem *ToolStoreOutputText `json:"textItem,omitempty"`
ImageItem *ToolStoreOutputImage `json:"imageItem,omitempty"`
FileItem *ToolStoreOutputFile `json:"fileItem,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.