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.
|
Declaration
[JsonProperty(PropertyName = "isParallelToolCalls")]
public bool? IsParallelToolCalls { get; set; }
Property Value
Type |
Description |
bool? |
Whether to enable parallel function calling during tool use.
|
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}'
|
MaxCompletionTokens
Declaration
[JsonProperty(PropertyName = "maxCompletionTokens")]
public int? MaxCompletionTokens { get; set; }
Property Value
Type |
Description |
int? |
An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
|
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. For on-demand inferencing, the response length is capped at 4,000 tokens for each run.
|
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.
|
Declaration
[JsonProperty(PropertyName = "metadata")]
public object Metadata { get; set; }
Property Value
Type |
Description |
object |
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
|
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.
|
Prediction
Declaration
[JsonProperty(PropertyName = "prediction")]
public Prediction Prediction { get; set; }
Property Value
PresencePenalty
Declaration
[JsonProperty(PropertyName = "presencePenalty")]
public double PresencePenalty { get; set; }
Property Value
ReasoningEffort
Declaration
[JsonProperty(PropertyName = "reasoningEffort")]
[JsonConverter(typeof(StringEnumConverter))]
public GenericChatRequest.ReasoningEffortEnum? ReasoningEffort { get; set; }
Property Value
Type |
Description |
GenericChatRequest.ReasoningEffortEnum? |
Constrains effort on reasoning for reasoning models. Currently supported values are minimal, low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
|
Declaration
[JsonProperty(PropertyName = "responseFormat")]
public ResponseFormat ResponseFormat { get; set; }
Property Value
Seed
Declaration
[JsonProperty(PropertyName = "seed")]
public int? Seed { get; set; }
Property Value
Type |
Description |
int? |
If specified, the backend will make a best effort to sample tokens deterministically, so that repeated requests with the same seed and parameters yield the same result. However, determinism cannot be fully guaranteed.
|
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.
|
StreamOptions
Declaration
[JsonProperty(PropertyName = "streamOptions")]
public StreamOptions StreamOptions { get; set; }
Property Value
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.
|
Declaration
[JsonProperty(PropertyName = "toolChoice")]
public ToolChoice ToolChoice { get; set; }
Property Value
Declaration
[JsonProperty(PropertyName = "tools")]
public List<ToolDefinition> Tools { get; set; }
Property Value
Type |
Description |
List<ToolDefinition> |
A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
|
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
Verbosity
Declaration
[JsonProperty(PropertyName = "verbosity")]
[JsonConverter(typeof(StringEnumConverter))]
public GenericChatRequest.VerbosityEnum? Verbosity { get; set; }
Property Value
Type |
Description |
GenericChatRequest.VerbosityEnum? |
Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses.
|