https://github.com/cakecrusher/mimicbot
Mimicbot enables the effortless yet modular creation of an AI chat bot model that imitates another person's manner of speech.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Repository
Mimicbot enables the effortless yet modular creation of an AI chat bot model that imitates another person's manner of speech.
Basic Info
Statistics
- Stars: 11
- Watchers: 2
- Forks: 6
- Open Issues: 4
- Releases: 0
Topics
Metadata Files
README.md
mimicbot 🤖
https://user-images.githubusercontent.com/37946988/190918228-a46ba035-c8d1-4fd5-9893-ad87451b22b7.mp4
About
Mimicbot enables the effortless yet modular creation of an AI chat bot model that imitates another person's manner of speech. For example, if mimicbot were based on Shakespeare, mimicbot will adjust its responses to elizabethan english. It offers a a general pipeline for creating a mimicbot from scratch provided data on the user to mimic, and another pipeline that runs entirely on Discord without the need for external data. The pipeline consists multiple other commands that are also available for modular use.
New
You can now create a mimicbot independent of the discord platform.
Important Commands
Type python -m mimicbot_cli --help to see a list of commands. Similarly you can use python -m mimicbot_cli <A_MIMICBOT_COMMAND> --help to see details on a specific command.
Quickstart
Verify the following prerequisites are met
- Python 3.x (verify with
python --versionorpython3 --versionorpy --version)- Download from the official Python website
- git-lfs (verify with
git lfs --version)- Install with
git lfs installor follow the official git lfs installation guide.
- Install with
- pip (verify with
pip --version)- Install with
py get-pip.pyor follow the official pip installation guide.
- Install with
Note
If you run into any issues, you dont know how to deal with. Utilize the mimicbot Dockerfile to spin up a functional environment.
Steps
- Run
pip install mimicbot-cli. - Run the command
python -m mimicbot_cli forge. This command will guide you through the creation of the bot from start to finish. - Opt to build a Discord bot.
- Once the mimicbot is activated on discord, you can interact with it by simply sending it a message as you would to the person it is imitating, with a
@<NAME_OF_MIMICBOT>mention somewhere in the text. The mimicbot will then reply with a message similar to how the original user would have said it.
Contribute
- Clone the repository
git clone https://github.com/CakeCrusher/mimicbot.git - Navigate into the cloned directory
cd mimicbot - Install the dependencies
pip install -r requirements.txt. If you have CUDA installed usepip install -r requirements-gpu.txtinstead. (WARNING: the dependencies will consume a lot of space. If you have an environment with pytorch already installed it is advisable that you use that environment.) - Run the command
python -m mimicbot_cli forge. This command will guide you through the creation of the bot from start to finish. - Once the mimicbot is activated on discord, you can interact with it by simply sending it a message as you would to the person it is imitating, with a
@<NAME_OF_MIMICBOT>mention somewhere in the text. The mimicbot will then reply with a message similar to how the original user would have said it.
Deploy
Although technically you could deploy your bot to any server using this repository it is not recommended primarily because of the heavy dependencies. Consequently, the mimicbot-deploy repository was built for ease of deployment. Follow the steps listed in its README to deploy your bot.
If you are still interested in deploying with this repository you can do so by either running forge on the server or passing the configuration files and data files to the appropriate paths on the server and then running activate.
Todo
(Feel free to contribute)
- [x] Incorporate github actions to run the pytest tests.
- [x] Enable bots to mention users in the channel.
- [ ] More error handling.
- [ ] Linux support.
- [ ] Add linting.
- [ ] github action.
- [ ] Use DiscordChatExporter cli as the primary source of mining data to be able to capture dm data in addition to guild data. It also does not require admin access for guilds. The only catch is its security is yet to be determined.
- [ ] Embed training settings into the CLI command
- [ ] More flexible with inputs
- [ ] Target user input
- [ ] Guild channel names
- [ ] Make sure the bot learns as it is being used.
- [ ] Create a public server for running through the pipeline and adding deploying the bot. Will work by simply downloading the bot and commanding it to copy a user, then wait a couple minutes and BAM! It's mimicing.
- [ ] Add testing
- [ ] activate command unit tests
- [ ] train command unit tests
- [ ] End to end tests
Mini-guides
Quick guides to clear up the more confusing parts to getting up and running with mimicbot.
Setting up Discord bot (and retrieving API token)
If you are running mimicbot_cli forge on the CLI make sure to complete this guide before submitting the API key.
1. Create a discord developer account and log in.
2. Create a discord application in applications page of the developer portal.
3. Add a bot to the application in the bot settings inside your application.
4. Click on the reset token button which will then prompt you to copy the token, this is the token you will provide to mimicbot. Then activate the "server members intent" and the "message content intent".
5. Navigate to OAuth2 > URL Generator then check "bot" as the scope. Then check the "Read Messages/View Channels" general permission and "Send Messages" text permission. Finally, once all of those are checked copy the Generated URL.
6. (You must be signed into your discord account on the browser) Simply navigate to the URL you copied, then select the server (you must have admin privileges) where you want to both: mine data and activate the bot. Click create.
7. Click authorize, click through Captcha, and you're done! Your discord bot is be ready to go!
8. If you are running mimicbot_cli forge make sure to return to the CLI, enter your Discord API token and continue on the CLI.
Retrieving Huggingface API token
If you are running mimicbot_cli forge on the CLI make sure to complete this guide before moving submitting the API key.
1. Create a huggingface account and log in.
2. Navigate to your settings.
3. Click on the "Access Tokens" tab, then create a "New Token". Then label it, select its "Role" as "write", and press "Generate a token".
4. Copy the "write" token, this is the token you will provide to mimicbot.
5. If you are running mimicbot_cli forge make sure to return to the CLI, enter your Huggingface API token and continue on the CLI.
Spining up Docker Environement
- Verify you have docker installed and running by using
docker ps. You may install it from their official installation page. - Create a new docker image by running
docker build -t mimicbot .. - Run the docker image with
docker run -it --name <ANY_NAME> mimicbot /bin/bash. - You are now ready to start using mimicbot's CLI.
- You may return to the same container by running
docker start -ai <ANY_NAME>
Troubleshooting
Errors may occur here are common ones with solutions.
GPU error
- Visit this colab notebook.
- Copy all files in your
/DATA_PATH/colabinto the root directory of the notebook. (If you don't know what yourDATA_PATHis, enter the following command in a terminal:python -m mimicbot_cli config. Then find the line that with the textdata_path = ...yourDATA_PATHis listed there.)
- Click on the "Edit" tab and then click on the "Notebook settings". Select "GPU" for Hardware accelerator, and finally click "Save".

- Click on the "Runtime" tab, then click "Run all".

- Wait for the script to finish. You will know it is done with the following indicators: 1. The favicon is yellow, 2. There is a green checkmark next to the cell, and 3. Scroll all the way down to the bottom of the output and you should see a timestamped message saying "Training finished".

Owner
- Name: Sebastian Sosa
- Login: CakeCrusher
- Kind: user
- Company: None
- Website: 1sebastian1sosa1@gmail.com
- Twitter: Sebasti54919704
- Repositories: 24
- Profile: https://github.com/CakeCrusher
Passionate about learning and building the extraordinary systems of the world
GitHub Events
Total
- Watch event: 1
- Issue comment event: 2
- Push event: 1
Last Year
- Watch event: 1
- Issue comment event: 2
- Push event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| CakeCrusher | 1****1@g****m | 81 |
| Sebastian Sosa | 3****r | 8 |
| Michael Hoobler | h****l@g****m | 2 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 4
- Total pull requests: 7
- Average time to close issues: about 2 months
- Average time to close pull requests: 29 minutes
- Total issue authors: 4
- Total pull request authors: 4
- Average comments per issue: 5.25
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- atagulalan (1)
- ankan-stack (1)
- mhoobler (1)
- piee-kun (1)
Pull Request Authors
- CakeCrusher (4)
- victoryv21 (2)
- Copilot (1)
- mhoobler (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 13 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 4
- Total maintainers: 1
pypi.org: mimicbot-cli
Tools and a pipeline for creating of an AI chat bot modeled to imitate a user
- Homepage: https://github.com/CakeCrusher/mimicbot
- Documentation: https://mimicbot-cli.readthedocs.io/
- License: MIT License
-
Latest release: 1.0.1
published over 3 years ago
Rankings
Maintainers (1)
pypi.org: mimicbot-chat
Chat utils for mimicbot
- Homepage: https://github.com/CakeCrusher/mimicbot/tree/master/mimicbot/mimicbot_chat
- Documentation: https://mimicbot-chat.readthedocs.io/
- License: MIT License
-
Latest release: 1.1.0
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- aiohttp ==3.7.4.post0
- argcomplete ==2.0.0
- async-timeout ==3.0.1
- atomicwrites ==1.4.0
- attrs ==21.4.0
- certifi ==2021.10.8
- chardet ==4.0.0
- charset-normalizer ==2.0.12
- click ==8.1.2
- colorama ==0.4.4
- discord.py ==1.7.3
- distlib ==0.3.4
- filelock ==3.6.0
- gunicorn ==20.1.0
- idna ==3.3
- iniconfig ==1.1.1
- multidict ==6.0.2
- numpy ==1.23.0
- packaging ==21.3
- pandas ==1.4.3
- pipenv ==2022.3.28
- pipx ==1.0.0
- platformdirs ==2.5.1
- pluggy ==1.0.0
- praw ==7.5.0
- prawcore ==2.3.0
- py ==1.11.0
- pyparsing ==3.0.7
- pytest ==7.1.2
- python-dateutil ==2.8.2
- pytz ==2022.1
- pywin32 ==304
- requests ==2.27.1
- six ==1.16.0
- tomli ==2.0.1
- traitlets ==5.2.2.post1
- typer ==0.4.1
- typing_extensions ==4.2.0
- update-checker ==0.18.0
- urllib3 ==1.26.8
- userpath ==1.8.0
- virtualenv ==20.14.0
- virtualenv-clone ==0.5.7
- wcwidth ==0.2.5
- websocket-client ==1.3.1
- yarl ==1.7.2
- actions/checkout v3 composite
- actions/setup-python v4 composite
- python 3.9 build
- pandas *
- requests *
- Jinja2 ==3.1.2
- Markdown ==3.3.7
- MarkupSafe ==2.1.1
- Pillow ==9.2.0
- PyYAML ==6.0
- Pygments ==2.12.0
- Send2Trash ==1.8.0
- Werkzeug ==2.1.2
- absl-py ==1.1.0
- aiohttp ==3.7.4.post0
- argcomplete ==2.0.0
- argon2-cffi ==21.3.0
- argon2-cffi-bindings ==21.2.0
- asttokens ==2.0.5
- async-timeout ==3.0.1
- atomicwrites ==1.4.0
- attrs ==21.4.0
- backcall ==0.2.0
- beautifulsoup4 ==4.11.1
- bleach ==5.0.1
- blessings ==1.7
- cachetools ==5.2.0
- certifi ==2021.10.8
- cffi ==1.15.1
- chardet ==4.0.0
- charset-normalizer ==2.0.12
- click ==8.1.2
- colorama ==0.4.4
- curtsies ==0.3.10
- cwcwidth ==0.1.6
- datasets ==2.3.2
- debugpy ==1.6.2
- decorator ==5.1.1
- defusedxml ==0.7.1
- dill ==0.3.5.1
- discord.py ==1.7.3
- distlib ==0.3.4
- entrypoints ==0.4
- executing ==0.8.3
- fastjsonschema ==2.15.3
- filelock ==3.6.0
- fsspec ==2022.5.0
- google-auth ==2.9.0
- google-auth-oauthlib ==0.4.6
- grpcio ==1.47.0
- gunicorn ==20.1.0
- huggingface-hub ==0.8.1
- idna ==3.3
- iniconfig ==1.1.1
- ipykernel ==6.15.1
- ipython ==8.4.0
- ipython-genutils ==0.2.0
- ipywidgets ==7.7.1
- jedi ==0.18.1
- joblib ==1.1.0
- jsonschema ==4.6.2
- jupyter-client ==7.3.4
- jupyter-core ==4.11.1
- jupyterlab-pygments ==0.2.2
- jupyterlab-widgets ==1.1.1
- matplotlib-inline ==0.1.3
- mistune ==0.8.4
- multidict ==6.0.2
- multiprocess ==0.70.13
- nbclient ==0.6.6
- nbconvert ==6.5.0
- nbformat ==5.4.0
- nest-asyncio ==1.5.5
- nltk ==3.7
- notebook ==6.4.12
- numpy ==1.23.0
- oauthlib ==3.2.0
- packaging ==21.3
- pandas ==1.4.3
- pandocfilters ==1.5.0
- parso ==0.8.3
- pickleshare ==0.7.5
- pipenv ==2022.3.28
- pipx ==1.0.0
- platformdirs ==2.5.1
- pluggy ==1.0.0
- praw ==7.5.0
- prawcore ==2.3.0
- prometheus-client ==0.14.1
- prompt-toolkit ==3.0.30
- protobuf ==3.19.4
- psutil ==5.9.1
- pure-eval ==0.2.2
- py ==1.11.0
- pyarrow ==8.0.0
- pyasn1 ==0.4.8
- pyasn1-modules ==0.2.8
- pycparser ==2.21
- pyparsing ==3.0.7
- pyrsistent ==0.18.1
- pytest ==7.1.2
- pytest-asyncio ==0.18.3
- python-dateutil ==2.8.2
- pytz ==2022.1
- pywin32 ==304
- pywinpty ==2.0.6
- pyzmq ==23.2.0
- regex ==2022.6.2
- requests ==2.27.1
- requests-oauthlib ==1.3.1
- responses ==0.18.0
- rouge-score ==0.0.4
- rsa ==4.8
- six ==1.16.0
- soupsieve ==2.3.2.post1
- stack-data ==0.3.0
- tensorboard ==2.9.1
- tensorboard-data-server ==0.6.1
- tensorboard-plugin-wit ==1.8.1
- tensorboardX ==2.5.1
- terminado ==0.15.0
- tinycss2 ==1.1.1
- tokenizers ==0.12.1
- tomli ==2.0.1
- torch ==1.12.0
- torchaudio ==0.12.0
- torchvision ==0.13.0
- tornado ==6.2
- tqdm ==4.64.0
- traitlets ==5.2.2.post1
- transformers ==4.20.1
- typer ==0.4.1
- typing_extensions ==4.2.0
- update-checker ==0.18.0
- urllib3 ==1.26.8
- userpath ==1.8.0
- virtualenv ==20.14.0
- virtualenv-clone ==0.5.7
- wcwidth ==0.2.5
- webencodings ==0.5.1
- websocket-client ==1.3.1
- widgetsnbextension ==3.6.1
- xxhash ==3.0.0
- yarl ==1.7.2
- aiohttp ==3.7.4
- configparser *
- datasets *
- discord.py ==1.7.3
- huggingface-hub *
- ipywidgets *
- numpy *
- pandas *
- requests *
- rouge-score *
- tensorboard *
- torch *
- torchaudio *
- torchvision *
- tqdm *
- transformers *
- typer *