The vision of building your assistant is to enable everyone to use the AI assistnat in their daily life for free.
Your Assistant has is an open source AI assistant that has the following properties:
- It can (but not necessarily) run on your local device and co-host with your private data.
- It is designed to be client side agnostic and model agnostic, so the evolution of either side can make your assistant more usable.
- Many aspect of the AI asisstant is configurable. You can choose to access it from the Discord server, the HTTP service, or locally via command line.
We use the following tools to ease the project development:
- poetry: package management.
- mypy: static type check.
- flake8 and black: coding style unification and formatting.
- isort: import order management.
Please run dev-setup.sh
to setup the environment.
When you need to add new package, please use poetry add <package>
to add dependencies, or use poetry add --group dev <package>
to add development dependencies, e.g. pytest, flake8, etc.
Note: make sure your
poetry
version is at1.4.x
or higher, some OS may install1.1.x
by default, which is incompatible with thepyproject.toml
we have and will run into issues.
For auto-formatting, please use black in your IDE to format your code. If you use VSCode, you can create a folder .vscode
and create a file settings.json
. In the file, set "format at save".
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.black": true
},
}
We have a number of pre-commit checks, including coding style, type check, and import order,
Initialize pre-commit.
pre-commit install
docker build -t your-assistant-discord-bot -f Dockerfile.discord . ; docker run -it your-assistant-discord-bot
docker build -t your-assistant-http-service -f Dockerfile.http_service . ; docker run -it your-assistant-http-service
docker rm $(docker ps -a -q) ; docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi