Provides document summarization and question answering using the OpenAI API.
Definition
Namespace:Telerik.WinControls.UI.AIProviders
Assembly:Telerik.WinControls.PdfViewer.dll
Syntax:
[CLSCompliant(false)]
public class OpenAISummaryProvider : BaseSummaryProvider, ISummaryProvider
Inheritance: objectBaseSummaryProviderOpenAISummaryProvider
Implements:
Inherited Members
Constructors
Initializes a new instance of the OpenAISummaryProvider class with the specified API key and model.
public OpenAISummaryProvider(SecureString key, string model)
The API key used to authenticate requests to the OpenAI service. Cannot be null or empty.
modelstringThe name of the OpenAI model to use for generating summaries. Cannot be null or empty.
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.
protected override void CreateChatClient()
Overrides:
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.