{"id":19816939,"url":"https://github.com/flyingfathead/ircbot-openai-api","last_synced_at":"2026-03-01T23:02:55.427Z","repository":{"id":185196274,"uuid":"673152330","full_name":"FlyingFathead/IRCBot-OpenAI-API","owner":"FlyingFathead","description":"IRC (intenet relay chat) chatroom bot for OpenAI API (GPT-3.5 / GPT-4)","archived":false,"fork":false,"pushed_at":"2024-01-04T13:22:03.000Z","size":88,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-20T09:37:03.624Z","etag":null,"topics":["chatbot-application","chatbot-framework","gpt-3","gpt-3-5","gpt-3-5-turbo","gpt-3-5-turbo-api","gpt-4","gpt-4-api","gpt4","irc","irc-bot","irc-bot-framework","irc-channel","irc-chat","openai","openai-api","python"],"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/FlyingFathead.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-01T01:56:50.000Z","updated_at":"2024-07-24T21:57:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a043face-079b-49bb-b668-789c67b57daf","html_url":"https://github.com/FlyingFathead/IRCBot-OpenAI-API","commit_stats":null,"previous_names":["flyingfathead/ircbot-openai-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FlyingFathead/IRCBot-OpenAI-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2FIRCBot-OpenAI-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2FIRCBot-OpenAI-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2FIRCBot-OpenAI-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2FIRCBot-OpenAI-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlyingFathead","download_url":"https://codeload.github.com/FlyingFathead/IRCBot-OpenAI-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlyingFathead%2FIRCBot-OpenAI-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29987656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chatbot-application","chatbot-framework","gpt-3","gpt-3-5","gpt-3-5-turbo","gpt-3-5-turbo-api","gpt-4","gpt-4-api","gpt4","irc","irc-bot","irc-bot-framework","irc-channel","irc-chat","openai","openai-api","python"],"created_at":"2024-11-12T10:11:08.991Z","updated_at":"2026-03-01T23:02:55.404Z","avatar_url":"https://github.com/FlyingFathead.png","language":"Python","readme":"# IRC Bot for OpenAI-API\nA Python-based simple IRC (Intenet Relay Chat) chatroom bot that uses OpenAI API (i.e. GPT-3.5 / GPT-4... ).\n\nRuns on `openai` library version `1.6.1` (up to date in January 2024!)\n\nWanna shove that GPT-3.5 or GPT-4 OpenAI API into good'ole IRC as a chatbot? Now it's possible!\n\n# What's new\n- `v0.32.2` (Jan 4, 2024) Lowercase conversion flag \u0026 other small fixes.\n- `v0.32`: (Jan 4, 2024) OpenAI API calls have been updated to use the `1.6.1` version of `openai` pip library. Multiple smaller bugfixes.\n- `v0.31`: (Aug 3, 2023) Bot now takes in admin messages as `/msg bot !command \u003coptions\u003e` if it needs to be adjusted on the fly. Acknowledgements of bot commands come into the private msg's if you're an admin.\n- `v0.29`: (Aug 3, 2023) Bot now supports joining password protected channels (i.e. to prevent abuse).\n- `v0.28`: (Aug 3, 2023) all config now handled via `config.json`, edit that to configure the bot. Language settings also apply to the bot's output language, so no need to change everything manually anymore. New variable, `ANSWER_PROBABILITY` sets the likelihood for the bot answering when in public mode.\n- `v0.25`: (Aug 3, 2023) Added some increased parsing functionalities, such as utf-8/unciode emoji to ASCII conversion tables (where utf8-emojis are not supported or wanted) and a lowercase converter to make the bot \"fit\" better into an IRC channel's output style.\n\nNew functions:\n```\n# Replace unicode emojis with ASCII? True = yes, False = no\nUSE_EMOJI_DICT = True\n```\n```\n# Convert the first character of each sentence to lowercase? True = yes, False = no`\nCONVERT_TO_LOWER = True\n```\n# Prerequisites\n- At least Python 3.8 or later, probably. \n- Tested and running OK on Python `3.9.16` and `3.10.12`.\n- `openai`, `jaraco.stream` and `irc` PyPi packages, tested to work on these versions:\n```\nopenai==1.6.1\njaraco.stream==3.0.3\nirc==20.3.1\n```\n- You can install all of the above with `pip install -r requirements.txt` after cloning the repo.\n- You will also need an OpenAI API key from [openai.com](https://openai.com).\n\n# Install\n1. Clone the repository: `git clone https://github.com/FlyingFathead/IRCBot-OpenAI-API`\n2. Switch to the directory: `cd IRCBot-OpenAI-API`\n3. Install the required packages: `pip install -r requirements.txt`\n4. Crank your OpenAI access token into either an environment variable or into `api_token.txt` within the same directory.\n5. Edit the `config.json` for your bot configuration. Set up things such as admin nicks, your bot's details, other options etc. Change whatever you deem necessary.\n6. Launch `python IRCbot-OpenAI-API.py` and off you go!\n7. Enjoy!\n\nThe bot has a chat history memory that you can adjust in `config.json`, the `RESPOND_TO_ALL` switch set to `true` makes the bot answer to everyone on the channel, with it set to `false`, the bot only answers to people \"talking to it\" (with lines starting with `\u003cbotname\u003e:`). Rate limit adjustments are extremely handy for that, use either `!ratelimit \u003cseconds\u003e` on the channel or as admin, `/msg \u003cbot\u003e !rametlimit \u003cseconds\u003e`.\n\nMore options \u0026 functionalities, such as token counting and improved rate limiting + fallback methods are WIP.\n\n# Bot commands\n`!ratelimit \u003cseconds\u003e`: This command sets the rate limit for the bot's responses. The \u003cseconds\u003e parameter specifies the minimum number of seconds that should pass between each response. Example usage: !ratelimit 60 would set the rate limit to one response per minute. This command can only be used by admin users, as specified in the `ADMIN_NICKNAMES` variable.\n`!mute \u003cminutes\u003e`: This command mutes the bot for a specified number of minutes. The \u003cminutes\u003e parameter specifies how long the bot should remain silent. Example usage: !mute 10 would mute the bot for 10 minutes. This command can only be used by admin users, as specified in the `ADMIN_NICKNAMES` variable.\n`!goaway`: This command causes the bot to leave the chatroom. This command can only be used by admin users, as specified in the `ADMIN_NICKNAMES` variable.\n\nThe bot is programmed to respond to messages that start with its nickname, followed by a colon. For instance, if the bot's nickname is `ChatKeke`, it would respond to a message like `ChatKeke: Hello!`.\n\nPlease note that the bot will not respond if it is currently muted or if the rate limit has not yet expired.\n\nBy default, the bot uses either OpenAI's GPT-3-5 or GPT-4 model (user defined) to generate responses. It keeps a history of the chatroom's conversation to provide context for its responses. The number of past interactions that the bot remembers can be adjusted by changing the `MAX_PAST_INTERACTIONS` variable.\n\nEnjoy!\n\n---\nBrought to you by [FlyingFathead](https://github.com/FlyingFathead) w/ ghostcode by ChaosWhisperer. \n\nContact: flyingfathead \u003c|\u003e protonmail \u003c|\u003e com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingfathead%2Fircbot-openai-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyingfathead%2Fircbot-openai-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingfathead%2Fircbot-openai-api/lists"}