Class ConversationParam.ConversationParamBuilder<C extends ConversationParam,B extends ConversationParam.ConversationParamBuilder<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.generation.GenerationParamBase.GenerationParamBaseBuilder<C,B>
com.alibaba.dashscope.legacy_2x.aigc.conversation.ConversationParam.ConversationParamBuilder<C,B>
- Enclosing class:
- ConversationParam
public abstract static class ConversationParam.ConversationParamBuilder<C extends ConversationParam,B extends ConversationParam.ConversationParamBuilder<C,B>>
extends GenerationParamBase.GenerationParamBaseBuilder<C,B>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Cbuild()enableSearch(Boolean enableSearch) incrementalOutput(Boolean incrementalOutput) Used to control the streaming output mode.Deprecated.repetitionPenalty(Float repetitionPenalty) resultFormat(String resultFormat) The output format, text or message, default message.protected abstract Bself()stopString(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.toString()Methods inherited from class com.alibaba.dashscope.legacy_2x.aigc.generation.GenerationParamBase.GenerationParamBaseBuilder
history, promptMethods 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
-
ConversationParamBuilder
public ConversationParamBuilder()
-
-
Method Details
-
messages
- Returns:
this.
-
maxLength
Deprecated.- Returns:
this.
-
topP
- Returns:
this.
-
topK
- Returns:
this.
-
enableSearch
- Returns:
this.
-
seed
- Returns:
this.
-
resultFormat
The output format, text or message, default message.- 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) for [qwen-turbo,qwen-plus].- 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):I I like I like apple true: I like apple
- Returns:
this.
-
maxTokens
- Returns:
this.
-
repetitionPenalty
- Returns:
this.
-
stopString
-
stopStrings
-
clearStopStrings
-
stopToken
-
stopTokens
-
clearStopTokens
-
self
- Specified by:
selfin classGenerationParamBase.GenerationParamBaseBuilder<C extends ConversationParam,B extends ConversationParam.ConversationParamBuilder<C, B>>
-
build
- Specified by:
buildin classGenerationParamBase.GenerationParamBaseBuilder<C extends ConversationParam,B extends ConversationParam.ConversationParamBuilder<C, B>>
-
toString
- Overrides:
toStringin classGenerationParamBase.GenerationParamBaseBuilder<C extends ConversationParam,B extends ConversationParam.ConversationParamBuilder<C, B>>
-