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.
Installation
- Clone the repository:
git clone https://github.com/ChatXBT/chatxbt-web3-ai-assistant.git - Get a copy of the
\.env\file from the project manager` - Create a virtual environment:
python -m venv env - Activate the virtual environment:
source env/bin/activate - Install the dependencies:
pip install -r requirements.txt - Run the application:
chainlit run chatxbt-assistant.py -w - Open the application in your browser:
http://localhost:8000
Project Overview
The project is structured as follows:
- src/data_sources:
a list of data sources that can be used to retrieve data for the AI assistant. - src/databases:
a list of databases that can be used to store data for the AI assistant. - src/libs:
a list of libraries that can be used to extend the classes and functions servicing the AI assistant. - src/llms:
a list of language models powered libs that can be used to power the AI assistant. - src/search_services:
a list of search services that can be used to retrieve data for the AI assistant. - src/tools:
a list of tools that can be used to extend the functionality of the AI assistant.
Guides
- Follow the development, structure and documentation patterns of the
src/tools/coin_data_toolkit.pyto build custom toolkits - Follow the development, structure and documentation patterns of the
src/tools/coin_data_toolkit.pyto build classes - Pay attention to the
constantsvariables andcachingdecorators to optimize perfomance of class functions/methods across the project - Create new classes in the appropriate folders to maintain an organized codebase and project
- After installing any new package run `` to update the dependency requirements list
- Expose RPC functions for SDKs that do not support python runtime. use DeepKit and BunJS 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
- Create a branch off of main branch:
git checkout -b feature/my-feature - Make your changes and commit them:
git commit -m "Add my feature" - Push your changes to the remote repository:
git push origin feature/my-feature - Open a pull request on GitHub and request a review from a team member.
- Once the pull request is approved, merge it into the main branch.
- Delete the feature branch:
git branch -d feature/my-feature - Update your local main branch:
git checkout main && git pull origin main
Bugfix
- For bug fixes, create a branch off of main branch:
git checkout -b bugfix/my-bugfix - Make your changes and commit them:
git commit -m "Fix my bug" - Push your changes to the remote repository:
git push origin bugfix/my-bugfix - Open a pull request on GitHub and request a review from a team member.
- Deploy the bugfix branch to a staging environment for testing.
- Once testing is finished, merge the pull request into the main branch.
- Once the pull request is approved, merge it into the main branch.
- Delete the bugfix branch:
git branch -d bugfix/my-bugfix - Update your local main branch:
git checkout main && git pull origin main
Deplopyment to producton
To be finalised and added
TODO
- Add deployment instructions
- Setup CI/CD pipelines for automatic deployment
- Setup and integrate
LiteLLMinstance for LLM service high availability - Add RPC class for remmote method calls to other chatxbt services written in other launguages such as
JS,TS&GO - Write enough unit test to ensure class and function input and output correctness