From cb2b13dff63286fdef13edb84bbf49b1e5e44025 Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Tue, 16 May 2023 03:46:20 -0500 Subject: [PATCH] Legal warning on continuous run (#4239) * feat: legal warning on continuous * fix: formatting * ci: fix formatting --- autogpt/main.py | 5 +++++ autogpt/utils.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/autogpt/main.py b/autogpt/main.py index 1a0f6adb4629..d07a0993cbe0 100644 --- a/autogpt/main.py +++ b/autogpt/main.py @@ -16,6 +16,7 @@ from autogpt.utils import ( get_current_git_branch, get_latest_bulletin, + get_legal_warning, markdown_to_ansi_style, ) from autogpt.workspace import Workspace @@ -60,6 +61,10 @@ def run_auto_gpt( skip_news, ) + if cfg.continuous_mode: + for line in get_legal_warning().split("\n"): + logger.warn(markdown_to_ansi_style(line), "LEGAL:", Fore.RED) + if not cfg.skip_news: motd, is_new_motd = get_latest_bulletin() if motd: diff --git a/autogpt/utils.py b/autogpt/utils.py index 6a3ef0ae78a5..8685d40263ea 100644 --- a/autogpt/utils.py +++ b/autogpt/utils.py @@ -153,3 +153,24 @@ def markdown_to_ansi_style(markdown: str): ansi_lines.append(f"{line_style}{line}{Style.RESET_ALL}") return "\n".join(ansi_lines) + + +def get_legal_warning() -> str: + legal_text = """ +## DISCLAIMER AND INDEMNIFICATION AGREEMENT +### PLEASE READ THIS DISCLAIMER AND INDEMNIFICATION AGREEMENT CAREFULLY BEFORE USING THE AUTOGPT SYSTEM. BY USING THE AUTOGPT SYSTEM, YOU AGREE TO BE BOUND BY THIS AGREEMENT. + +## Introduction +AutoGPT (the "System") is a project that connects a GPT-like artificial intelligence system to the internet and allows it to automate tasks. While the System is designed to be useful and efficient, there may be instances where the System could perform actions that may cause harm or have unintended consequences. + +## No Liability for Actions of the System +The developers, contributors, and maintainers of the AutoGPT project (collectively, the "Project Parties") make no warranties or representations, express or implied, about the System's performance, accuracy, reliability, or safety. By using the System, you understand and agree that the Project Parties shall not be liable for any actions taken by the System or any consequences resulting from such actions. + +## User Responsibility and Respondeat Superior Liability +As a user of the System, you are responsible for supervising and monitoring the actions of the System while it is operating on your +behalf. You acknowledge that using the System could expose you to potential liability including but not limited to respondeat superior and you agree to assume all risks and liabilities associated with such potential liability. + +## Indemnification +By using the System, you agree to indemnify, defend, and hold harmless the Project Parties from and against any and all claims, liabilities, damages, losses, or expenses (including reasonable attorneys' fees and costs) arising out of or in connection with your use of the System, including, without limitation, any actions taken by the System on your behalf, any failure to properly supervise or monitor the System, and any resulting harm or unintended consequences. + """ + return legal_text