-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_cli.py
28 lines (23 loc) · 935 Bytes
/
main_cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from prompts_dot_graph_creator import EXPERT_COMMANDS
import core
command_messages = core.create_command_messages(EXPERT_COMMANDS)
previous_messages = []
def output_capabilities():
print("Hello, I am gpt-workflow, an AI assistant. Here are my capabilities:")
for command in EXPERT_COMMANDS:
print(f" - {command.description.replace('Good for answering questions about', '')}")
print("")
output_capabilities()
initial_prompt = "What is the name of your workflow? >>"
user_prompt = input(initial_prompt)
prompt_id = 1
input_prompt = "(To exit, just press ENTER) >"
while(user_prompt != None and len(user_prompt) > 0):
print("=== === === ===")
print(f">> {user_prompt}")
# should route to the right 'expert'!
rsp = core.execute_prompt(user_prompt, previous_messages, command_messages, prompt_id)
print("=== RESPONSE ===")
print(rsp)
user_prompt = input(input_prompt)
prompt_id += 1