Giter Site home page Giter Site logo

jerryberry12 / rocket.chat.bot.openai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from murf2/rocket.chat.bot.openai

0.0 0.0 0.0 32 KB

This Chat Bot for Rocket Chat makes OpenAI API requests to the OpenAI Davinci text model.

Shell 2.22% JavaScript 84.97% Dockerfile 12.81%

rocket.chat.bot.openai's Introduction

Rocket.Chat.Bot.Openai

This Chat Bot for Rocket Chat makes OpenAI API requests to the OpenAI Davinci text model. This model is designed to provide a conversational experience for users, allowing them to ask questions and receive answers in natural language. The bot uses the OpenAI Davinci model, a deep learning-based natural language processing system, to understand and respond to user queries in a natural way. The bot is easy to use and integrate into existing Rocket Chat environments, and can be used to provide a conversational experience for users.

This documentation was written using ChatGPT, which is available at chat.openai.com.

demo.mp4

Control - Bot commands

The bot is designed to listen for messages that begin with "@BOTNAME". When the bot detects that it is called out, it will send the entire message to the OpenAI API for processing. The bot will then forward the response back to the room where the original message was sent.

In addition to this function, the bot also supports the following basic commands:

@BOTNAME help - provides information on how to use the bot and its available commands
@BOTNAME about - provides information on the bot's purpose and development
@BOTNAME instructions - provides a list of instructions on how to use the bot

Setup

Docker setup

To start the container, use the following command and include the necessary environment variables:

docker run -it \
-e SERVER_HOST=yourserver.com \
-e BOT_USER=bot_account_name \
-e PASS=bot_account_password \
-e BOTNAME=name_bot_response_to \
-e SSL=true \
-e ROOMS=room1,room2,room3 \
-e OPENAI_SECRET_KEY=api_key \
ghcr.io/murf2/rocket.chat.bot.openai:latest

Alternatively, you can use the provided Dockerfile to create a image. To do this, run the following command:

docker build . -t yourtag

Manual install

To use this bot, you need to have the latest version of Node.js (v18.12.1) installed. You can check your current version with the following command:

node -v
  1. Clone the repository:
git clone https://github.com/MuRF2/rocket.chat.bot.openai
  1. Install the required dependencies:
npm install @rocket.chat/[email protected] && npm install [email protected] && npm install [email protected]
  1. Create a .env file that contains your server login information and OpenAI API key. The file should have the following format:
SERVER_HOST='yourserver.com'
BOT_USER='bot_account_name'
PASS='bot_account_password'
BOTNAME='name_bot_response_to'
SSL='true'
ROOMS='room1,room2,room3'
OPENAI_SECRET_KEY='api_key'
  1. Start the bot:
node easybot.js

rocket.chat.bot.openai's People

Contributors

murf2 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.