User Input
We've hardcoded the prompt that goes to Gemini, which is... not very useful. Let's update our code to accept the prompt as a command-line argument.
We don't want our users to have to edit the code to change the prompt!
Assignment
-
parser = argparse.ArgumentParser(description="Chatbot")
parser.add_argument("user_prompt", type=str, help="User prompt")
args = parser.parse_args()
# Now we can access `args.user_prompt`
-
uv run main.py "Why are episodes 7-9 so much worse than 1-6? Use one paragraph."
The remainder of the script can remain unchanged for now.
If things seem to be working correctly, run and submit the CLI tests.