codex-lv2-may-2025

Level Navigation: 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 29 30 31 Current Level: 32


đź§Ş Level 32: Challenge Extensions - Make It Yours!

Goal: Stretch and personalize your chatbot. Each option is optional. Pick one or more to attempt.


What You’ll Do

Choose from these challenge options to make your chatbot unique:

đź’ˇ Code Hints

Building advanced features? You’ll need to combine multiple concepts like variables, functions, and conditional logic. Check out the Common Patterns section in SNIPPETS.md for complete examples.

Option 1: Role-based prompts

Update the prompt with a “role” instruction that tells the model how to behave (e.g., kind, single-word answers, emoji replies, formatted text).

Option 2: Role selection controls

Add checkboxes or radio buttons so the user can choose how the model responds. Use these options to adjust the role command dynamically.

Option 3: Prompt templates

Create a form with multiple inputs (text fields, checkboxes, etc.). Combine the values into one string prompt for the model. Hint: remember Mad Libs?

Option 4: Image generation (multi-modal)

Research how to call a Hugging Face image generation model. Use a blob from the response to display the generated image.

Option 5: Image upload (multi-modal input)

Research how to let the user upload an image and submit it to a Hugging Face model using FormData. Display the model’s response (caption, classification, etc.).

Option 6: Combine techniques

Mix several of the above techniques to create a unique experience. For example:

âś… Check

  1. Open your webpage in a browser
  2. Test your new challenge feature with different inputs
  3. Make sure the basic chatbot still works:
    • Empty input validation still shows error message
    • Normal prompts still get AI responses
  4. Open Chrome DevTools (F12) and check the Console tab for any errors
  5. If you added UI controls, test that they work and affect the AI responses
  6. If you added image features, test that images display correctly
  7. Try different combinations of inputs to make sure everything works together

Check off these items in your README:

🎉 Outstanding!

You’ve gone above and beyond. Your chatbot is now uniquely yours!

💾 Don’t forget to commit!

When you’ve completed this level, commit your work with a meaningful message like:

git add .
git commit -m "feature: complete step 6 - challenge extensions"

🎊 Congratulations! You’ve completed the entire chatbot project! 🎊



Level Navigation: 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 29 30 31 Current Level: 32