Minor changes

This commit is contained in:
Heiko Joerg Schick
2023-09-05 21:26:02 +02:00
parent ea21e18bee
commit 51de9db4ea
+11 -14
View File
@@ -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.