Giter Site home page Giter Site logo

chatgpt-agi's Introduction

Asterisk ChatGPT intergration - Proof of Concept

Read the blogpost about this here

A proof of concept AGI script that integrates Asterisk with ChatGPT to hold converstations with ChatGPT.

Deployment

Cloning and installing dependencies

Clone the repo somewhere on your Asterisk system. For example, to /usr/local/src/:

cd /usr/local/src/
https://github.com/speakupnl/chatgpt-agi.git

Then, create a virtual environment and install the dependencies:

cd chatgpt-agi
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
deactivate

Make sure to replace the API key in chatgpt_agi.py to your own.

vim chatgpt_agi.py

Configuring Asterisk

Copy the chatgpt-welcome.wav or replace it with your own.

Please note, the actual path of your sounds directory may be different depending on your system.

cp chatgpt-welcome.wav /usr/share/asterisk/sounds/

Next, edit your extensions.conf.

vim /etc/asterisk/extensions.conf

Here is an example of what the dialplan might look like. Replace the phone number to your own.

exten = 31532401205,1,Noop(ChatGPT)
 same = n,answer()
 same = n,AGI(/usr/local/src/chatgpt-agi/venv/bin/python3 /usr/local/src/chatgpt-agi/openai_agi.py)

Reload the Asterisk dialplan

asterisk -rx 'dialplan reload'

And call away!

Troubleshooting

If you experience any trouble, check the Asterisk console:

asterisk -rvvv

or check the Asterisk syslog. On systems with systemd:

journalctl -fu asterisk

chatgpt-agi's People

Contributors

nickbouwhuis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.