Class EncodingDetectTool
Detects text encoding and retrieves encoding information.
Analyzes text or byte data to determine encoding, or returns detailed metadata about a named encoding.
public sealed class EncodingDetectTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
EncodingDetectTool
- Implements
- Inherited Members
Examples
Identifying the encoding of an unknown byte stream:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Text;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new EncodingDetectTool()))
.Build();
var result = await agent.RunAsync("What encoding are these bytes? EF BB BF E4 BD A0 E5 A5 BD");
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.