API Reference
Class
CopilotSession
Represents an active Copilot session.
Inheritance
- Object
- CopilotSession
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
Methods
public IDisposable OnEvent(Action<CopilotSessionEvent> handler) #Returns:
IDisposableSubscribes to session events.
Parameters
- handler System.Action{IntelligenceX.Copilot.CopilotSessionEvent}
- Event handler.
Returns
A subscription token that should be disposed to unsubscribe.
public async Task<String> SendAndWaitAsync(CopilotMessageOptions options, Nullable<TimeSpan> timeout = null, CancellationToken cancellationToken = null) #Returns:
Task<String>Sends a message and waits for the response.
Parameters
- options IntelligenceX.Copilot.CopilotMessageOptions
- Message options.
- timeout System.Nullable{System.TimeSpan} = null
- Optional timeout.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public async Task<String> SendAsync(CopilotMessageOptions options, CancellationToken cancellationToken = null) #Returns:
Task<String>Sends a message to the session.
Parameters
- options IntelligenceX.Copilot.CopilotMessageOptions
- Message options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.