Class GenericChatRequest
Details for the chat request.
Inheritance
GenericChatRequest
Assembly: OCI.DotNetSDK.Generativeaiinference.dll
Syntax
public class GenericChatRequest : BaseChatRequest
Properties
FrequencyPenalty
Declaration
[JsonProperty(PropertyName = "frequencyPenalty")]
public double FrequencyPenalty { get; set; }
Property Value
IsEcho
Declaration
[JsonProperty(PropertyName = "isEcho")]
public bool? IsEcho { get; set; }
Property Value
Type |
Description |
bool? |
Whether to include the user prompt in the response. Applies only to non-stream results.
|
IsStream
Declaration
[JsonProperty(PropertyName = "isStream")]
public bool? IsStream { get; set; }
Property Value
Type |
Description |
bool? |
Whether to stream back partial progress. If set to true, as tokens become available, they are sent as data-only server-sent events.
|
LogProbs
Declaration
[JsonProperty(PropertyName = "logProbs")]
public int? LogProbs { get; set; }
Property Value
Type |
Description |
int? |
Includes the logarithmic probabilities for the most likely output tokens and the chosen tokens.
For example, if the log probability is 5, the API returns a list of the 5 most likely tokens. The API returns the log probability of the sampled token, so there might be up to logprobs+1 elements in the response.
|
LogitBias
Declaration
[JsonProperty(PropertyName = "logitBias")]
public object LogitBias { get; set; }
Property Value
Type |
Description |
object |
Modifies the likelihood of specified tokens that appear in the completion.
Example: '{"6395": 2, "8134": 1, "21943": 0.5, "5923": -100}'
|
MaxTokens
Declaration
[JsonProperty(PropertyName = "maxTokens")]
public int? MaxTokens { get; set; }
Property Value
Type |
Description |
int? |
The maximum number of tokens that can be generated per output sequence. The token count of your prompt plus maxTokens must not exceed the model's context length.
Not setting a value for maxTokens results in the possible use of model's full context length.
|
Messages
Declaration
[JsonProperty(PropertyName = "messages")]
public List<Message> Messages { get; set; }
Property Value
Type |
Description |
List<Message> |
The series of messages in a chat request. Includes the previous messages in a conversation. Each message includes a role (USER or the CHATBOT ) and content.
|
NumGenerations
Declaration
[JsonProperty(PropertyName = "numGenerations")]
public int? NumGenerations { get; set; }
Property Value
Type |
Description |
int? |
The number of of generated texts that will be returned.
|
PresencePenalty
Declaration
[JsonProperty(PropertyName = "presencePenalty")]
public double PresencePenalty { get; set; }
Property Value
Stop
Declaration
[JsonProperty(PropertyName = "stop")]
public List<string> Stop { get; set; }
Property Value
Type |
Description |
List<string> |
List of strings that stop the generation if they are generated for the response text. The returned output will not contain the stop strings.
|
Temperature
Declaration
[JsonProperty(PropertyName = "temperature")]
public double Temperature { get; set; }
Property Value
Type |
Description |
double |
A number that sets the randomness of the generated output. A lower temperature means a less random generations.
Use lower numbers for tasks with a correct answer such as question answering or summarizing. High temperatures can generate hallucinations or factually incorrect information. Start with temperatures lower than 1.0 and increase the temperature for more creative outputs, as you regenerate the prompts to refine the outputs.
|
TopK
Declaration
[JsonProperty(PropertyName = "topK")]
public int? TopK { get; set; }
Property Value
Type |
Description |
int? |
An integer that sets up the model to use only the top k most likely tokens in the generated output. A higher k introduces more randomness into the output making the output text sound more natural. Default value is -1 which means to consider all tokens. Setting to 0 disables this method and considers all tokens.
If also using top p, then the model considers only the top tokens whose probabilities add up to p percent and ignores the rest of the k tokens. For example, if k is 20, but the probabilities of the top 10 add up to .75, then only the top 10 tokens are chosen.
|
TopP
Declaration
[JsonProperty(PropertyName = "topP")]
public double TopP { get; set; }
Property Value