@@ -38,6 +38,22 @@ public enum StreamingMode {
3838 BIDI
3939 }
4040
41+ /**
42+ * Tool execution mode for the runner, when they are multiple tools requested (by the models or
43+ * callbacks).
44+ *
45+ * <p>NONE: default to PARALLEL.
46+ *
47+ * <p>SEQUENTIAL: Multiple tools are executed in the order they are requested.
48+ *
49+ * <p>PARALLEL: Multiple tools are executed in parallel.
50+ */
51+ public enum ToolExecutionMode {
52+ NONE ,
53+ SEQUENTIAL ,
54+ PARALLEL
55+ }
56+
4157 public abstract @ Nullable SpeechConfig speechConfig ();
4258
4359 public abstract ImmutableList <Modality > responseModalities ();
@@ -46,6 +62,8 @@ public enum StreamingMode {
4662
4763 public abstract StreamingMode streamingMode ();
4864
65+ public abstract ToolExecutionMode toolExecutionMode ();
66+
4967 public abstract @ Nullable AudioTranscriptionConfig outputAudioTranscription ();
5068
5169 public abstract @ Nullable AudioTranscriptionConfig inputAudioTranscription ();
@@ -59,13 +77,15 @@ public static Builder builder() {
5977 .setSaveInputBlobsAsArtifacts (false )
6078 .setResponseModalities (ImmutableList .of ())
6179 .setStreamingMode (StreamingMode .NONE )
80+ .setToolExecutionMode (ToolExecutionMode .NONE )
6281 .setMaxLlmCalls (500 );
6382 }
6483
6584 public static Builder builder (RunConfig runConfig ) {
6685 return new AutoValue_RunConfig .Builder ()
6786 .setSaveInputBlobsAsArtifacts (runConfig .saveInputBlobsAsArtifacts ())
6887 .setStreamingMode (runConfig .streamingMode ())
88+ .setToolExecutionMode (runConfig .toolExecutionMode ())
6989 .setMaxLlmCalls (runConfig .maxLlmCalls ())
7090 .setResponseModalities (runConfig .responseModalities ())
7191 .setSpeechConfig (runConfig .speechConfig ())
@@ -89,6 +109,9 @@ public abstract static class Builder {
89109 @ CanIgnoreReturnValue
90110 public abstract Builder setStreamingMode (StreamingMode streamingMode );
91111
112+ @ CanIgnoreReturnValue
113+ public abstract Builder setToolExecutionMode (ToolExecutionMode toolExecutionMode );
114+
92115 @ CanIgnoreReturnValue
93116 public abstract Builder setOutputAudioTranscription (
94117 @ Nullable AudioTranscriptionConfig outputAudioTranscription );
0 commit comments