Giter Club home page Giter Club logo

slackgpt's Introduction

slackgpt

GitHub go.mod Go version GitHub Workflow Status Issues

slackgpt is a simple slack bot server which handles DM's and app mention events, sending the event to chat-gpt and responding to the channel with chat-gpt's response.

slackgpt can respond to both direct messages, or threads in a channel. It can handle multiple conversations concurrently, enabling parallel conversations to happen simultaneously in channels it has been added to.

Table of Contents

Quick Start

Build the binary, add tokens to config, and run!

Build

# requires >= go 1.18 to build from source
git clone https://github.com/chikamif/slackgpt.git
cd slackgpt && go build -o ./bin/slackgpt

Config

For a more thorough walk-through of setting up the bot and getting tokens, visit this detailed doc.

CGPT_API_KEY=sk-...z7
SLACK_APP_TOKEN=xapp-1-...47
SLACK_BOT_TOKEN=xoxb-...S0

Run

Help

This program is a slack bot that sends mentions to chat-gpt and responds with chat-gpt result

VERSION: development

Usage: slackgpt --config CONFIG [--type TYPE] [--debug]

Options:
  --config CONFIG, -c CONFIG
                         config file with slack app+bot tokens, chat-gpt API token
  --type TYPE, -t TYPE   the config type [json, toml, yaml, hcl, ini, env, properties]; if not passed, inferred from file ext
  --debug                set debug mode for client logging
  --help, -h             display this help and exit
  --version              display version and exit

Run

./bin/slackgpt -c ./config.env [-t config type] [--debug]
2023/02/01 14:53:19 Config values parsed
socketmode: 2023/02/01 14:53:19 socket_mode_managed_conn.go:258: Starting SocketMode
2023/02/01 14:53:19 Connecting to Slack with Socket Mode...
...

DMS

Conversation in DM's

DMS

Threads

Conversation in threads

Threads

Slack Commands

Command Description Usage Example
clear convo clear conversation of thread where command is called '@slackgpt clear convo'

Contributing

Please follow the Contribution File to contribute to this repo.

Issues

To submit an issue, select the issue template that most closely corresponds with your issue type and submit. Someone will get to you soon!

Code of Conduct

Please note that slackgpt has a Code of Conduct. By participating in this community, you agree to abide by its rules. Failure to abide will result in warning and potentially expulsion from this community.

slackgpt's People

Contributors

drkennetz avatar hemantsoni23 avatar williycole avatar chikamif 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.