Added main entry point

This commit is contained in:
Heiko Joerg Schick
2023-09-05 11:14:05 +02:00
parent 130e0b0ae2
commit f6644f7717
+18 -9
View File
@@ -163,9 +163,6 @@ def call_open_ai(query):
return response.choices[0].message.content.strip()
#Enable color output on Windows using colorama
init()
def check_for_issue(response):
"""
Todo
@@ -235,9 +232,21 @@ def evaluate_input(user_input, command):
pyperclip.copy(command)
print("Copied command to clipboard.")
res_command = call_open_ai(user_prompt)
check_for_issue(res_command)
check_for_markdown(res_command)
user_input = prompt_user_input(res_command)
print()
evaluate_input(user_input, res_command)
def main():
"""
Defined starting point of source code.
"""
#Enable color output on Windows using colorama
init()
res_command = call_open_ai(user_prompt)
check_for_issue(res_command)
check_for_markdown(res_command)
user_input = prompt_user_input(res_command)
print()
evaluate_input(user_input, res_command)
if __name__ == "__main__":
main()