Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeConfig(r io.Reader) (width, height int, err error)
- func FormatToolResult(relPath, mime string, width, height int, data []byte) string
- func Normalize(data []byte, mimeHint string) ([]byte, string, int, int, error)
- func ReadPath(path string) (data []byte, mime string, width, height int, err error)
- func SaveAttachment(workDir, sessionSuffix string, data []byte) (absPath, relPath string, err error)
Constants ¶
View Source
const ( MaxReadBytes = 20 << 20 MaxVisionDimension = 1568 MaxToolBase64Budget = 24 << 10 MaxUserAttachBytes = 5 << 20 MaxUserAttachments = 4 )
Variables ¶
View Source
var ( ErrUnsupportedMedia = errors.New("unsupported media type") ErrVideoUnsupported = errors.New("video files are not supported yet") )
Functions ¶
func DecodeConfig ¶
DecodeConfig reports image dimensions without full decode when possible.
func FormatToolResult ¶
FormatToolResult builds ReadMediaFile tool output with metadata and base64 PNG.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.