{"id":23533017,"url":"https://github.com/dbut2/slackgpt","last_synced_at":"2026-02-23T14:01:35.272Z","repository":{"id":109014247,"uuid":"603995078","full_name":"dbut2/SlackGPT","owner":"dbut2","description":"AI Slack chat bot using models from OpenAI","archived":false,"fork":false,"pushed_at":"2025-03-24T20:39:51.000Z","size":332,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T22:45:49.767Z","etag":null,"topics":["ai","bot","chatbot","cloud-functions","gcp","go","openai","pubsub","slack","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbut2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-20T05:26:47.000Z","updated_at":"2025-01-10T03:47:30.000Z","dependencies_parsed_at":"2023-10-01T23:37:43.623Z","dependency_job_id":"e322729c-77f8-4c60-a34c-1948222f0253","html_url":"https://github.com/dbut2/SlackGPT","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/dbut2/SlackGPT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbut2%2FSlackGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbut2%2FSlackGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbut2%2FSlackGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbut2%2FSlackGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbut2","download_url":"https://codeload.github.com/dbut2/SlackGPT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbut2%2FSlackGPT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272846947,"owners_count":25003108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","chatbot","cloud-functions","gcp","go","openai","pubsub","slack","slack-bot"],"created_at":"2024-12-25T23:13:30.817Z","updated_at":"2026-02-23T14:01:30.248Z","avatar_url":"https://github.com/dbut2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SlackGPT\n\nSlack bot for generating chats or text completions using OpenAI's range of [models](https://platform.openai.com/docs/models).\n\nSlackGPT is built on top of [Slack Bot Users](https://api.slack.com/bot-users) for bot interactions and messages, [OpenAI APIs](https://platform.openai.com/docs/api-reference/introduction) for AI text completion, and GCP for sewing everything together, notably [Cloud Functions](https://cloud.google.com/functions) and [Pub/Sub](https://cloud.google.com/pubsub/docs/overview).\n\nSlackGPT can be direct messaged privately if you need a listening ear, or added to a channel for a team's worth of fun.\n\n![](image.png)\n\n## Usage\n\nThere's 2 ways of running SlackGPT. Firstly through GCP using Cloud Functions and PubSub, this is the preferred method as Cloud Functions can manage scaling for you and be generally cheaper, and PubSub also helps handle error correction and retry for generation. The other option is to run in socket mode which is also useful for testing purposes.\n\nEither way, you'll need to ensure you have the following resources:\n- OpenAI:\n  - [API Key](https://platform.openai.com/account/api-keys)\n\n- Slack:\n  - [Bot Token](https://api.slack.com/authentication/token-types)\n  - [App Token](https://api.slack.com/authentication/token-types) (if using socket mode)\n\n- GCP (if using pubsub mode):\n  - [Project ID](https://cloud.google.com/resource-manager/docs/creating-managing-projects)\n  - [PubSub Topic](https://cloud.google.com/pubsub/docs/create-topic)\n\n### PubSub mode\n\nCreate generating function from [`pubsub.go;PubSubGenerate`](pubsub.go#L10)\n\nThis function should be triggered from pubsub topic push and should have the following env vars set:\n```\nOPENAI_TOKEN=(OpenAI API Key)\nSLACK_BOT_TOKEN=(Slack Bot token)\nMODEL=(Optional. Model for text generation. Defaults to \"gpt-3.5-turbo\")\n```\n\nCreate slack event receiver function from [`event.go;SlackEvent`](event.go#L11)\n\nThis function should be triggered from HTTP, provide the trigger URL to Slack event subscriptions and should have the following env vars set:\n```\nSLACK_SINGING_SECRET=(Signing Secret from Slack app)\nPROJECT_ID=(GCP Project ID)\nPUBSUB_TOPIC=(GCP PubSub Topic)\n```\n\n### Socket mode\n\nSet the following env vars:\n```\nexport OPENAI_TOKEN=(Slack API Key)\nexport SLACK_APP_TOKEN=(Slack App Token)\nexport SLACK_BOT_TOKEN=(Slack Bot Token)\nexport MODEL=(Optional. Model for text generation. Defaults to \"gpt-3.5-turbo\")\n```\n\nRun socket mode application:\n```\ngo run cmd/socket/main.go\n```\n\nEnable socket mode in Slack app settings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbut2%2Fslackgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbut2%2Fslackgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbut2%2Fslackgpt/lists"}