Class ApplicationParam.ApplicationParamBuilder<C extends ApplicationParam,B extends ApplicationParam.ApplicationParamBuilder<C,B>>

java.lang.Object
com.alibaba.dashscope.legacy_2x.base.HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C,B>
com.alibaba.dashscope.legacy_2x.app.ApplicationParam.ApplicationParamBuilder<C,B>
Direct Known Subclasses:
RagApplicationParam.RagApplicationParamBuilder
Enclosing class:
ApplicationParam

public abstract static class ApplicationParam.ApplicationParamBuilder<C extends ApplicationParam,B extends ApplicationParam.ApplicationParamBuilder<C,B>> extends HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C,B>
  • Constructor Details

    • ApplicationParamBuilder

      public ApplicationParamBuilder()
  • Method Details

    • resources

      public B resources(Object resources)
      Returns:
      this.
    • appId

      public B appId(@NonNull @NonNull String appId)
      Id of bailian application
      Returns:
      this.
    • prompt

      public B prompt(String prompt)
      prompt
      Returns:
      this.
    • history

      public B history(List<History> history)
      chat history
      Returns:
      this.
    • messages

      public B messages(List<Message> messages)
      chat message
      Returns:
      this.
    • sessionId

      public B sessionId(String sessionId)
      Session id for storing chat history note: this will be ignored if history passed
      Returns:
      this.
    • hasThoughts

      public B hasThoughts(Boolean hasThoughts)
      Flag to return rag or plugin process details
      Returns:
      this.
    • bizParams

      public B bizParams(com.google.gson.JsonObject bizParams)
      The extra parameters for flow or plugin.
      Returns:
      this.
    • topP

      public B topP(Double 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

      public B topK(Integer topK)
      A sampling strategy, the k largest elements of the given mass are considered
      Returns:
      this.
    • seed

      public B seed(Integer seed)
      When generating, the seed of the random number is used to control the randomness of the model generation. If you use the same seed, each run will generate the same results; you can use the same seed when you need to reproduce the model's generated results. The seed parameter supports unsigned 64-bit integer types. Default value 1234
      Returns:
      this.
    • temperature

      public B temperature(Float 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).
      Returns:
      this.
    • incrementalOutput

      public B incrementalOutput(Boolean 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.
      Returns:
      this.
    • memoryId

      public B memoryId(String memoryId)
      Long term memory id is used to store long term context summary between end users and assistant.
      Returns:
      this.
    • images

      public B images(List<String> images)
      image list
      Returns:
      this.
    • files

      public B files(List<String> files)
      file list
      Returns:
      this.
    • ragOptions

      public B ragOptions(RagOptions ragOptions)
      rag options
      Returns:
      this.
    • mcpServers

      public B mcpServers(List<String> mcpServers)
      mcp server list
      Returns:
      this.
    • enableWebSearch

      public B enableWebSearch(Boolean enableWebSearch)
      enable web search
      Returns:
      this.
    • enableSystemTime

      public B enableSystemTime(Boolean enableSystemTime)
      enable system time
      Returns:
      this.
    • enablePremium

      public B enablePremium(Boolean enablePremium)
      enable prem model calling
      Returns:
      this.
    • dialogRound

      public B dialogRound(Integer dialogRound)
      dialog round number
      Returns:
      this.
    • modelId

      public B modelId(String modelId)
      model ID
      Returns:
      this.
    • flowStreamMode

      public B flowStreamMode(FlowStreamMode flowStreamMode)
      stream mode for flow agent
      Returns:
      this.
    • enableThinking

      public B enableThinking(Boolean enableThinking)
      enable thinking mode
      Returns:
      this.
    • cipServiceCodes

      public B cipServiceCodes(CipServiceCodes cipServiceCodes)
      CIP service codes for content security check
      Returns:
      this.
    • self

      protected abstract B self()
      Specified by:
      self in class HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C extends ApplicationParam,B extends ApplicationParam.ApplicationParamBuilder<C,B>>
    • build

      public abstract C build()
      Specified by:
      build in class HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C extends ApplicationParam,B extends ApplicationParam.ApplicationParamBuilder<C,B>>
    • toString

      public String toString()
      Overrides:
      toString in class HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C extends ApplicationParam,B extends ApplicationParam.ApplicationParamBuilder<C,B>>