Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
IMentorAssistantStatus interface
The IMentorAssistantStatus interface of Novior.MentorAgent.Abstractions.Interfaces: Whether the application's assistant is on: the chat widget reads it, and…
In questa pagina
Whether the application's assistant is on: the chat widget reads it, and while it is off the input and the send button are disabled and a sentence says the assistant was turned off, before anyone writes. An application that turns its assistant off from somewhere else — a console, a switch of its own — registers one; without one the assistant is on.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Interfaces. Package: Novior.MentorAgent.Abstractions.
public interface IMentorAssistantStatus
dotnet add package Novior.MentorAgent.AbstractionsRemarks
Section titled “Remarks”Only on or off: no reason, no author. Off means that the switch refuses the requests to the model, not that a budget is used up: MentorAgent does not refuse them because of this service.
IMentorAssistantStatus.Changed is raised only when IMentorAssistantStatus.IsOn changes, with the service as the sender and EventArgs.Empty, and may be raised on a background thread: a Blazor component re-renders through InvokeAsync(StateHasChanged). A handler reads IMentorAssistantStatus.IsOn again and returns at once; one that throws must not stop the service or the other handlers.
Register it as a singleton.
Properties
Section titled “Properties”bool IsOn { get; }
Whether the assistant is on. true unless the application turned it off.
Events
Section titled “Events”Changed
Section titled “Changed”event EventHandler? Changed
Raised when IMentorAssistantStatus.IsOn changes, possibly on a background thread.
