Skip to content

Commit 0c6974c

Browse files
DeanChensjcopybara-github
authored andcommitted
fix: Set role='model' for request_input event Content
Set role='model' in the Content object generated by create_request_input_event() to ensure proper role attribution when returning function call events to the client. Co-authored-by: Shangjie Chen <deanchen@google.com> PiperOrigin-RevId: 929538818
1 parent 048deea commit 0c6974c

15 files changed

Lines changed: 91 additions & 18 deletions

File tree

contributing/samples/hitl/tool_confirmation/tests/Transfer_500_and_close_account_ACC123.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
}
9595
}
9696
],
97-
"role": "user"
97+
"role": "model"
9898
},
9999
"id": "e-3",
100100
"invocationId": "i-1",

contributing/samples/hitl/tool_confirmation/tests/close_account_acc123.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
}
6565
}
6666
],
67-
"role": "user"
67+
"role": "model"
6868
},
6969
"id": "e-3",
7070
"invocationId": "i-1",

contributing/samples/hitl/tool_confirmation/tests/transfer_200_confirmed.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767
}
6868
],
69-
"role": "user"
69+
"role": "model"
7070
},
7171
"id": "e-3",
7272
"invocationId": "i-1",

contributing/samples/hitl/tool_confirmation/tests/transfer_200_declined.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767
}
6868
],
69-
"role": "user"
69+
"role": "model"
7070
},
7171
"id": "e-3",
7272
"invocationId": "i-1",

contributing/samples/multi_agent/sub_agents/tests/check_and_close.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
}
209209
}
210210
],
211-
"role": "user"
211+
"role": "model"
212212
},
213213
"id": "e-9",
214214
"invocationId": "i-1",

contributing/samples/multi_agent/task_sub_agent/tests/10_burgers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
}
177177
}
178178
],
179-
"role": "user"
179+
"role": "model"
180180
},
181181
"id": "e-9",
182182
"invocationId": "i-3",

contributing/samples/workflows/auth_api_key/tests/go.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"name": "adk_request_credential"
4444
}
4545
}
46-
]
46+
],
47+
"role": "model"
4748
},
4849
"id": "e-2",
4950
"invocationId": "i-1",

contributing/samples/workflows/request_input/tests/phone_broke.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
"name": "adk_request_input"
7474
}
7575
}
76-
]
76+
],
77+
"role": "model"
7778
},
7879
"id": "e-4",
7980
"invocationId": "i-1",
@@ -162,7 +163,8 @@
162163
"name": "adk_request_input"
163164
}
164165
}
165-
]
166+
],
167+
"role": "model"
166168
},
167169
"id": "e-8",
168170
"invocationId": "i-1",

contributing/samples/workflows/request_input/tests/phone_broke_reject.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
"name": "adk_request_input"
7373
}
7474
}
75-
]
75+
],
76+
"role": "model"
7677
},
7778
"id": "e-4",
7879
"invocationId": "i-1",

contributing/samples/workflows/request_input_advanced/tests/2_sick_days.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292
"name": "adk_request_input"
9393
}
9494
}
95-
]
95+
],
96+
"role": "model"
9697
},
9798
"id": "e-3",
9899
"invocationId": "i-1",

0 commit comments

Comments
 (0)