|
if llm_request.contents and llm_request.contents[-1].parts: |
load_artifacts is not working as expected in workflow agent node . agent got stuck in loop of calling load_artifacts because Tool calls get converted to text by workflow layer and tool expects function response as last part
example of object inspect:
[Content(
parts=[ Part( text='For context:' ), Part( text="[no_po_hitl] load_invoice tool
returned result: {'artifact_name': 'E044267733', 'status': 'Artifact E044267733
loaded successfully'}" ), ], role=user' )]
This is text, not a function_response
adk-python/src/google/adk/tools/load_artifacts_tool.py
Line 212 in 0a290d5
load_artifacts is not working as expected in workflow agent node . agent got stuck in loop of calling load_artifacts because Tool calls get converted to text by workflow layer and tool expects function response as last part
example of object inspect:
[Content(
parts=[ Part( text='For context:' ), Part( text="[no_po_hitl]
load_invoicetoolreturned result: {'artifact_name': 'E044267733', 'status': 'Artifact E044267733
loaded successfully'}" ), ], role=user' )]
This is text, not a function_response