Documentation
¶
Index ¶
- func DetectImageMIME(path string, data []byte) string
- func LoadImageFromFile(workDir, path string) ([]byte, string, error)
- func LoadImageFromURL(ctx context.Context, imageURL string) ([]byte, string, error)
- func LoadImageFromURLWithOptions(ctx context.Context, imageURL string, opts web.URLSecurityOptions) ([]byte, string, error)
- type AnalyzeFn
- type AnalyzeWithDetailFn
- type Tool
- func (t *Tool) Description() string
- func (t *Tool) Execute(ctx context.Context, raw json.RawMessage, workDir string) (agentsdk.ToolResult, error)
- func (t *Tool) InputSchema() json.RawMessage
- func (t *Tool) IsEnabled(_ *agentsdk.RunContext) bool
- func (t *Tool) IsReadOnly() bool
- func (t *Tool) Name() string
- func (t *Tool) NeedsApproval() bool
- func (t *Tool) TimeoutSeconds() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectImageMIME ¶
func LoadImageFromURL ¶
Types ¶
type AnalyzeWithDetailFn ¶
type AnalyzeWithDetailFn func(ctx context.Context, imageData []byte, mimeType, prompt, detailLevel string) (string, error)
AnalyzeWithDetailFn performs vision analysis for a loaded image with the caller-requested image detail level.
type Tool ¶
type Tool struct {
AnalyzeFn AnalyzeFn
AnalyzeWithDetailFn AnalyzeWithDetailFn
AllowPrivateNetworkURLs bool
}
Tool analyzes images using a caller-supplied multimodal model function.
func (*Tool) Description ¶
func (*Tool) Execute ¶
func (t *Tool) Execute(ctx context.Context, raw json.RawMessage, workDir string) (agentsdk.ToolResult, error)
func (*Tool) InputSchema ¶
func (t *Tool) InputSchema() json.RawMessage
func (*Tool) IsReadOnly ¶
func (*Tool) NeedsApproval ¶
func (*Tool) TimeoutSeconds ¶
Click to show internal directories.
Click to hide internal directories.