Source code of ChatGPT at your service video on ImagineAndMake serie
The aim of this source code is to bring ChatGPT's response capability right to your fingertips. We integrate the OpenAI API into a Python application, and then add functions that might be considered indispensable in a developer's life. We've also added Speech To Text to initiate the ability to speak and get an immediate response. You can find us on Discord and on Youtube.
demonstration.mp4
If the video doesn't work, you can watch on Youtube
- Python 3.10+ (Maybe you can use an older version of Python)
Download this source code
git clone https://github.com/development-community/Integrate-GPT-on-App.git
Create a python environment and activate it
python3 -m venv environment
source environment/bin/activate
Install the require packages
cd ./IntegrateGPTonApp
pip install -r requirements.txt
You must define your main language for the Speech To Text system on line 63 of the index.py
file in the format (for example: fr-FR or en-US) because SpeechRecognition didn't manage multi-language in same time.
input = recognizer.recognize_google(voice_input, language='fr-FR')
After installing the packages, you need to enter your OpenAI keys on line 76 of the index.py
file in place of "OPENAI KEY".
openai.api_key = "OPENAI KEY"