Skip to content

feat: Add Easter Egg detection for optimized prompts (Issue #27) #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

codewithdhruba01
Copy link
Contributor

This pull request adds an Easter Egg feature to the sample-app/app.js file as requested in [Issue #27](#27).

What was added:

  • Prompt input from the user.
  • Call to the AI model using the user’s prompt.
  • If the user enters a highly optimized prompt (e.g., "Write me a poem about a time-traveling JavaScript developer"), the application detects it and displays a hidden congratulatory Easter Egg message.

Files modified:

  • lessons/03-prompt-engineering/sample-app/app.js

Testing:

  • Manually tested by entering various prompts.
  • Hidden message successfully appears when an optimized prompt is used.

> Enter your prompt:
Write me a poem about a time-traveling JavaScript developer

AI Response:
[Poem generated...]

Easter Egg Unlocked! You discovered the hidden poem! 

Final Checklist :

  • Code tested locally.
  • Message matches the issue requirement.
  • No unnecessary changes added.

@codewithdhruba01
Copy link
Contributor Author

Please review the changes....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant