Class PdfChatGptRequestOptions
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
Represents options for Aspose.Pdf.Plugins.PdfChatGpt plugin.
public class PdfChatGptRequestOptions : PdfChatGptOptions, IPluginOptions
Inheritance
object ← PdfChatGptOptions ← PdfChatGptRequestOptions
Implements
Inherited Members
PdfChatGptOptions.AddInput(IDataSource), PdfChatGptOptions.AddOutput(IDataSource), PdfChatGptOptions.Inputs, PdfChatGptOptions.Outputs, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
PdfChatGptRequestOptions()
Initializes new instance of the Aspose.Pdf.Plugins.PdfChatGptRequestOptions object with default options.
public PdfChatGptRequestOptions()
PdfChatGptRequestOptions(string, string, string, string)
Initializes a new instance of the Aspose.Pdf.Plugins.PdfChatGptRequestOptions object with options.
public PdfChatGptRequestOptions(string apiKey, string model, string apiUrl, string query)
Parameters
apiKey
string
The key to access to the ChatGPT API.
model
string
The name of ChatGPT model. The Default model is: gpt-3.5-turbo-1106
apiUrl
string
The ChatGPT API URL. Default URL is: https://api.openai.com/v1/chat/completions.
query
string
The string request to ChatGPT.
Properties
ApiKey
Gets or sets the key to access to the ChatGPT API.
public string ApiKey { get; set; }
Property Value
ApiUrl
Gets or sets the ChatGPT API URL.
public string ApiUrl { get; set; }
Property Value
MaxTokens
Maximum number of tokens in the response. Default value is null, means infinity.
public int? MaxTokens { get; set; }
Property Value
int?
Messages
Gets or sets a collection of the Aspose.Pdf.Plugins.Message objects.
public List<message> Messages { get; set; }
Property Value
Model
Sets or gets ID of the model to use.
public string Model { get; set; }
Property Value
NumberOfChoices
How many chat completion choices to generate for each input message.
public int NumberOfChoices { get; set; }
Property Value
Query
Gets or sets the string request to ChatGPT. If not empty, this is the first message in the collection, that will be sent in the request.
public string Query { get; set; }
Property Value
Temperature
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default value is 1.
public double Temperature { get; set; }