Welcome to the "Generative AI Workshop: Using GPT APIs and ChatGPT for Quality Assurance!" In this hands-on session, you will learn how to practically use Generative AI to enhance Quality Assurance processes. We will explore the basics of Generative AI, demonstrate its usage through APIs and a chatbot interface, and work together to solve a real-world problem using these cutting-edge technologies.
Before attending this workshop, please ensure you have the following:
-
Python Programming Knowledge: Basic understanding of Python programming language as we will use Python for code examples and exercises.
-
OpenAI API Access: You will need an OpenAI account to access the GPT API. If you don't have an account, you can create one on the OpenAI website.
-
OpenAI API Key: After creating your OpenAI account https://platform.openai.com/, you will need an API key to interact with the GPT API. Once you create your account, setup your secret API key following the instructions here https://www.onmsft.com/how-to/how-to-get-an-openai-api-key/
-
Git Repository: To follow along with the workshop exercises, please clone the following Git repository: https://github.com/twCatalyst/genAIVodqa2023. You can clone the repository using the following command:
git clone https://github.com/twCatalyst/genAIVodqa2023.git
-
PyCharm CE: Please have PyCharm Community Edition (CE) installed on your computer, as we will be using it as the Integrated Development Environment (IDE) for our coding activities. Download the IDE from here: https://www.jetbrains.com/pycharm/download Follow the following instructions to setup the IDE to import the above project into your IDE https://www.jetbrains.com/help/pycharm/importing-project-from-existing-source-code.html#existing-sources
The workshop will cover the following topics:
-
Introduction to Generative AI
- Understanding the fundamentals of Generative AI.
- Exploring real-world applications of Generative AI in Quality Assurance.
-
Accessing GPT through APIs
- Creating an OpenAI account for ChatGPT and the platform.openai.com.
- Obtaining an OpenAI API key for API access.
-
Interacting with ChatGPT
- Building boilerplate code to send messages and receive responses from ChatGPT.
- Demonstrating the process of interacting with ChatGPT programmatically.
-
Problem Solving with Generative AI
- Collaboratively working on a Quality Assurance problem using Generative AI techniques.
- Discussing and analyzing the results generated by ChatGPT.
-
Fine-tuning Prompts
- Learning how to fine-tune prompts to improve the quality of responses from GPT.
- Optimizing interactions with GPT to achieve better outcomes.
-
Create an OpenAI account for free credits (Use a personal email address for the free credits) https://www.saintlad.com/get-free-trial-credits-for-openai/
-
Ensure you have a Secret API key for OpenAI https://www.howtogeek.com/885918/how-to-get-an-openai-api-key/ Download the Git repository for the workshop
$> git clone https://github.com/twCatalyst/genAIVodqa2023
OR, Download the Zip file from the following URL - https://github.com/twCatalyst/genAIVodqa2023 and unzip the folder into your choice of folder on your machine
Ensure you have Python 3 installed on your machine:
Windows: https://docs.python.org/3/using/windows.html
Mac: https://www.scaler.com/topics/python/how-to-install-python-on-macos/
Set up a Python virtual environment on your machine and follow along with the course Go to the folder genAIVodqa2023 and try one of the following commands on your terminal/DOS Window/IDE Terminal
$> python -m venv venv
OR,
$> python3 -m venv venv
You should see a venv folder in the genAIVodqa2023 folder if you are successful
Once you create the venv folder, activate your virtual environment by running the following command
On Macs
$> source ./venv/bin/activate
On Windows run
$> venv/Scripts/activate.bat
Install the requirements (Make sure you are in the genAIVodqa2023 folder)
$> pip install -r requirements.txt
OR,
$> pip3 install -r requirements.txt
Set up your OpenAI secret key as an environment variable
On Macs
export OPENAI_KEY=<your_secret_key>
On Windows
set OPENAI_KEY=<your_secret_key>
Once you have installed your requirements, run the following command from the terminal/DOS Window/IDE Terminal
$> python session2-simple-calls/simple-call.py
If you used pip3 above after setting up the virtual environment, run the following:
$> python3 session2-simple-calls/simple-call.py