New to Telerik UI for WinFormsStart a free 30-day trial

Provides document summarization and question answering using the OpenAI API.

Definition

Constructors

Initializes a new instance of the OpenAISummaryProvider class with the specified API key and model.

C#
public OpenAISummaryProvider(SecureString key, string model)
Parameters:keySecureString

The API key used to authenticate requests to the OpenAI service. Cannot be null or empty.

modelstring

The name of the OpenAI model to use for generating summaries. Cannot be null or empty.

Remarks:

This constructor initializes the OpenAI client and prepares it for use with the specified model. Ensure that the provided API key is valid and has the necessary permissions to access the OpenAI service.

Methods

Initializes and assigns a chat client instance using the specified OpenAI model and API key.

C#
protected override void CreateChatClient()

Overrides: BaseSummaryProvider.CreateChatClient()

Remarks:

This method creates an instance of the OpenAI chat client and configures it with the provided model. Ensure that the key field is set to a valid OpenAI API key before calling this method.