Prints the Google Cloud Console URL for the deployed agent.
(resource_name: str)
| 787 | |
| 788 | |
| 789 | def _print_agent_engine_url(resource_name: str) -> None: |
| 790 | """Prints the Google Cloud Console URL for the deployed agent.""" |
| 791 | parts = resource_name.split('/') |
| 792 | if len(parts) >= 6 and parts[0] == 'projects' and parts[2] == 'locations': |
| 793 | project_id = parts[1] |
| 794 | region = parts[3] |
| 795 | engine_id = parts[5] |
| 796 | |
| 797 | url = ( |
| 798 | 'https://console.cloud.google.com/vertex-ai/agents/agent-engines' |
| 799 | f'/locations/{region}/agent-engines/{engine_id}/playground' |
| 800 | f'?project={project_id}' |
| 801 | ) |
| 802 | click.secho( |
| 803 | f'\n🎉 View your deployed agent here:\n{url}\n', fg='cyan', bold=True |
| 804 | ) |
| 805 | |
| 806 | |
| 807 | def to_agent_engine( |
no test coverage detected