Configs for runtime behavior of agents. The configs here will be overridden by agent-specific configurations.
| 183 | |
| 184 | |
| 185 | class RunConfig(BaseModel): |
| 186 | """Configs for runtime behavior of agents. |
| 187 | |
| 188 | The configs here will be overridden by agent-specific configurations. |
| 189 | """ |
| 190 | |
| 191 | model_config = ConfigDict( |
| 192 | extra='forbid', |
| 193 | ) |
| 194 | """The pydantic model config.""" |
| 195 | |
| 196 | speech_config: Optional[types.SpeechConfig] = None |
| 197 | """Speech configuration for the live agent.""" |
| 198 | |
| 199 | response_modalities: Optional[list[str]] = None |
| 200 | """The output modalities. If not set, it's default to AUDIO.""" |
| 201 | |
| 202 | avatar_config: Optional[types.AvatarConfig] = None |
| 203 | """Avatar configuration for the live agent.""" |
| 204 | |
| 205 | save_input_blobs_as_artifacts: bool = Field( |
| 206 | default=False, |
| 207 | deprecated=True, |
| 208 | description=( |
| 209 | 'Whether or not to save the input blobs as artifacts. DEPRECATED: Use' |
| 210 | ' SaveFilesAsArtifactsPlugin instead for better control and' |
| 211 | ' flexibility. See google.adk.plugins.SaveFilesAsArtifactsPlugin.' |
| 212 | ), |
| 213 | ) |
| 214 | |
| 215 | support_cfc: bool = False |
| 216 | """ |
| 217 | Whether to support CFC (Compositional Function Calling). Only applicable for |
| 218 | StreamingMode.SSE. If it's true. the LIVE API will be invoked. Since only LIVE |
| 219 | API supports CFC |
| 220 | |
| 221 | .. warning:: |
| 222 | This feature is **experimental** and its API or behavior may change |
| 223 | in future releases. |
| 224 | """ |
| 225 | |
| 226 | streaming_mode: StreamingMode = StreamingMode.NONE |
| 227 | """Streaming mode, None or StreamingMode.SSE or StreamingMode.BIDI.""" |
| 228 | |
| 229 | output_audio_transcription: Optional[types.AudioTranscriptionConfig] = Field( |
| 230 | default_factory=types.AudioTranscriptionConfig |
| 231 | ) |
| 232 | """Output transcription for live agents with audio response.""" |
| 233 | |
| 234 | input_audio_transcription: Optional[types.AudioTranscriptionConfig] = Field( |
| 235 | default_factory=types.AudioTranscriptionConfig |
| 236 | ) |
| 237 | """Input transcription for live agents with audio input from user.""" |
| 238 | |
| 239 | realtime_input_config: Optional[types.RealtimeInputConfig] = None |
| 240 | """Realtime input config for live agents with audio input from user.""" |
| 241 | |
| 242 | translation_config: Optional[types.TranslationConfig] = None |
no outgoing calls