Lab: Building a Web Chat Application with a Generative AI
Objective
The goal of this lab is to design an interactive web application allowing a user to chat with a generative AI. You will explore key concepts related to web development, API integration, and the use of Python libraries. Emphasis will be placed on your ability to learn and solve problems using online resources and your existing knowledge.
General Guidelines
-
Choice of Tools and Technologies
You are free to use any combination of tools and libraries suitable for your project.
- Expected Outcome
A web application where:
- The user can enter a question or a message.
- The application responds using a generative AI.
- The interface is intuitive and offers a smooth user experience.
- Exploration and Learning
You will need to independently research how to integrate a generative AI into your application (e.g., using an API like OpenAI). There are multiple ways to accomplish this task—be creative and experiment.
Resources to Help You
Here’s a list of keywords and concepts you may want to explore:
- Python: for data processing and API integration.
- Streamlit: to create an intuitive user interface.
- OpenAI API: to use a generative AI.
- HTTP Requests: to interact with APIs.
- JSON: to handle API responses.
- Dependency Management: with tools like
pip
or poetry
.
Tips
- Don’t aim for a perfect solution from the start. Rapid prototyping > Perfection.
- Leverage tools such as forums, official documentation, and AI-powered tools to overcome obstacles.
- Take the time to explore the possibilities offered by the technologies you discover.