Class Base64ImageConvertTool
A built-in tool for converting images to/from base64 data URLs.
Convert base64 to data URLs, extract base64 from data URLs, or create placeholder images.
public sealed class Base64ImageConvertTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
Base64ImageConvertTool
- Implements
- Inherited Members
Examples
Letting an agent inline an image as a data URL for a Markdown blog post:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Data;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new Base64ImageConvertTool()))
.Build();
var result = await agent.RunAsync("Wrap this base64 PNG payload as a data URL: iVBORw0KGgoAAAA...");
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.