From 51de9db4eaf1c95f17cd37df670ec3f8032877e0 Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Tue, 5 Sep 2023 21:26:02 +0200 Subject: [PATCH] Minor changes --- yolo.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/yolo.py b/yolo.py index 3386c06..e096b61 100755 --- a/yolo.py +++ b/yolo.py @@ -77,7 +77,17 @@ def set_openai_api_key(config): if not openai.api_key: openai.api_key = config["openai_api_key"] -# Construct the prompt +def print_config(config): + """ + Print config information. + """ + print("Current configuration per yolo.yaml:") + print("* Model : " + str(config["model"])) + print("* Temperature : " + str(config["temperature"])) + print("* Max. Tokens : " + str(config["max_tokens"])) + print("* Safety : " + str(bool(config["safety"]))) + print("* Shell : " + str(config["shell"])) + def get_full_prompt(user_prompt, shell): """ Construct the prompt, finding the executing directiory so we can find the prompt.txty file. @@ -98,19 +108,6 @@ def get_full_prompt(user_prompt, shell): return prompt -def print_config(config): - """ - Print config information. - """ - print("Current configuration per yolo.yaml:") - print("* Model : " + str(config["model"])) - print("* Temperature : " + str(config["temperature"])) - print("* Max. Tokens : " + str(config["max_tokens"])) - print("* Safety : " + str(bool(config["safety"]))) - print("* Shell : " + str(config["shell"])) - - - def get_os_friendly_name(): """ Get the name of the operating system.