Connect Fusionbpx to Chat GPT4
Prerequisites
How does it work?
Place a call to the number assigned in the dialplan that's tied to the lua application and ask your question.
Prerequisites
- https://platform.openai.com/account Signup for an account and assign it to the api_key variable
- https://azure.microsoft.com/en-us/free/cognitive-services and assign it to the SPEECH_KEY variable
- The following lua packages installed using lua-rocks (luasocket, cjson)
- json file attached. I think cjson will work too but I had some issues. Place this file in the lua5.x directory
- Enable mod_flite https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Modules/mod_flite_3965160/ -This is just to test. You can use Azure Text to Speech instead of mod_flite.
- Upload the switchgpt.lua files to /usr/share/freeswitch/scripts
- Setup a dialplan in Fusionpbx that will run the lua application
How does it work?
Place a call to the number assigned in the dialplan that's tied to the lua application and ask your question.