how can we resume Human-in-loop using API? #6221
Replies: 1 comment
|
The shape is close, but for ADK resume the function response has to be treated as the resume message for the same interrupted invocation, not as a normal new user message. The current RequestInput docs say the client resumes by sending a So I would check this minimal message shape first: {
"role": "user",
"parts": [
{
"functionResponse": {
"id": "the exact interrupt_id from the RequestInput event",
"name": "adk_request_input",
"response": { "result": "approve" }
}
}
]
}Use the same |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am trying to resume human-in-loop from .NET client using API, but its not giving 400 with unclear error. "status": "FAILED_PRECONDITION"
curl -X POST "https://us-central1-aiplatform.googleapis.com/v1/projects/ai-gcp/locations/us-central1/reasoningEngines/121093008882072:streamQuery?alt=sse"
-H "Authorization: Bearer YOUR_GOOGLE_ACCESS_TOKEN"
-H "Accept: text/event-stream"
-H "Content-Type: application/json"
-d '{
"classMethod":"async_stream_query",
"input":{
"session_id":"292676045260193792",
"message":{
"author":"user",
"content":{
"role":"user",
"parts":[
{
"functionResponse":{
"id":"f84ab8a3-27c7-49ac-b9d1-3364361cfca4", // this my interruptId
"name":"adk_request_input",
"response":{"result":"approve"}
}
}
]
}
}
}
}'
Please advise.
All reactions