ChatPilot: 实现AgentChat对话,支持Google搜索、文件网址对话(RAG)、代码解释器功能,复现了Kimi Chat(文件,拖进来;网址,发出来)。
ChatPilot: 实现AgentChat对话,支持Google搜索、文件网址对话(RAG)、代码解释器功能,复现Kimi Chat(文件,拖进来;网址,发出来),支持OpenAI/Azure API。
Official Demo: https://chat.mulanai.com
pip install -U chatpilot
or
git clone https://github.com/shibing624/ChatPilot.git
cd ChatPilot
pip install -e .
两种方法构建前端:
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
输出:项目web
目录产出build
文件夹,包含了前端编译输出文件。
cd ..
pip install -r requirements.txt -U
bash start.sh
好了,现在你的应用正在运行:http://0.0.0.0:8080 Enjoy! 😄
支持命令行对话。
code: cli.py
> chatpilot -h
usage: __main__.py [-h] [--model MODEL] [--search SEARCH] [--openai_api_key OPENAI_API_KEY] [--openai_api_base OPENAI_API_BASE] [--serper_api_key SERPER_API_KEY]
chatpilot cli
options:
-h, --help show this help message and exit
--model MODEL openai model name
--search SEARCH search engine name, e.g. duckduckgo, serper
--openai_api_key OPENAI_API_KEY
openai api key
--openai_api_base OPENAI_API_BASE
openai api base url
--serper_api_key SERPER_API_KEY
serper api key
run:
pip install chatpilot -U
chatpilot
User: 输入问题, 如:"一句话介绍北京"。
如果你在研究中使用了ChatPilot,请按如下格式引用:
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 Apache License 2.0,可免费用做商业用途。请在产品说明中附加ChatPilot的链接和授权协议。
项目代码还很粗糙,如果大家对代码有所改进,欢迎提交回本项目,在提交之前,注意以下两点:
tests
添加相应的单元测试python -m pytest -v
来运行所有单元测试,确保所有单测都是通过的之后即可提交PR。