Method PlanAsync
- Namespace
- IntentSharp.Targets
- Assembly
- IntentSharp.dll
PlanAsync(string, object?, CancellationToken)
Senses the target and asks the model for a command for request, checking each reply on the
way. Nothing is executed. When the check with data.stage sense refuses, no model is called and the
result is unsuccessful with one Guardrail issue.
public Task<AIResult<CommandPlan>> PlanAsync(string request, object? input = null, CancellationToken cancellationToken = default)
Parameters
requeststringWhat the caller wants, in plain language.
inputobjectA value the command works with, such as a record to write; null for none. It is sent to the model.
cancellationTokenCancellationTokenCancels the call.
Returns
- Task<AIResult<CommandPlan>>
The planning result; its value is the plan, with the entities the target's inspection found.
Exceptions
- ArgumentNullException
requestis null.- ArgumentException
requestis empty.- InvalidOperationException
The plan intent is neither in the client's document store nor shipped by the library.
- TargetOperationException
Describing the target failed.