OpenAIWebClient
Contents
[
Hide
]OpenAIWebClient class
A built-in IAIWebClient implementation that connects to the OpenAI API.
public class OpenAIWebClient : IAIWebClient, IDisposable
Constructors
| Name | Description |
|---|---|
| OpenAIWebClient(string, string, string) | Creates an instance of the OpenAI web client. |
| OpenAIWebClient(string, string, string, HttpClient) | Creates an instance of the OpenAI web client that uses an externally managed HttpClient. The provided HttpClient is not disposed by this instance and remains owned by the caller. |
Methods
| Name | Description |
|---|---|
| CallChatAsync(string) | Sends a chat instruction to the AI model using an externally managed HttpClient instance 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