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