Class PdfChatGptRequestOptions

Class PdfChatGptRequestOptions

Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll

表示Aspose.Pdf.Plugins.PdfChatGpt插件的选项。

public class PdfChatGptRequestOptions : PdfChatGptOptions, IPluginOptions

继承

objectPdfChatGptOptionsPdfChatGptRequestOptions

实现

IPluginOptions

继承成员

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()

构造函数

PdfChatGptRequestOptions()

使用默认选项初始化Aspose.Pdf.Plugins.PdfChatGptRequestOptions对象的新实例。

public PdfChatGptRequestOptions()

PdfChatGptRequestOptions(string, string, string, string)

使用选项初始化Aspose.Pdf.Plugins.PdfChatGptRequestOptions对象的新实例。

public PdfChatGptRequestOptions(string apiKey, string model, string apiUrl, string query)

参数

apiKey string

访问ChatGPT API的密钥。

model string

ChatGPT模型的名称。默认模型为:gpt-3.5-turbo-1106

apiUrl string

ChatGPT API的URL。默认URL为:https://api.openai.com/v1/chat/completions。

query string

发送给ChatGPT的字符串请求。

属性

ApiKey

获取或设置访问ChatGPT API的密钥。

public string ApiKey { get; set; }

属性值

string

ApiUrl

获取或设置ChatGPT API的URL。

public string ApiUrl { get; set; }

属性值

string

MaxTokens

响应中的最大令牌数。 默认值为null,表示无限。

public int? MaxTokens { get; set; }

属性值

int?

Messages

获取或设置Aspose.Pdf.Plugins.Message对象的集合。

public List<message> Messages { get; set; }

属性值

List<Message&gt;

Model

设置或获取要使用的模型ID。

public string Model { get; set; }

属性值

string

NumberOfChoices

为每个输入消息生成多少个聊天补全选项。

public int NumberOfChoices { get; set; }

属性值

int

Query

获取或设置发送给ChatGPT的字符串请求。 如果不为空,这是集合中的第一条消息, 将被发送在请求中。

public string Query { get; set; }

属性值

string

Temperature

使用的采样温度,范围在0到2之间。 较高的值如0.8会使输出更随机, 而较低的值如0.2会使其更集中和确定。 默认值为1。

public double Temperature { get; set; }

属性值

double

 中文