Integrate ChatGPT with Mattermost

 

Task : Integrate ChatGPT with Mattermost.


Below are the Requirements to set up ChatGPT with Mattermost:

  • Mattermost Token for the bot user 

  • Generate “Open AI” secret API key from here .Generate a new secret key and save it safely.

  •  Mattermost service running in Docker


    -Create Mattermost Bot account

    1)Click on Menu in the Top left -> Click on  Integrations 

    integration_menu_in_console.png

          2)On the right Side click on Bot Accounts ->Then click on Add Bot Account

create_add_bot_from_integration.png

 

         3)Then Set all required fields and click Create Bot Account.

bot_create_3.png

          4) Save the Created Token

mattermost_token.png --Create a Open AI Token 

1)Click here to redirect to Open AI page to create a Token

2)Click on "+ Create new secret key" -> Save the key generated

open_api_key_generation.pngopen_Ai_key_generated.png

 

--Deployment :

1) Clone the repo git clone 'https://github.com/yGuy/chatgpt-mattermost-bot '
2) Go into repo directory cd chatgpt-mattermost-bot
3) Adjust the environment variables in docker-compose.yml

adjust_variable.png

4)  Merge root certificate contents into the docker-compose.yml file: (If using a certificate signed by a private CA)

merge_certificate.png

5) Adjust the optional variable if using a different Bot Name 
Optional_variable.png

 

--Run the container 

1)Use this command to run the container up :

docker compose up -d

 

2)Test the bot 
Get the Bot DM :Type @chtgpt followed by the msg and will get a response from Chatgpt

chatgpt_ask_questions_here.png

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.