类名:RunConfig

java.lang.Object
com.google.adk.agents.RunConfig

public abstract class RunConfig extends Object
用于修改代理(agent)所使用的大型语言模型(LLM)的基础行为的配置设置。
  • 构造函数详细信息

    • RunConfig

      public RunConfig()
  • 方法详细信息(Method Details)

    • speechConfig

      public abstract @Nullable com.google.genai.types.SpeechConfig speechConfig()
    • responseModalities

      public abstract com.google.common.collect.ImmutableList<com.google.genai.types.Modality> responseModalities()
    • avatarConfig

      public abstract @Nullable com.google.genai.types.AvatarConfig avatarConfig()
    • saveInputBlobsAsArtifacts

      public abstract boolean saveInputBlobsAsArtifacts()
    • streamingMode

      public abstract RunConfig.StreamingMode streamingMode()
    • toolExecutionMode

      public abstract RunConfig.ToolExecutionMode toolExecutionMode()
    • outputAudioTranscription

      public abstract @Nullable com.google.genai.types.AudioTranscriptionConfig outputAudioTranscription()
    • inputAudioTranscription

      public abstract @Nullable com.google.genai.types.AudioTranscriptionConfig inputAudioTranscription()
    • maxLlmCalls

      public abstract int maxLlmCalls()
    • autoCreateSession

      public abstract boolean autoCreateSession()
    • dollarEscapedPlaceholders

      public abstract boolean dollarEscapedPlaceholders()
      是否在某个指令之后立即放置一个占位符(instruction placeholder)? $ 或者 \例如: ${key}, ${{key}} 或者 \{key}该名称被保留原样(即未被替换为其他值),而不是像 adk-python 那样被自动替换为相应的值。默认情况下,该名称保持不变。 false这个方法可以解决这个问题,并保留该字符之前的所有内容。
    • groupFunctionResponsesInHistoryOverride

      @Deprecated public abstract Optional<Boolean> groupFunctionResponsesInHistoryOverride()
      Deprecated.
      Expected only for specific model endpoints.
      在历史记录中(FC1、FC2、FR1、FR2),函数调用会被分组在一起,而不是将每个函数的响应与其对应的调用记录配对显示。这种分组方式适用于需要分析多个函数调用之间的依赖关系或交互情况的场景。

      “Empty”(默认值)仅适用于那些需要该设置的模型(例如 Gemini 3);当该值被设置为 “Present” 时,它将适用于所有模型。

      对于核心的 ADK Gemini 实现来说,这一功能并非必需(因为 Gemini 3 已经能够自动对数据进行分组处理)。保留该功能的目的是为了与其他型号的实现保持向后兼容性——那些需要将数据分组后才能发送到相应端点的系统。

    • groupFunctionResponsesInHistory

      @Deprecated public final boolean groupFunctionResponsesInHistory()
      Deprecated.
      Expected only for specific model endpoints.
      是否明确启用了分组功能;相当于…… groupFunctionResponsesInHistoryOverride().orElse(false)保留这些内容是为了确保与旧版本的兼容性。
    • customMetadata

      public abstract com.google.common.collect.ImmutableMap<String,Object> customMetadata()
    • toBuilder

      public abstract RunConfig.Builder toBuilder()
    • builder

      public static RunConfig.Builder builder()
    • builder

      public static RunConfig.Builder builder(RunConfig runConfig)