Class ChatGptRequestOptions
Represents options for Documentize.PdfManager plugin.
public class ChatGptRequestOptions : PluginBaseOptions, IPluginOptionsInheritance
object ← PluginBaseOptions ← ChatGptRequestOptions
Implements
Inherited Members
- PluginBaseOptions.AddInput(IDataSource),
- PluginBaseOptions.AddOutput(IDataSource),
- PluginBaseOptions.Inputs,
- PluginBaseOptions.Outputs,
- PluginBaseOptions.CloseInputStreams,
- PluginBaseOptions.CloseOutputStreams,
- object.GetType(),
- object.MemberwiseClone(),
- object.ToString(),
- object.Equals(object?),
- object.Equals(object?, object?),
- object.ReferenceEquals(object?, object?),
- object.GetHashCode()
Constructors
ChatGptRequestOptions()
Initializes new instance of the Documentize.ChatGptRequestOptions object with default options.
public ChatGptRequestOptions()ChatGptRequestOptions(string, string, string, string)
Initializes a new instance of the Documentize.ChatGptRequestOptions object with options.
public ChatGptRequestOptions(string apiKey, string model, string apiUrl, string query)Parameters
apiKeystring: The key to access to the ChatGPT API.modelstring: The name of ChatGPT model. The Default model is: gpt-3.5-turbo-1106:apiUrlstring: The ChatGPT API URL. Default URL is: https://api.openai.com/v1/chat/completions.querystring: 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
CancellationToken
The cancellation token.
public CancellationToken CancellationToken { 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 Documentize.Message objects.
public List<message> Messages { get; set; }Property Value
Remarks
When adding multiple messages to the options, the order in the collection of messages is as follows:
- The first message (if any) is from the options.Query, preceded by the message with the content: “You are a helpful assistant.”, and the role is “system”.
- Then (if any) messages from the options.Messages collection are added.
- Messages from file sources (if any) are added last, one message object for each document with the “user” role. If no one message is provided, the ArgumentException is thrown.
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; }Property Value
Namespace: Documentize Assembly: Documentize.dll