OpenAIWebClient

OpenAIWebClient class

Build-in lightweight OpenAI web client

public class OpenAIWebClient : IAIWebClient, IDisposable

Constructors

NameDescription
OpenAIWebClient(string, string, string)Creates instance of OpenAI Web client.
OpenAIWebClient(string, string, string, HttpClient)Creates instance of OpenAI Web client.

Methods

NameDescription
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