| # ChatXBT Web3 AI Assitant Service | |
| AI-powered unification and execution protocol for web3 applications | |
| ## Requirements | |
| The list below contains all the requirements needed to have a complete developer environment to sart working on this project. | |
| Follow the links to install or update these tools on your machine. | |
| 1. [Python 3.12+](https://www.python.org/downloads/release/python-3120/) | |
| 2. [Pyenv](https://github.com/pyenv/pyenv) | |
| 3. [Pip Installer](https://pip.pypa.io/en/stable/installation/) | |
| 4. [Python Venv](https://docs.python.org/3/library/venv.html) | |
| ## Installation | |
| 1. Clone the repository: `git clone https://github.com/ChatXBT/chatxbt-web3-ai-assistant.git` | |
| 2. Get a copy of the `\`.env`\` file from the project manager` | |
| 3. Create a virtual environment: `python -m venv env` | |
| 4. Activate the virtual environment: `source env/bin/activate` | |
| 4. Install the dependencies: `pip install -r requirements.txt` | |
| 5. Run the application: `chainlit run chatxbt-assistant.py -w` | |
| 6. Open the application in your browser: `http://localhost:8000` | |
| ## Project Overview | |
| The project is structured as follows: | |
| 1. src/data_sources: `a list of data sources that can be used to retrieve data for the AI assistant.` | |
| 2. src/databases: `a list of databases that can be used to store data for the AI assistant.` | |
| 3. src/libs: `a list of libraries that can be used to extend the classes and functions servicing the AI assistant.` | |
| 4. src/llms: `a list of language models powered libs that can be used to power the AI assistant.` | |
| 5. src/search_services: `a list of search services that can be used to retrieve data for the AI assistant.` | |
| 6. src/tools: `a list of tools that can be used to extend the functionality of the AI assistant.` | |
| ## Guides | |
| 1. Follow the development, structure and documentation patterns of the `src/tools/coin_data_toolkit.py` to build custom toolkits | |
| 2. Follow the development, structure and documentation patterns of the `src/tools/coin_data_toolkit.py` to build classes | |
| 3. Pay attention to the `constants` variables and `caching` decorators to optimize perfomance of class functions/methods across the project | |
| 4. Create new classes in the appropriate folders to maintain an organized codebase and project | |
| 5. After installing any new package run `` to update the dependency requirements list | |
| 6. Expose RPC functions for SDKs that do not support python runtime. use [DeepKit](https://deepkit.io/documentation/rpc) and [BunJS](https://bun.sh/) if possible. | |
| ## Git Workflow | |
| For this project, we will be using a very simple version of the Gitflow workflow. This workflow is designed to manage the development, release, and maintenance of software projects. It provides a clear and structured approach to managing branches, releases, and feature development. | |
| ### Feature | |
| 1. Create a branch off of main branch: `git checkout -b feature/my-feature` | |
| 2. Make your changes and commit them: `git commit -m "Add my feature"` | |
| 3. Push your changes to the remote repository: `git push origin feature/my-feature` | |
| 4. Open a pull request on GitHub and request a review from a team member. | |
| 5. Once the pull request is approved, merge it into the main branch. | |
| 6. Delete the feature branch: `git branch -d feature/my-feature` | |
| 7. Update your local main branch: `git checkout main && git pull origin main` | |
| ### Bugfix | |
| 1. For bug fixes, create a branch off of main branch: `git checkout -b bugfix/my-bugfix` | |
| 2. Make your changes and commit them: `git commit -m "Fix my bug"` | |
| 3. Push your changes to the remote repository: `git push origin bugfix/my-bugfix` | |
| 4. Open a pull request on GitHub and request a review from a team member. | |
| 5. Deploy the bugfix branch to a staging environment for testing. | |
| 6. Once testing is finished, merge the pull request into the main branch. | |
| 7. Once the pull request is approved, merge it into the main branch. | |
| 8. Delete the bugfix branch: `git branch -d bugfix/my-bugfix` | |
| 9. Update your local main branch: `git checkout main && git pull origin main` | |
| ## Deplopyment to producton | |
| To be finalised and added | |
| ## TODO | |
| 1. Add deployment instructions | |
| 2. Setup CI/CD pipelines for automatic deployment | |
| 3. Setup and integrate `LiteLLM` instance for LLM service high availability | |
| 4. Add RPC class for remmote method calls to other chatxbt services written in other launguages such as `JS`, `TS` & `GO` | |
| 5. Write enough unit test to ensure class and function input and output correctness |