Provides data for TestEvaluateInvocationsAgentTree.
()
| 461 | |
| 462 | @pytest.fixture |
| 463 | def agent_tree_data(): |
| 464 | """Provides data for TestEvaluateInvocationsAgentTree.""" |
| 465 | app_details = AppDetails( |
| 466 | agent_details={ |
| 467 | "root": AgentDetails( |
| 468 | name="root", |
| 469 | instructions="Root agent instructions.", |
| 470 | tool_declarations=[ |
| 471 | genai_types.Tool( |
| 472 | function_declarations=[ |
| 473 | genai_types.FunctionDeclaration(name="tool_root") |
| 474 | ] |
| 475 | ) |
| 476 | ], |
| 477 | ), |
| 478 | "agent1": AgentDetails( |
| 479 | name="agent1", |
| 480 | instructions="Agent1 instructions.", |
| 481 | tool_declarations=[ |
| 482 | genai_types.Tool( |
| 483 | function_declarations=[ |
| 484 | genai_types.FunctionDeclaration(name="tool_agent1") |
| 485 | ] |
| 486 | ) |
| 487 | ], |
| 488 | ), |
| 489 | "agent2": AgentDetails( |
| 490 | name="agent2", |
| 491 | instructions="Agent2 instructions.", |
| 492 | tool_declarations=[], |
| 493 | ), |
| 494 | }, |
| 495 | ) |
| 496 | user_content = genai_types.Content( |
| 497 | parts=[genai_types.Part(text="User query for agent tree.")] |
| 498 | ) |
| 499 | events = [ |
| 500 | InvocationEvent( |
| 501 | author="root", |
| 502 | content=genai_types.Content( |
| 503 | parts=[genai_types.Part(text="Hi, I am root.")] |
| 504 | ), |
| 505 | ), |
| 506 | InvocationEvent( |
| 507 | author="root", |
| 508 | content=genai_types.Content( |
| 509 | parts=[ |
| 510 | genai_types.Part( |
| 511 | function_call=genai_types.FunctionCall( |
| 512 | name="tool_root", args={} |
| 513 | ) |
| 514 | ) |
| 515 | ] |
| 516 | ), |
| 517 | ), |
| 518 | InvocationEvent( |
| 519 | author="root", |
| 520 | content=genai_types.Content( |
nothing calls this directly
no test coverage detected