Class MultiModalConversationParam.MultiModalConversationParamBuilder<C extends MultiModalConversationParam,B extends MultiModalConversationParam.MultiModalConversationParamBuilder<C,B>>
java.lang.Object
com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C,B>
com.alibaba.dashscope.legacy_2x.base.HalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C,B>
com.alibaba.dashscope.legacy_2x.aigc.multimodalconversation.MultiModalConversationParam.MultiModalConversationParamBuilder<C,B>
- Enclosing class:
- MultiModalConversationParam
public abstract static class MultiModalConversationParam.MultiModalConversationParamBuilder<C extends MultiModalConversationParam,B extends MultiModalConversationParam.MultiModalConversationParamBuilder<C,B>>
extends HalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C,B>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaudio(AudioParameters audio) audio output parametersabstract Cbuild()enableSearch(Boolean enableSearch) enableThinking(Boolean enableThinking) enable thinkingincrementalOutput(Boolean incrementalOutput) Used to control the streaming output mode.languageType(String languageType) language type for ttswhether to return log probabilities of output tokens, supported for qwen-vl-ocr-2025-04-13 and laterDeprecated.The maximum length of tokens to generate.messages(Collection<? extends Object> messages) modalities(List<String> modalities) Output format of the model including "text" and "audio".number of imagesnegativePrompt(String negativePrompt) negative promptocrOptions(OcrOptions ocrOptions) ocr optionsparallelToolCalls(Boolean parallelToolCalls) enable parallel tool callspresencePenalty(Float presencePenalty) A parameter that controls the repetitiveness of words.promptExtend(Boolean promptExtend) prompt extendrepetitionPenalty(Float repetitionPenalty) Used to control the repetitiveness of the model when generating text.responseFormat(ResponseFormat responseFormat) response formatsearchOptions(SearchOptions searchOptions) Web search strategy.protected abstract Bself()picture sizestopString(String stopString) stopStrings(Collection<? extends String> stopStrings) stopTokens(Collection<? extends List<Integer>> stopTokens) temperature(Float temperature) Used to control the degree of randomness and diversity.text inputthinkingBudget(Integer thinkingBudget) thinking budgettoolChoice(Object toolChoice) Specify tool choiceSpecify which tools the model can use.A sampling strategy, the k largest elements of the given mass are consideredtopLogprobs(Integer topLogprobs) number of top candidate tokens to return log probabilities for, range [0,5], only effective when logprobs is trueA sampling strategy, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.toString()vlEnableImageHwOutput(Boolean vlEnableImageHwOutput) enable vl_enable_image_hw_outputvlHighResolutionImages(Boolean vlHighResolutionImages) enable vl_high_resolution_imagesvoice(AudioParameters.Voice voice) voice of ttswatermarkMethods inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexServiceParam.HalfDuplexServiceParamBuilder
model, resourcesMethods inherited from class com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase.HalfDuplexParamBaseBuilder
apiKey, clearHeaders, clearParameters, enableEncrypt, header, headers, parameter, parameters, securityCheck, workspace
-
Constructor Details
-
MultiModalConversationParamBuilder
public MultiModalConversationParamBuilder()
-
-
Method Details
-
message
-
messages
-
clearMessages
-
maxLength
Deprecated.The maximum length of tokens to generate. The token count of your prompt plus max_length cannot exceed the model's context length. Most models have a context length of 2000 tokens- Returns:
this.
-
topP
A sampling strategy, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered- Returns:
this.
-
topK
A sampling strategy, the k largest elements of the given mass are considered- Returns:
this.
-
repetitionPenalty
Used to control the repetitiveness of the model when generating text. Increasing the repetition_penalty can reduce the repetitiveness of the model's output. A value of 1.0 indicates no penalty. Default value: 1.0- Returns:
this.
-
presencePenalty
A parameter that controls the repetitiveness of words. It reduces the probability of the same word appearing repeatedly by penalizing words that have already been generated, thus increasing the diversity of the generated text. A value of 0 indicates no penalty. Default value: 0.0- Returns:
this.
-
enableSearch
- Returns:
this.
-
searchOptions
Web search strategy. Takes effect only when enable_search is true.- Returns:
this.
-
seed
- Returns:
this.
-
temperature
Used to control the degree of randomness and diversity. Specifically, the temperature value controls the degree to which the probability distribution of each candidate word is smoothed when generating text. A higher temperature value will reduce the peak value of the probability distribution, allowing more low-probability words to be selected, and the generated results will be more diverse; while a lower temperature value will enhance the peak value of the probability distribution, making it easier for high-probability words to be selected, the generated results are more deterministic, range(0, 2). Default value: 1.0- Returns:
this.
-
maxTokens
The maximum length of tokens to generate. The token count of your prompt plus max_length cannot exceed the model's context length.- Returns:
this.
-
incrementalOutput
Used to control the streaming output mode. If true, the subsequent output will include the previously input content by default. Otherwise, the subsequent output will not include the previously output content. Default: false eg(false): /** Used to control the streaming output mode. If true, each chunk contains only incremental content without accumulation. If false, SDK accumulates chunks locally and returns full content in each chunk. Must be explicitly set - no default value.incrementalOutput=true (incremental): Chunk1: reasoning="I'll analyze first", content=[] Chunk2: reasoning="It looks like a sheep", content=[{text="This image"}] Chunk3: reasoning="", content=[{text="and a car"}] incrementalOutput=false (full): Chunk1: reasoning="I'll analyze first", content=[] Chunk2: reasoning="I'll analyze first. It looks like a sheep", content=[{text="This image"}] Chunk3: reasoning="I'll analyze first. It looks like a sheep", content=[{text="This image and a car"}]- Returns:
this.
-
modalities
Output format of the model including "text" and "audio". Default value: ["text"]- Returns:
this.
-
audio
audio output parameters- Returns:
this.
-
ocrOptions
ocr options- Returns:
this.
-
text
text input- Returns:
this.
-
voice
voice of tts- Returns:
this.
-
tools
Specify which tools the model can use.- Returns:
this.
-
toolChoice
Specify tool choice- Returns:
this.
-
parallelToolCalls
enable parallel tool calls- Returns:
this.
-
vlHighResolutionImages
enable vl_high_resolution_images- Returns:
this.
-
vlEnableImageHwOutput
enable vl_enable_image_hw_output- Returns:
this.
-
responseFormat
response format- Returns:
this.
-
negativePrompt
negative prompt- Returns:
this.
-
promptExtend
prompt extend- Returns:
this.
-
watermark
watermark- Returns:
this.
-
size
picture size- Returns:
this.
-
n
number of images- Returns:
this.
-
languageType
language type for tts- Returns:
this.
-
enableThinking
enable thinking- Returns:
this.
-
thinkingBudget
thinking budget- Returns:
this.
-
stopString
-
stopStrings
-
clearStopStrings
-
stopToken
-
stopTokens
-
clearStopTokens
-
logprobs
whether to return log probabilities of output tokens, supported for qwen-vl-ocr-2025-04-13 and later- Returns:
this.
-
topLogprobs
number of top candidate tokens to return log probabilities for, range [0,5], only effective when logprobs is true- Returns:
this.
-
self
- Specified by:
selfin classHalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C extends MultiModalConversationParam,B extends MultiModalConversationParam.MultiModalConversationParamBuilder<C, B>>
-
build
- Specified by:
buildin classHalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C extends MultiModalConversationParam,B extends MultiModalConversationParam.MultiModalConversationParamBuilder<C, B>>
-
toString
- Overrides:
toStringin classHalfDuplexServiceParam.HalfDuplexServiceParamBuilder<C extends MultiModalConversationParam,B extends MultiModalConversationParam.MultiModalConversationParamBuilder<C, B>>
-