opensouls / samantha-discordbot

Samantha AGI in your discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SamanthaAGI bot

This discord repo provides everything you need to create your own SamanthaAGI discord bot - the same as from http://meetsamantha.ai

Samantha uses the SocialAGI library to create her digital soul through just a few commands.

The SocialAGI library gives Samantha a basic introspective thought process on every message to make her feel more alive and agentic in dialog.

Discord integration tutorial

First export your OpenAI api key:

export OPENAI_API_KEY=sk_...

Second, create a new discord application at https://discord.com/developers/applications. Make sure to create a fun name, username, and profile image.

You'll need a few environment variables to run the bot

export DISCORD_TOKEN_SAMANTHA=...

You can find your discord application's API token here:

Screen Shot 2023-05-29 at 10 28 52 PM

Next, you'll need to decide which channel you're going to deploy the bot to in your server

export DISCORD_DEPLOYMENT_CHANNEL=...

You can find the channelID by visiting your target discord server/channel inside the web browser

image

Now, you'll need to add the discord bot to your server using the discord URL generator with the appropriate permissions

Screen Shot 2023-05-29 at 10 50 22 PM

At the bottom of this page you'll get a URL

Screen Shot 2023-05-29 at 10 30 02 PM

Copy this url and then add your new application's bot to your target server

Screen Shot 2023-05-29 at 10 50 33 PM

Running the discord bot server locally

Now that your discord bot is in your server, you'll need to install the bot's dependencies

npm install

and run the bot

node bot.js

Now, your bot should be in your server running and you should be able to talk to Samantha.

image

Running the discord bot server on heroku

This repo is intended to be deployed to heroku easily.

You'll need to do the following steps:

heroku login

Then create a heroku git repo

heroku create <desired-git-name>

Now, deploy the bot to heroku

git push heroku main

Now that the bot is deployed, you'll have to configure Heroku. First, go to settings and add the appropriate env

Screen Shot 2023-05-29 at 10 40 26 PM

Lastly, adjust the resources to run the bot. Your resources should look like this:

Screen Shot 2023-05-29 at 10 40 13 PM

Make sure to kill your local discord bot server.

That's it! Now you should be able to talk to Samantha running from your Heroku instance

Now, your bot should be in your server running and you should be able to talk to Samantha.

image

About

Samantha AGI in your discord

License:MIT License


Languages

Language:JavaScript 99.1%Language:Procfile 0.9%