pingcap/autoflow is an open-source project and we welcome contributions from the community. If you are interested in contributing to the project, please read the following guidelines.
In this section, you should have some prerequisites software installed on your local machine:
Setting up the project on your local machine is the first step to contributing to the project. You can clone the project from the GitHub repository and then start the project on your local machine. You can follow the instructions in the Deployment Guide file to set up the project on your local machine.
To test your local changes, you can build and run the project using:
docker compose -f docker-compose.build.yml up
All set to participate in the project? You can start by looking at the open issues in this repo.
The project is divided into several components, and you can contribute to any of the following components:
- Frontend: The frontend of the project is built using Next.js.
- Backend: The backend of the project is built using FastAPI.
- Data Source: The Data Source component is responsible for indexing the data from different type of sources. You can add more data source types to the project.
- LLM: The LLM Engine component is responsible for extracting knowledge from docs and generating responses. You can add more LLM models support to the project.
- Reranker: The Reranker Engine component is responsible for reranking the results retrieved from the database. You can add more Reranker models support to the project.
- Embedding: The Embedding Engine component is responsible for converting text into vectors. You can add more Embedding models support to the project.
- RAG & GraphRAG Engine: The component is responsible for extracting knowldge from docs and then chunking, indexing and storing the data in the database, also includes retrieving the data from the database and generating the answer for the user.
- Documentations: The documentation of the project is written in Markdown files. You can contribute to the documentation by adding more content to the documentation.
Using the FastAPI framework.
-
Create a FastAPI Instance.
router = FastAPI()
-
Use Decorators to Define API Endpoints. For example:
@router.get("xxx")
-
Implement the Route Handler Function.
-
Add sub-routes to the main route and tag the sub-routes in
backend/app/api/main.py
.api_router.include_router(sub_router, tags=["xxxx"])
Please feel free to reach out to the maintainers if you have any questions or need help with the project.
If you have any questions or suggestions, please feel free to open a discussion in the Discussions