From 09da6d295dc4e4982dee4afc049bf253b281ac78 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Fri, 2 Feb 2024 01:08:40 +0000 Subject: [PATCH] Add check for missing environment variable AICI_API_BASE --- pyaici/cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyaici/cli.py b/pyaici/cli.py index ab6d9165..3cbe7ddb 100644 --- a/pyaici/cli.py +++ b/pyaici/cli.py @@ -340,6 +340,9 @@ def main_inner(): runner_from_cli(args).bench() return + if os.environ.get(rest.BASE_URL_ENV, None) is None: + cli_error(f"environment variable {rest.BASE_URL_ENV} not set") + if args.all_prefixes: prefixes = rest.detect_prefixes() if len(prefixes) <= 1: