API Reference
Class
CopilotChatClient
High-level Copilot chat client that can switch between CLI and direct HTTP transports.
Inheritance
- Object
- CopilotChatClient
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
- Method CopilotChatClient.StartAsync
Methods
public async Task<String> ChatAsync(String prompt, String model = null, CancellationToken cancellationToken = null) #Returns:
Task<String>Sends a single prompt and returns the response text.
Parameters
- prompt System.String
- Prompt text to send.
- model System.String = null
- Optional model override.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public virtual async ValueTask DisposeAsync() #Returns:
ValueTaskDisposes the client asynchronously.
public static async Task<CopilotChatClient> StartAsync(CopilotChatClientOptions options = null, CancellationToken cancellationToken = null) #Returns:
Task<CopilotChatClient>Starts a Copilot chat client using the selected transport.
Parameters
- options IntelligenceX.Copilot.CopilotChatClientOptions = null
- Optional client options.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.