Class Base64ImageInfoTool
A built-in tool for analyzing base64-encoded image data.
Get dimensions, format, size, and validate encoding of base64 images.
public sealed class Base64ImageInfoTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
Base64ImageInfoTool
- Implements
- Inherited Members
Examples
Reading dimensions and format of an attached base64 image:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Data;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new Base64ImageInfoTool()))
.Build();
var result = await agent.RunAsync("What are the dimensions of this image? data:image/png;base64,iVBORw0KGgo...");
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.