Title: Hands-on Walkthrough and Tasks

Generate and Store OpenAI API Key

  • ✦ Open https://platform.openai.com on your browser and log in using the OpenAI account you have created previously (and topped up with some credits).

  • ✦ Fill up the required details.

    • Select "You" under the "Owned by" section
    • The Name field can be any meaningful text that describe the purpose of the key
    • Click on the "Create secret key"
  • ✦ Copy and save the API Key

    • Highlight the entire API key: sk-waMT92zQxaswdawOM2Rcy2oCKhy1T3BlaxbkFJ9KaK
    • Right-click and select “Copy” (or use Ctrl+C)
    • Open a text editor (like Notepad on Windows or TextEdit on macOS).
    • Paste the API key into the file (Ctrl+V).
    • Save the file with a descriptive name (e.g., “OpenAI_API_Key.txt”) on a location on your laptop that can be easily retrieved, since we need to open the text file and refer to the API Key for the subsequent weeks.
  • ✦ Note that the same API Key cannot be retrieve after the window is closed. You may create a new API Key and delete the old API Key(s).

    Keep the API Key safe
    • Treat your API key like a password. Keep it secure and confidential.
      • This key can be used to access your OpenAI account programmatically and consume the credits you have purchased.
      • Please ensure you:
        • DO NOT hardcode (copy & paste) your API key directly into your code notebooks.
        • DO NOT upload the file to public code repositories (e.g., GitHub or GitLab)



Download the Notebook and Following Along

  • 👆🏽 Click on the "Open Notebook" button below to open the Jupyter Notebook on **_Google Colab

 

  • If you are unable to view the link, visit https://colab.research.google.com and use the same browser to login with your Google Account to start using the service. Click on this link again after logging in.
    • You may use any Google Account (this is likely to be your personal account). If you happen to choose to share your working files later on, only your Google's display name will be visible to others but not your Google email address.
    • ⚠️ If you want to keep the changes you made to this notebook, you need to save this notebook to your own Google Drive.
      • Click on “File” in the top left corner of the page
      • Select “Save a copy in Drive.”
      • It's even better if you can make it a habit, so that you always save the file as a copy before starting to edit file.



Video Walkthrough: Jupyter Notebook

**💡The most effective way of learning technical skills, like coding is get your hands dirty!

😰 Many of us thought we understand the concepts and able to apply them, until we actually need to code them out!

We recommend when you are going through the videos below, open up the notebook on Google Colab to follow along.

Walkthrough Video: Part 1
  • • Intro to Hands-on Tasks
  • • Set OpenAI API Key in Google Colab Notebook
  • • Testing the API Key with the Helper Function
• Suggest to play at 1.25x speed.

• Click on the full screen icon at the bottom right corner for better viewing experience.




Complete the Remaining of the Notebook with Your Own Code

Info
  • ✦ There is no need to submit the completed notebook in Canvas LMS.
  • ✦ Give your best attempt for the notebook before looking at the ‘Notebook for Reference’ page coming up next.



[ Optional ] Share Your Work and Get Feedback from the Community

  • ✦ While there is no submission required, we encourage you to share your solutions with your peers by pasting your link into the Sharing Board.

    • Feedback: By sharing your solutions, you can get insights, suggestions, and constructive criticism from your peers. This feedback can help you improve your approach and learn from others’ perspectives.

    • Learning from Peers: Since everyone may have different ways of solving problems, participating in these sessions allows you to see various approaches. You can learn alternative methods, explore different techniques, and gain a deeper understanding of the challenges.

  • ✦ URL: https://miro.com/app/board/uXjVKvQ1WzE=/?share_link_id=408634728152

  • ✦ Passcode: abc-2024

Watch this Guide on How to Share, Vote, and Comment on the Sharing Board