Replies: 2 comments
-
|
From the docs/samples, new_message = types.Content(
role="user",
parts=[types.Part(function_response=types.FunctionResponse(
id=original_function_call.id,
name=original_function_call.name,
response={"status": "completed", "result": result},
))],
)
async for event in runner.run_async(
user_id=user_id,
session_id=session_id,
invocation_id=paused_invocation_id,
new_message=new_message,
):
...The |
Beta Was this translation helpful? Give feedback.
-
|
@barry166 The flow should be as follows: Tool call -----> return pre-response ---> long running ---> (tool completed) ---> how to know user ?? ---> user(or FE) or any outside of runner --> send Function Response to run_async as new message. When Alternatively, when injecting a function response via there were occasional instances where a message indicating that the previous tool had terminated was displayed to the agent, even though the user had connected to the agent with a new request. (This was not always the case; the termination of many past tools was ignored.) In that case, should LongRunningTools, excluding HITL, remain in a waiting state for an extended period? (Can't they perform BG jobs?) Should they be prevented from receiving additional user input while waiting for the tool's final result? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It's not "HITL."
the tool has a long execution time, so when the user has to wait,
I wonder how to turn the user so that user can ask the next question without blocking(waiting).
and
when the tool is completed, it should be able to inform the user.
The example mentions only a case for HITL.
HITL injects new_message from outside back to Agent.
but. I want to know it without user input(like approval)
https://github.com/google/adk-python/tree/main/contributing/samples/tools/long_running_functions
I am curious about the process from start to in-progress to complete ( not HITL ).
how agent know tool is completed. and how to get result of tool?
Beta Was this translation helpful? Give feedback.
All reactions