DashscopeParams
class DashscopeParams(temperature: Double? = null, maxTokens: Int? = null, numberOfChoices: Int? = null, speculation: String? = null, schema: LLMParams.Schema? = null, toolChoice: LLMParams.ToolChoice? = null, user: String? = null, additionalProperties: Map<String, JsonElement>? = null, val enableSearch: Boolean? = null, val parallelToolCalls: Boolean? = null, val enableThinking: Boolean? = null, val frequencyPenalty: Double? = null, val presencePenalty: Double? = null, val logprobs: Boolean? = null, val stop: List<String>? = null, val topLogprobs: Int? = null, val topP: Double? = null) : LLMParams(source)
DashScope chat-completions parameters layered on top of LLMParams.
Constructors
Link copied to clipboard
constructor(temperature: Double? = null, maxTokens: Int? = null, numberOfChoices: Int? = null, speculation: String? = null, schema: LLMParams.Schema? = null, toolChoice: LLMParams.ToolChoice? = null, user: String? = null, additionalProperties: Map<String, JsonElement>? = null, enableSearch: Boolean? = null, parallelToolCalls: Boolean? = null, enableThinking: Boolean? = null, frequencyPenalty: Double? = null, presencePenalty: Double? = null, logprobs: Boolean? = null, stop: List<String>? = null, topLogprobs: Int? = null, topP: Double? = null)
Properties
Link copied to clipboard
Link copied to clipboard
Whether to enable web search functionality (DashScope-specific).
Link copied to clipboard
Whether to enable the model's thinking mode (DashScope-specific).
Link copied to clipboard
Number in -2.0, 2.0—penalizes frequent tokens to reduce repetition.
Link copied to clipboard
Link copied to clipboard
Whether multiple tool calls can be made in parallel (DashScope-specific).
Link copied to clipboard
Number in -2.0, 2.0—encourages introduction of new tokens/topics.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Number of top alternatives per position (0–20). Requires logprobs = true.
Link copied to clipboard
Nucleus sampling in (0.0, 1.0]; use instead of temperature.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun copy(temperature: Double? = this.temperature, maxTokens: Int? = this.maxTokens, numberOfChoices: Int? = this.numberOfChoices, speculation: String? = this.speculation, schema: LLMParams.Schema? = this.schema, toolChoice: LLMParams.ToolChoice? = this.toolChoice, user: String? = this.user, additionalProperties: Map<String, JsonElement>? = this.additionalProperties, enableSearch: Boolean? = this.enableSearch, parallelToolCalls: Boolean? = this.parallelToolCalls, enableThinking: Boolean? = this.enableThinking, frequencyPenalty: Double? = this.frequencyPenalty, presencePenalty: Double? = this.presencePenalty, logprobs: Boolean? = this.logprobs, stop: List<String>? = this.stop, topLogprobs: Int? = this.topLogprobs, topP: Double? = this.topP): DashscopeParams
Creates a copy of this instance with the ability to modify any of its properties.
open fun copy(temperature: Double?, maxTokens: Int?, numberOfChoices: Int?, speculation: String?, schema: LLMParams.Schema?, toolChoice: LLMParams.ToolChoice?, user: String?, additionalProperties: Map<String, JsonElement>?): LLMParams