Coder Social home page Coder Social logo

samantha-discordbot's Introduction

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

samantha-discordbot's People

Contributors

kafischer avatar

Stargazers

 avatar moonmidas avatar Randal Hicks avatar  avatar K. N. avatar  avatar Allan avatar  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.