Class IntentDefinition
- Namespace
- IntentSharp.Catalog
- Assembly
- IntentSharp.Catalog.dll
One piece of behaviour as data: a named intent with its text, result shape, rules, limits and examples. Loaded from JSON or YAML files (or any other IIntentCatalog source) and executed by IntentRuntime. Edit the file, not the program, to change what the intent does.
public sealed class IntentDefinition
- Inheritance
-
objectIntentDefinition
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Constructors
- IntentDefinition()
Creates an enabled, version 1 definition with no name or intent text, a text shape, and no rules, validators, examples or tags.
Properties
- Attempts
How many attempts a run may make, at least 1; attempt 2 and later send the problems found in the earlier reply back to the model. Null uses the client's default.
- Description
For humans and for catalog listings; not sent to the model.
- DoNotRecord
Do not record this intent's inputs and outputs in memory (sensitive data).
- Enabled
A disabled intent loads but refuses to run, with a message naming it.
- Examples
Worked examples sent to the model with every run: an input and the output expected for it.
- Intent
What to do with the input. Sent to the model as the intent.
- Judge
True asks the judge to review the result of every run; the judge runs when the client's judge mode is OnRequest (the default) or Always. Null or false does not ask; a client whose judge mode is Always runs the judge anyway.
- MaxOutputTokens
The output token ceiling for each model call, at least 1. Null uses the client's default.
- Model
The model to ask for. Null uses the provider's default model.
- Name
Unique, dotted name, for example
Orders.ClassifyUrgency. Case-insensitive.
- OutputRequirements
Additional output requirements in prose (dialects, formats, tone).
- Owner
Who owns the behaviour (a team or person), for audit and listings.
- Provider
The provider to run on, by the name it has on the client. Null uses the client's primary provider.
- Rules
Declarative checks on the result, evaluated after the shape is satisfied.
- Shape
The result shape. Defaults to text: a new IntentShape per definition, never a shared instance.
- Source
Where the definition came from (file path or source id). Set by the loader, never by the file.
- SystemInstructions
Extra system instructions for this intent.
- Tags
Free tags copied onto every request the intent makes (Tags) and, when the run is recorded in memory, onto its Tags. Results do not carry them.
- Timeout
Wall-clock budget per execution, ISO 8601 duration or
hh:mm:ssin files.
- Validators
Names of code validators registered in IIntentValidatorRegistry, applied after the rules.
- Version
Monotonic per name. Recorded with every result so an audit can say which version decided.