Class
CopilotSession
Represents an active Copilot session.
Inheritance
- Object
- CopilotSession
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.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
public String SessionId { get; } #Gets the session id.