{"id":31553271,"url":"https://github.com/nalbam/lambda-chatgpt-ai-bot","last_synced_at":"2025-10-04T20:12:01.370Z","repository":{"id":90949206,"uuid":"605539321","full_name":"nalbam/lambda-chatgpt-ai-bot","owner":"nalbam","description":"A Slack bot using ChatGPT.","archived":false,"fork":false,"pushed_at":"2025-09-16T07:41:48.000Z","size":3776,"stargazers_count":13,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T08:33:59.687Z","etag":null,"topics":["aws","lambda","slack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nalbam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-23T11:23:24.000Z","updated_at":"2025-09-16T07:41:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdfe2bae-771e-44e7-9d7c-bf1e1a6cb797","html_url":"https://github.com/nalbam/lambda-chatgpt-ai-bot","commit_stats":null,"previous_names":["nalbam/lambda-slack-ai-bot","nalbam/lambda-chatgpt-ai-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nalbam/lambda-chatgpt-ai-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbam%2Flambda-chatgpt-ai-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbam%2Flambda-chatgpt-ai-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbam%2Flambda-chatgpt-ai-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbam%2Flambda-chatgpt-ai-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nalbam","download_url":"https://codeload.github.com/nalbam/lambda-chatgpt-ai-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbam%2Flambda-chatgpt-ai-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366674,"owners_count":25975097,"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-10-04T02:00:05.491Z","response_time":63,"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":["aws","lambda","slack"],"created_at":"2025-10-04T20:11:59.020Z","updated_at":"2025-10-04T20:12:01.348Z","avatar_url":"https://github.com/nalbam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambda-chatgpt-ai-bot\n\n안녕하세요! 저는 AI 어시스턴트입니다.\n여러분의 질문에 답변하고 다양한 문제를 해결하는 데 도움을 드리기 위해 만들어졌습니다.\n저는 AWS Lambda에서 구동되며, Slack API와 Python을 사용하여 구성되었습니다.\n또한, OpenAI의 강력한 언어 모델을 기반으로 작동하고 있어 자연스러운 대화와 정확한 정보 제공이 가능합니다.\n업무 효율성을 높이고, 복잡한 질문에도 신속하게 답변할 수 있도록 설계되었습니다.\n언제든지 궁금한 점이 있거나 도움이 필요하시면 저를 찾아주세요!\n\n![Chatgpt Bot](images/bot.png)\n\n## Install\n\n```bash\n$ brew install python@3.12\n\n$ npm install -g serverless@3.38.0\n\n$ sls plugin install -n serverless-python-requirements\n$ sls plugin install -n serverless-dotenv-plugin\n\n$ python -m pip install --upgrade -r requirements.txt\n```\n\n## Setup\n\nSetup a Slack app by following the guide at https://slack.dev/bolt-js/tutorial/getting-started\n\nSet scopes to Bot Token Scopes in OAuth \u0026 Permission:\n\n```\napp_mentions:read\nchannels:history\nchannels:join\nchannels:read\nchat:write\nfiles:read\nfiles:write\nim:read\nim:write\nusers:read\n```\n\nSet scopes in Event Subscriptions - Subscribe to bot events\n\n```\napp_mention\nmessage.im\n```\n\n## Credentials\n\n```bash\n$ cp .env.example .env\n```\n\n### Slack Bot\n\n```bash\nSLACK_BOT_TOKEN=\"xoxb-xxxx\"\nSLACK_SIGNING_SECRET=\"xxxx\"\n```\n\n### OpenAi API\n\n* \u003chttps://platform.openai.com/account/api-keys\u003e\n\n```bash\nOPENAI_ORG_ID=\"org-xxxx\"\nOPENAI_API_KEY=\"sk-xxxx\"\n```\n\n## Deployment\n\nIn order to deploy the example, you need to run the following command:\n\n```bash\n$ sls deploy --region us-east-1\n```\n\n## Slack Test\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" \\\n-d \" \\\n{ \\\n    \\\"token\\\": \\\"Jhj5dZrVaK7ZwHHjRyZWjbDl\\\", \\\n    \\\"challenge\\\": \\\"3eZbrw1aBm2rZgRNFdxV2595E9CY3gmdALWMmHkvFXO7tYXAYM8P\\\", \\\n    \\\"type\\\": \\\"url_verification\\\" \\\n}\" \\\nhttps://xxxx.execute-api.us-east-1.amazonaws.com/dev/slack/events\n```\n\n## OpenAi API Test\n\n```bash\ncurl https://api.openai.com/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"gpt-4.1\",\n    \"messages\": [\n      {\n        \"role\": \"system\",\n        \"content\": \"You are a helpful assistant.\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"Hello!\"\n      }\n    ]\n  }'\n```\n\n```bash\ncurl https://api.openai.com/v1/images/generations \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -d '{\n    \"model\": \"dall-e-3\",\n    \"prompt\": \"꽁꽁 얼어붙은 한강위로 고양이가 걸어갑니다.\",\n    \"size\": \"1024x1024\",\n    \"n\": 1\n  }'\n```\n\n## References\n\n* \u003chttps://github.com/openai/openai-python\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnalbam%2Flambda-chatgpt-ai-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnalbam%2Flambda-chatgpt-ai-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnalbam%2Flambda-chatgpt-ai-bot/lists"}