Interface IInstructionsUpdater
Dynamically updates system instructions before each request is sent to the LLM. Implement this interface to adapt the agent's behaviour based on conversation history or any external context (user state, scene data, game phase, etc.).
Namespace: Glitch9.AIDevKit.Agents
Assembly: Glitch9.AIDevKit.dll
Syntax
public interface IInstructionsUpdater
Methods
| Edit this page View SourceShouldSkip(string)
Declaration
bool ShouldSkip(string lastUserMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| string | lastUserMessage |
Returns
| Type | Description |
|---|---|
| bool |
UpdateInstructionsAsync(string, CancellationToken)
Returns updated system instructions for the next request.
Called automatically before every SendAsync(string, int, CancellationToken) call.
Return null to keep the current instructions unchanged.
Declaration
UniTask<string> UpdateInstructionsAsync(string lastUserMessage, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | lastUserMessage | The user's message that triggered this request. |
| CancellationToken | ct | Cancellation token. |
Returns
| Type | Description |
|---|---|
| UniTask<string> |