feat: add enable_affective_dialog and proactivity to run_config and llm_request

PiperOrigin-RevId: 772175206
This commit is contained in:
Hangfei Lin
2025-06-16 14:35:16 -07:00
committed by Copybara-Service
parent 8201f9aebd
commit fe1d5aa439
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -73,6 +73,12 @@ class RunConfig(BaseModel):
realtime_input_config: Optional[types.RealtimeInputConfig] = None
"""Realtime input config for live agents with audio input from user."""
enable_affective_dialog: Optional[bool] = None
"""If enabled, the model will detect emotions and adapt its responses accordingly."""
proactivity: Optional[types.ProactivityConfig] = None
"""Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input."""
max_llm_calls: int = 500
"""
A limit on the total number of llm calls for a given run.
+6
View File
@@ -68,6 +68,12 @@ class _BasicLlmRequestProcessor(BaseLlmRequestProcessor):
llm_request.live_connect_config.realtime_input_config = (
invocation_context.run_config.realtime_input_config
)
llm_request.live_connect_config.enable_affective_dialog = (
invocation_context.run_config.enable_affective_dialog
)
llm_request.live_connect_config.proactivity = (
invocation_context.run_config.proactivity
)
# TODO: handle tool append here, instead of in BaseTool.process_llm_request.