MCPcopy Index your code
hub / github.com/google/adk-python / main

Function main

contributing/samples/models/interactions_api/main.py:411–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

409
410
411def main():
412 parser = argparse.ArgumentParser(
413 description="Test the Interactions API integration"
414 )
415 parser.add_argument(
416 "--mode",
417 choices=["test", "interactive"],
418 default="test",
419 help=(
420 "Run mode: 'test' runs automated tests, 'interactive' for manual"
421 " testing"
422 ),
423 )
424 parser.add_argument(
425 "--debug",
426 action="store_true",
427 help="Enable debug logging",
428 )
429
430 args = parser.parse_args()
431
432 if args.debug:
433 logs.setup_adk_logger(level=logging.DEBUG)
434 else:
435 logs.setup_adk_logger(level=logging.INFO)
436
437 start_time = time.time()
438
439 if args.mode == "test":
440 success = asyncio.run(run_all_tests())
441 if not success:
442 exit(1)
443
444 elif args.mode == "interactive":
445 asyncio.run(interactive_mode())
446
447 end_time = time.time()
448 print(f"\nTotal execution time: {end_time - start_time:.2f} seconds")
449
450
451if __name__ == "__main__":

Callers 1

main.pyFile · 0.70

Calls 5

run_all_testsFunction · 0.85
interactive_modeFunction · 0.85
parse_argsMethod · 0.80
timeMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected