AsposeAIWebClient
Contents
[
Hide
]AsposeAIWebClient class
A built-in IAIWebClient implementation that connects to Aspose’s own LLM. This is the default client used by the parameterless SlidesAIAgent constructor.
public sealed class AsposeAIWebClient : IAIWebClient, IDisposable
Constructors
| Name | Description |
|---|---|
| AsposeAIWebClient() | Creates an instance of the Aspose AI web client that connects to the default Aspose LLM endpoint. This is the client used by the parameterless SlidesAIAgent constructor, so creating it explicitly is only required when passing the client to the SlidesAIAgent constructor directly. |
| AsposeAIWebClient(HttpClient) | Creates an instance of the Aspose AI web client that connects to the default Aspose LLM endpoint using an externally managed HttpClient. The provided HttpClient is not disposed by this instance and remains owned by the caller. |
| AsposeAIWebClient(string) | Creates an instance of the Aspose AI web client that connects to a custom endpoint URL. Use this overload when you have a URL provided by the Aspose.Slides team; otherwise, use the AsposeAIWebClient overload with the default URL. |
| AsposeAIWebClient(string, HttpClient) | Creates an instance of the Aspose AI web client that connects to a custom endpoint URL using an externally managed HttpClient. The provided HttpClient is not disposed by this instance and remains owned by the caller. Use this overload when you have a URL provided by the Aspose.Slides team and want to supply your own HttpClient; if you only need your own HttpClient with the default URL, use the AsposeAIWebClient overload instead. |
Methods
| Name | Description |
|---|---|
| CallChatAsync(string) | Sends a chat instruction to the AI model and returns response message to the given instruction. |
| CreateConversation() | Creates a conversation instance. Unlike regular AI calls, conversations retain the entire context. |
| Dispose() | Releases resources used by this instance. |
See Also
- interface IAIWebClient
- namespace Aspose.Slides.AI
- assembly Aspose.Slides