类名:RunConfig
java.lang.Object
com.google.adk.agents.RunConfig
用于修改代理(agent)所使用的大型语言模型(LLM)的基础行为的配置设置。
-
嵌套类概述
Nested ClassesModifier and TypeClassDescriptionstatic class“Builder for”是一个用于描述某种构建工具或框架的术语。它通常表示该工具/框架用于帮助开发者或系统管理员快速、高效地创建或构建特定类型的应用程序、系统或组件。例如:“Builder for Web Applications”(用于构建Web应用程序的工具)或“Builder for Cloud Services”(用于构建云服务的工具)。RunConfig.static enum运行器的流式处理模式(Streaming mode for the runner)。static enum当模型请求使用多个工具时,应采用的执行模式。 -
构造函数概述
Constructors -
方法概述
Modifier and TypeMethodDescriptionabstract booleanabstract @Nullable com.google.genai.types.AvatarConfigstatic RunConfig.Builderbuilder()static RunConfig.Builderabstract boolean是否在某个指令之后立即放置一个占位符(instruction placeholder)?$或者\例如:${key},${{key}}或者\{key}该名称被保留原样(即未被替换为其他形式),也没有像 adk-python 那样被自动解析或替换。final boolean已弃用(Deprecated)。仅适用于特定型号的终端(endpoints)。已弃用(Deprecated)。仅适用于特定型号的终端(endpoints)。abstract @Nullable com.google.genai.types.AudioTranscriptionConfigabstract intabstract @Nullable com.google.genai.types.AudioTranscriptionConfigabstract com.google.common.collect.ImmutableList<com.google.genai.types.Modality> abstract booleanabstract @Nullable com.google.genai.types.SpeechConfigabstract RunConfig.StreamingModeabstract RunConfig.Builderabstract RunConfig.ToolExecutionMode
-
构造函数详细信息
-
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
-
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.Expected only for specific model endpoints.在历史记录中(FC1、FC2、FR1、FR2),函数调用会被分组在一起,而不是将每个函数的响应与其对应的调用记录配对显示。这种分组方式适用于需要分析多个函数调用之间的依赖关系或交互情况的场景。“Empty”(默认值)仅适用于那些需要该设置的模型(例如 Gemini 3);当该值被设置为 “Present” 时,它将适用于所有模型。
对于核心的 ADK Gemini 实现来说,这一功能并非必需(因为 Gemini 3 已经能够自动对数据进行分组处理)。保留该功能的目的是为了与其他型号的实现保持向后兼容性——那些需要将数据分组后才能发送到相应端点的系统。
-
groupFunctionResponsesInHistory
Deprecated.Expected only for specific model endpoints.是否明确启用了分组功能;相当于……groupFunctionResponsesInHistoryOverride().orElse(false)保留这些内容是为了确保与旧版本的兼容性。 -
customMetadata
-
toBuilder
-
builder
-
builder
-