Small fixes.

This commit is contained in:
Oleksandr Kozachuk
2023-09-09 16:05:27 +02:00
parent d22877a0f1
commit 39b518a8a6
4 changed files with 19 additions and 19 deletions
+4 -4
View File
@@ -14,11 +14,11 @@ def create_ai(args: argparse.Namespace, config: Config) -> AI:
Creates an AI subclass instance from the given arguments
and configuration file.
"""
if args.ai:
if args.AI:
try:
ai_conf = config.ais[args.ai]
ai_conf = config.ais[args.AI]
except KeyError:
raise AIError(f"AI ID '{args.ai}' does not exist in this configuration")
raise AIError(f"AI ID '{args.AI}' does not exist in this configuration")
elif default_ai_ID in config.ais:
ai_conf = config.ais[default_ai_ID]
else:
@@ -34,4 +34,4 @@ def create_ai(args: argparse.Namespace, config: Config) -> AI:
ai.config.temperature = args.temperature
return ai
else:
raise AIError(f"AI '{args.ai}' is not supported")
raise AIError(f"AI '{args.AI}' is not supported")