IChatClient Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a chat client.
public interface class IChatClient : IDisposable
public interface IChatClient : IDisposable
type IChatClient = interface
interface IDisposable
Public Interface IChatClient
Implements IDisposable
- Derived
- Implements
Remarks
Applications must consider risks such as prompt injection attacks, data sizes, and the number of messages sent to the underlying provider or returned from it. Unless a specific IChatClient implementation explicitly documents safeguards for these concerns, the application is expected to implement appropriate protections.
Unless otherwise specified, all members of IChatClient are thread-safe for concurrent use. It is expected that all implementations of IChatClient support being used by multiple requests concurrently. Instances must not be disposed of while the instance is still in use.
However, implementations of IChatClient might mutate the arguments supplied to GetResponseAsync(IEnumerable
Methods
| Name | Description |
|---|---|
| Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable) |
|
GetResponseAsync(IEnumerable |
Sends chat messages and returns the response. |
| GetService(Type, Object) |
Asks the IChatClient for an object of the specified type |
|
GetStreamingResponseAsync(IEnumerable |
Sends chat messages and streams the response. |