Saltar a contenido

Configurando el comportamiento de streaming

Supported in ADKPython v0.5.0Experimental

Hay algunas configuraciones que puedes establecer para agentes en vivo (streaming).

Se configura mediante RunConfig. Debes usar RunConfig con tu Runner.run_live(...).

Por ejemplo, si quieres configurar la configuración de voz, puedes aprovechar speech_config.

voice_config = genai_types.VoiceConfig(
    prebuilt_voice_config=genai_types.PrebuiltVoiceConfigDict(
        voice_name='Aoede'
    )
)
speech_config = genai_types.SpeechConfig(voice_config=voice_config)
run_config = RunConfig(speech_config=speech_config)

runner.run_live(
    ...,
    run_config=run_config,
)