Fixed bad indentation
Please enter the commit message for your changes. Lines starting
This commit is contained in:
@@ -18,7 +18,6 @@ from termcolor import colored
|
|||||||
from colorama import init
|
from colorama import init
|
||||||
|
|
||||||
def read_config() -> any:
|
def read_config() -> any:
|
||||||
|
|
||||||
## Find the executing directory (e.g. in case an alias is set)
|
## Find the executing directory (e.g. in case an alias is set)
|
||||||
## So we can find the config file
|
## So we can find the config file
|
||||||
yolo_path = os.path.abspath(__file__)
|
yolo_path = os.path.abspath(__file__)
|
||||||
@@ -30,7 +29,6 @@ def read_config() -> any:
|
|||||||
|
|
||||||
# Construct the prompt
|
# Construct the prompt
|
||||||
def get_full_prompt(user_prompt, shell):
|
def get_full_prompt(user_prompt, shell):
|
||||||
|
|
||||||
## Find the executing directory (e.g. in case an alias is set)
|
## Find the executing directory (e.g. in case an alias is set)
|
||||||
## So we can find the prompt.txt file
|
## So we can find the prompt.txt file
|
||||||
yolo_path = os.path.abspath(__file__)
|
yolo_path = os.path.abspath(__file__)
|
||||||
@@ -64,7 +62,6 @@ def print_usage():
|
|||||||
|
|
||||||
|
|
||||||
def get_os_friendly_name():
|
def get_os_friendly_name():
|
||||||
|
|
||||||
# Get OS Name
|
# Get OS Name
|
||||||
os_name = platform.system()
|
os_name = platform.system()
|
||||||
|
|
||||||
@@ -77,7 +74,6 @@ def get_os_friendly_name():
|
|||||||
else:
|
else:
|
||||||
return os_name
|
return os_name
|
||||||
|
|
||||||
|
|
||||||
def set_api_key():
|
def set_api_key():
|
||||||
# Two options for the user to specify they openai api key.
|
# Two options for the user to specify they openai api key.
|
||||||
#1. Place a ".env" file in same directory as this with the line:
|
#1. Place a ".env" file in same directory as this with the line:
|
||||||
@@ -99,7 +95,6 @@ def set_api_key():
|
|||||||
openai.api_key = config["openai_api_key"]
|
openai.api_key = config["openai_api_key"]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
config = read_config()
|
config = read_config()
|
||||||
set_api_key()
|
set_api_key()
|
||||||
|
|
||||||
@@ -153,7 +148,6 @@ def call_open_ai(query):
|
|||||||
|
|
||||||
return response.choices[0].message.content.strip()
|
return response.choices[0].message.content.strip()
|
||||||
|
|
||||||
|
|
||||||
#Enable color output on Windows using colorama
|
#Enable color output on Windows using colorama
|
||||||
init()
|
init()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user