{"id":23488698,"url":"https://github.com/oiramnet/chatgpt-irc-bot","last_synced_at":"2025-08-24T09:36:45.963Z","repository":{"id":261423645,"uuid":"868675526","full_name":"oiramNet/ChatGPT-IRC-Bot","owner":"oiramNet","description":"ChatGPT IRC Bot","archived":false,"fork":false,"pushed_at":"2024-12-20T09:07:06.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T12:08:31.089Z","etag":null,"topics":["ai","bot","chatgpt","irc"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/oiramNet.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}},"created_at":"2024-10-07T01:11:45.000Z","updated_at":"2024-12-20T09:07:10.000Z","dependencies_parsed_at":"2024-11-06T13:59:20.152Z","dependency_job_id":"cf3e0316-1669-4cb1-bd9a-2a13a751b8e6","html_url":"https://github.com/oiramNet/ChatGPT-IRC-Bot","commit_stats":null,"previous_names":["oiramnet/chatgpt-irc-bot"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oiramNet%2FChatGPT-IRC-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oiramNet%2FChatGPT-IRC-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oiramNet%2FChatGPT-IRC-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oiramNet%2FChatGPT-IRC-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oiramNet","download_url":"https://codeload.github.com/oiramNet/ChatGPT-IRC-Bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877971,"owners_count":21176244,"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","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","chatgpt","irc"],"created_at":"2024-12-24T23:13:55.212Z","updated_at":"2025-04-14T12:08:33.918Z","avatar_url":"https://github.com/oiramNet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT IRC Bot\n__ChatGPT IRC Bot__ is a simple IRC bot written in Python. It was initially forked from the [knrd1/chatgpt](https://github.com/knrd1/chatgpt) but turned into its own project. It connects to __OpenAI__ endpoints to answer questions or generate images and uses official bindings from __OpenAI__ to interact with the API through the HTTP requests. You can find more details about API [here](https://platform.openai.com/docs/api-reference).\n\n## Prerequisites\n1. Create an account and obtain your API key: https://platform.openai.com/account/api-keys\n2. Install Python3 and the official Python bindings (__openai__: 0.28.0, __0.28.1__; __pyshorteners__)\n   \u003e Note that only version __0.28.x__ of __openai__ is supported, and the latest version is __0.28.1__.\n   * Debian/Ubuntu\n     ```\n     apt install python3 python3-pip\n     pip3 install openai==0.28.1 pyshorteners\n     ```\n   * RedHat/CentOS\n     ```\n     yum install python3 python3-pip\n     pip3 install openai==0.28.1 pyshorteners\n     ```\n   * FreeBSD\n     ```\n     pkg install python311 py311-pip\n     pip install openai==0.28.1 pyshorteners\n     ```\n\n## Installation\nClone the package using the below command. It will copy files into the __ChatGPT-IRC-Bot__ directory, which you can later rename.\n```\ngit clone https://github.com/oiramNet/ChatGPT-IRC-Bot.git\n```\n\n## Configuration\nChatGPT IRC Bot uses a plaintext file as its configuration file. The package includes an example configuration file (__chat.conf.sample__) set to connect to IRCnet. You can copy and modify it.\n```\ncd ChatGPT-IRC-Bot\ncp chat.conf.sample chat.conf\n```\n\u003e Variable __context__ is optional, you can leave it blank or enter what you want the bot to know and how you want it to behave. This will only work with the models connecting to the endpoint __/v1/chat/completions__ (see below).\n\n```\n[openai]\napi_key = sk-XXXXXXXXXXXXXXX\n\n[chatcompletion]\nmodel = gpt-4o-mini\nrole = user\ncontext = \ntemperature = 0.8\nmax_tokens = 1000\ntop_p = 1\nfrequency_penalty = 0\npresence_penalty = 0\nrequest_timeout = 60\n\n[irc]\nserver = open.ircnet.net\nport = 6667\nssl = false\nchannels = #oiram\nnickname = SampleBot\nident = samplebot\nrealname = Sample Bot\npassword = \n```\n\n### Model endpoint compatibility\nChatGPT IRC Bot can use one of three API models:\n* Models that support endpoint __/v1/completions__ (Legacy)\n  \u003e gpt-3.5-turbo-instruct, babbage-002, davinci-002\n* Models that support endpoint __/v1/chat/completions__\n  \u003e __gpt-4o-mini__, gpt-4o, gpt-4, gpt-4-turbo, gpt-4-turbo-preview, gpt-3.5-turbo\n* Models that support the creation of an image using endpoint __/v1/images/generations__\n  \u003e dall-e-2, dall-e-3\n\nWe suggest starting experimenting with __gpt-4o-mini__ model. More details about models can be found [here](https://platform.openai.com/docs/models).\n\n## Running bot\nTo start the bot, you can just run the command below.\n* Debian/Ubuntu/RedHat/CentOS\n  ```\n  python3 chatgpt.py chat.conf\n  ```\n* FreeBSD\n  ```\n  python3.11 chatgpt.py chat.conf\n  ```\n\nYou can use the __screen__ command to run it in the background and keep it running even after you log out of your session.\n* Debian/Ubuntu/RedHat/CentOS\n  ```\n  screen python3 chatgpt.py chat.conf\n  ```\n* FreeBSD\n  ```\n  screen python3.11 chatgpt.py chat.conf\n  ```\n\nTo detach from the __screen__ session (leaving your ChatGPT IRC Bot running in the background), press Ctrl + A followed by d (for \"detach\").\nIf you need to reattach to the screen session later, use the following command:\n```\nscreen -r\n```\n\n## Interaction\nChatGPT IRC Bot will interact only if you direct your question using its nickname.\n```\n12:34:12 \u003c user\u003e SampleBot: how are you?\n12:34:13 \u003c SampleBot\u003e I'm just a computer program, so I don't have feelings, but I'm here and ready to help you! How can I assist you today?\n12:56:21 \u003c user\u003e SampleBot: do you like IRC?\n12:56:22 \u003c SampleBot\u003e As an AI, I don't have personal preferences or feelings, but I can provide information about IRC! Internet Relay Chat (IRC) is a popular protocol for real-time communication and has been used for\ndecades. Many people appreciate it for its simplicity and the sense of community it fosters. If you have specific questions or topics about IRC, feel free to ask!\n```\n\nIf you set the model to __dall-e-2__ or __dall-e-3__, the ChatGPT IRC Bot will return a shortened URL to the generated image.\n```\n13:14:05 \u003c user\u003e SampleBot: red apples on the table\n13:14:35 \u003c SampleBot\u003e https://tinyurl.com/1a2b3c4d\n```\n\n## Docker\nTo build the Docker image, you can use the following command:\n```\ndocker build -t my-chatgpt-app .\n```\nTo run the Docker container, you can use the following command:\n```\ndocker run -it my-chatgpt-app\n```\nTo detach from a running Docker, press Ctrl + P. While holding down Ctrl, press Q.\nTo reattach to the container later, use the following command:\n```\ndocker attach \u003ccontainer_id\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foiramnet%2Fchatgpt-irc-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foiramnet%2Fchatgpt-irc-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foiramnet%2Fchatgpt-irc-bot/lists"}