Skip to content

Commit fe1d5aa

Browse files
hangfeicopybara-github
authored andcommitted
feat: add enable_affective_dialog and proactivity to run_config and llm_request
PiperOrigin-RevId: 772175206
1 parent 8201f9a commit fe1d5aa

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/google/adk/agents/run_config.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ class RunConfig(BaseModel):
7373
realtime_input_config: Optional[types.RealtimeInputConfig] = None
7474
"""Realtime input config for live agents with audio input from user."""
7575

76+
enable_affective_dialog: Optional[bool] = None
77+
"""If enabled, the model will detect emotions and adapt its responses accordingly."""
78+
79+
proactivity: Optional[types.ProactivityConfig] = None
80+
"""Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input."""
81+
7682
max_llm_calls: int = 500
7783
"""
7884
A limit on the total number of llm calls for a given run.

‎src/google/adk/flows/llm_flows/basic.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ async def run_async(
6868
llm_request.live_connect_config.realtime_input_config = (
6969
invocation_context.run_config.realtime_input_config
7070
)
71+
llm_request.live_connect_config.enable_affective_dialog = (
72+
invocation_context.run_config.enable_affective_dialog
73+
)
74+
llm_request.live_connect_config.proactivity = (
75+
invocation_context.run_config.proactivity
76+
)
7177

7278
# TODO: handle tool append here, instead of in BaseTool.process_llm_request.
7379

0 commit comments

Comments
 (0)