Skip to content

Commit 0456b69

Browse files
committed
feat: while problem is empty do not proceed
1 parent 1bc8a28 commit 0456b69

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

main.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,17 @@ def main():
3939
sys.exit(1)
4040

4141
chatbot = Chatbot(config={"access_token": access_token})
42-
problem = input("Explain your problem here\n").strip()
42+
problem = ""
43+
print("Explain your problem here\n")
44+
while problem == "":
45+
problem = input().strip()
4346
conversation_id = None
4447
iterations = 2
4548
total_work_units = 5 + iterations * 3
4649
progress_bar = tqdm(
4750
total=total_work_units, desc="Processing", ncols=100, ascii=True
4851
)
4952

50-
if not problem:
51-
print("Problem is empty", file=sys.stderr)
52-
return
53-
5453
# prompt1
5554
three_ideas, conversation_id = chatgpt_answer_to_prompt_file(
5655
chatbot, "prompts/prompt1", "PROBLEM", problem

0 commit comments

Comments
 (0)