Class ChatGptRequestOptions

Info

Represents options for Documentize.PdfManager plugin.

public class ChatGptRequestOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsChatGptRequestOptions

Implements

Inherited Members

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

Properties

ApiKey

Gets or sets the key to access to the ChatGPT API.

public string ApiKey { get; set; }

Property Value

string

ApiUrl

Gets or sets the ChatGPT API URL.

public string ApiUrl { get; set; }

Property Value

string

CancellationToken

The cancellation token.

public CancellationToken CancellationToken { get; set; }

Property Value

CancellationToken

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

List<Message>

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

string

NumberOfChoices

How many chat completion choices to generate for each input message.

public int NumberOfChoices { get; set; }

Property Value

int

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

string

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

double

Namespace: Documentize Assembly: Documentize.dll

 English