From 3bb9c3d0d8d28eaba3100cc0d090987fabbad4bd Mon Sep 17 00:00:00 2001 From: xntrik Date: Mon, 4 Mar 2024 08:46:44 +0800 Subject: [PATCH] feat: allow setting a default FABRIC_MODEL via env vars (or .env) --- installer/client/cli/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installer/client/cli/utils.py b/installer/client/cli/utils.py index d8cbbb2..4506b9e 100644 --- a/installer/client/cli/utils.py +++ b/installer/client/cli/utils.py @@ -49,7 +49,11 @@ class Standalone: self.config_pattern_directory = config_directory self.pattern = pattern self.args = args - self.model = args.model + try: + modelEnv = os.environ["FABRIC_MODEL"] + self.model = modelEnv + except KeyError: + self.model = args.model def streamMessage(self, input_data: str, context=""): """ Stream a message and handle exceptions.