ChatPilot: Implements AgentChat dialogue, supports Google search, file URL dialogue (RAG), code interpreter function, reproduces Kimi Chat (file, drag in; URL, send out), supports OpenAI/Azure API.
- This project implements the Agent question and answer dialogue of ReAct and OpenAI Function Call based on LangChain, and supports the automatic calling of the following tools:
- Internet search tool: Google Search API (Serper/DuckDuckGo)
- URL automatic parsing tool: reproduces the function of sending Kimi Chat URL
- Python code interpreter: supports E2B virtual environment and local python compiler environment to run code
- This project implements retrieval-enhanced RAG file Q&A that supports query rewriting based on LangChain
- Supports separation of front-end and back-end services. The front-end uses Svelte and the back-end uses FastAPI.
- Support voice input and output, support image generation
- Support user management, permission control, support import and export of chat records
Official Demo: https://chat.mulanai.com
git clone https://github.com/shibing624/ChatPilot.git
cd ChatPilot
pip install -r requirements.txt
# Copying required .env file, and fill in the LLM api key
cp .env.example .env
bash start.sh
Ok, now your application is running: http://0.0.0.0:8080 Enjoy! 😄
Two ways to build the front end:
- Download the packaged and compiled front-end buid.zip and extract it to the project web directory.
- Build the front end yourself using npm:
Requirements:
git clone https://github.com/shibing624/ChatPilot.git
cd ChatPilot/
# Copying required .env file
cp .env.example .env
# Building Frontend Using Node
cd web
npm install
npm run build
Output: The project web
directory outputs the build
folder, which contains the front-end compilation output files.
- Issue (suggestion):
- Email me: xuming: xuming624@qq.com
- WeChat Me: Add me* WeChat ID: xuming624, Remarks: Name-Company-NLP* to join the NLP communication group.
If you use ChatPilot in your research, please cite it in the following format: APA:
Xu, M. ChatPilot: LLM agent toolkit (Version 0.0.2) [Computer software]. https://github.com/shibing624/ChatPilot
BibTeX:
@misc{ChatPilot,
author = {Ming Xu},
title = {ChatPilot: llm agent},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/shibing624/ChatPilot}},
}
The licensing agreement is The Apache License 2.0, which is free for commercial use. Please attach the link to ChatPilot and the license agreement in the product description.
The project code is still very rough. If you have any improvements to the code, you are welcome to submit it back to this project. Before submitting, please pay attention to the following two points:
- Add corresponding unit tests in
tests
- Use
python -m pytest -v
to run all unit tests to ensure that all unit tests pass
You can then submit a PR.