POST api/openai/settings

更新OpenAI服務的參數

Request Information

URI Parameters

None.

Body Parameters

OpenAI設定資訊

OpenAISettings
NameDescriptionTypeAdditional information
CompetionEndpoint

OpenAI API的端點

string

None.

APIkey

用於認證的OpenAI API密鑰

string

None.

MaxTokens

單次最大文字Token數量

integer

None.

Temperature

控制結果隨機性的溫度參數

decimal number

None.

FrequencyPenalty

控制重複內容的頻率懲罰參數

decimal number

None.

PresencePenalty

控制當前上下文內容重複出現的懲罰參數

decimal number

None.

TopP

控制採樣概率分佈範圍的參數

decimal number

None.

Stop

停止生成文本的標記

string

None.

SystemPrompt

系統提示,用於引導AI的行為和響應

string

None.

Request Formats

application/json, text/json

Sample:
{
  "CompetionEndpoint": "sample string 1",
  "APIkey": "sample string 2",
  "MaxTokens": 3,
  "Temperature": 4.1,
  "FrequencyPenalty": 5.1,
  "PresencePenalty": 6.1,
  "TopP": 7.1,
  "Stop": "sample string 8",
  "SystemPrompt": "sample string 9"
}

application/xml, text/xml

Sample:
<OpenAIController.OpenAISettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/iMOE_Back_End.Controllers">
  <APIkey>sample string 2</APIkey>
  <CompetionEndpoint>sample string 1</CompetionEndpoint>
  <FrequencyPenalty>5.1</FrequencyPenalty>
  <MaxTokens>3</MaxTokens>
  <PresencePenalty>6.1</PresencePenalty>
  <Stop>sample string 8</Stop>
  <SystemPrompt>sample string 9</SystemPrompt>
  <Temperature>4.1</Temperature>
  <TopP>7.1</TopP>
</OpenAIController.OpenAISettings>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.