OpenAI / ChatGPT ViCiDial Intergration

Discussions about new features or changes in existing features

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

OpenAI / ChatGPT ViCiDial Intergration

Postby martinch » Wed Mar 15, 2023 5:24 pm

Good evening guys,

Inspired by bbakirtas in http://vicidial.org/VICIDIALforum/viewtopic.php?f=3&t=41572#p150666, I decided to try and integrate OpenAI's ChatGPT into ViCiDial. This version uses cURL rather than any third-party library to achieve it's ends. I've written the code by myself but have co-credited bbakirtas as he inspired me to do this :)

I've propose two new system settings;

Image

Here is a question I asked ChatGPT...it was SO WRONG...Vincent Silvidi? Is there any truth to this Matt? lol the tiny window is draggable as to not obstruct parts of the dialler.

Image

Feature submitted on Mantis http://www.vicidial.org/VICIDIALmantis/view.php?id=1455

Code: Select all
=============================================
OpenAI / ChatGPT Integration for ViCiDial.
=============================================

Ticket Type: Add Feature.
Reporter: Martin McCarthy (martinch).
Impacted Users: ViCiDial agents.
Priority: Low.
Product(s) Affected: ViCiDial.
Deadline: No firm deadline in place.
Time / Effort Estimate: 4 hours of development / 1 hour of QA testing.

=============================================
Description
=============================================

It would be nice to provide ViCi agents with the chance to interface with ChatGPT during calls...perhaps to pull out a fact from thin or or get information very very quickly. Inspired by bbakirtas's idea, I have implemented an initial version of OpenAI's ChatGPT into ViCiDial.

Tasks;

- Create two new system settings options;
    - OpenAI Enabled (ENUM - Y - N)
    - OpenAI API Key (VARCHAR)
- Create a new div to contain the question input and answer output.
- Make the div draggable as to not obscure the agent's view of dialler controls.
- Create a button on the ViCiDial sidebar to show and hide the div.
- Create a PHP page to process requests to OpenAI (via cURL).

If you have any queries, please reach out to me.

=============================================
End
=============================================
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: OpenAI / ChatGPT ViCiDial Intergration

Postby mflorell » Thu Mar 16, 2023 7:32 am

LOL, another WAAAY off response from ChatGTP. I've noticed that the more widely know topics(global politics, current events, etc...) it seems to get pretty much right, but the more niche a topic is(VICIdial history, etc...) the more it gets wrong, even if there is published information available on the web about it.
mflorell
Site Admin
 
Posts: 18324
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: OpenAI / ChatGPT ViCiDial Intergration

Postby martinch » Tue Jul 18, 2023 1:17 pm

Hey, just an update from me on this one...I introduced this feature into my fork, mDial, if you're interested in using it in your setup. I made a couple of changes to the code though and the feature doesn't support chat history currently but support can easily be added. You can find the code in the link in my sig. Cheers. :)

Image
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK


Return to Features

Who is online

Users browsing this forum: No registered users and 5 guests