Skip to content

Commit 2fe7203

Browse files
authored
Merge pull request #4 from jihe520/main
update readme
2 parents 6b3e755 + 9d08988 commit 2fe7203

File tree

5 files changed

+159
-48
lines changed

5 files changed

+159
-48
lines changed

README.md

Lines changed: 68 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
自动完整一份可以获奖级别的建模论文
1616

1717
<p align="center">
18-
<img src="./docs/webui.png">
18+
<img src="./docs/index.png">
19+
<img src="./docs/coder.png">
20+
<img src="./docs/writer.png">
1921
</p>
2022

2123
## ✨ 功能特性
@@ -41,50 +43,93 @@
4143
- [ ] 引入用户的交互(选择模型,重写等等)
4244
- [ ] codeinterpreter 接入云端 如 e2b 等供应商..
4345
- [ ] 多语言: R 语言, matlab
44-
45-
clone 项目后,下载**Todo Tree**插件,可以查看代码中所有具体位置的 todo
46+
- [ ] 绘图 napki,draw.io
4647

4748
## 视频demo
4849

49-
<video src="https://github.com/user-attachments/assets/10b3145a-feb7-4894-aaca-30d44bb35b9e"></video>
50+
<video src="https://github.com/user-attachments/assets/954cb607-8e7e-45c6-8b15-f85e204a0c5d"></video>
5051

5152
## 📖 使用教程
5253

53-
1. 安装依赖
54+
> 确保电脑中安装好 Python, Nodejs, **Redis** 环境
55+
56+
> 如果你想运行 命令行版本 cli 切换到 [master](https://github.com/jihe520/MathModelAgent/tree/master) 分支,部署更简单,但未来不会更新
5457
55-
```bash
56-
git clone https://github.com/jihe520/MathModelAgent.git # 克隆项目
57-
pip install uv # 推荐使用 uv 管理 python 项目
58-
uv venv # 创建虚拟环境
59-
uv sync # 安装依赖
60-
```
6158

62-
2. 配置模型
6359

64-
复制`/config/config.toml.example``/config/config.toml`, 填写配置模型和 APIKEY
60+
1. 配置模型
61+
62+
复制`/backend/.env.dev.example``/backend/.env.dev`(删除`.example` 后缀), 填写配置模型和 APIKEY
6563
[deepseek开发者平台](https://platform.deepseek.com/)
6664

65+
```bash
66+
ENV=dev
67+
#兼容 OpenAI 格式都行,具体看官方文档
68+
DEEPSEEK_API_KEY=
69+
DEEPSEEK_MODEL=
70+
DEEPSEEK_BASE_URL=
71+
# 模型最大问答次数
72+
MAX_CHAT_TURNS=60
73+
# 思考反思次数
74+
MAX_RETRIES=5
75+
# https://e2b.dev/
76+
E2B_API_KEY=
77+
78+
LOG_LEVEL=DEBUG
79+
DEBUG=true
80+
# 确保安装 Redis
81+
REDIS_URL=redis://localhost:6379/0
82+
REDIS_MAX_CONNECTIONS=20
83+
CORS_ALLOW_ORIGINS=http://localhost:5173,http://localhost:3000
84+
```
85+
6786
推荐模型能力较强的、参数量大的模型。
6887

69-
3. 运行测试 和 启动项目
88+
2. 安装依赖
89+
90+
下载项目
91+
92+
```bash
93+
git clone https://github.com/jihe520/MathModelAgent.git # 克隆项目
94+
```
95+
96+
启动后端
7097

7198
```bash
72-
uv run example.py # 简单测试能否正确运行
73-
uv run webui.py # 推荐: 启动 webui
74-
uv run terminal.py # 启动终端项目
99+
cd backend # 切换到 backend 目录下
100+
pip install uv # 推荐使用 uv 管理 python 项目
101+
uv sync # 安装依赖
102+
# 启动后端
103+
ENV=DEV uvicorn app.main:app --host 0.0.0.0 --port 8000 --ws-ping-interval 60 --ws-ping-timeout 120
75104
```
76105

77-
运行的结果在`/project/work_dir/`目录下
106+
启动前端
78107

79-
## 🤝 贡献
108+
```bash
109+
cd frontend # 切换到 frontend 目录下
110+
pnpm i #确保电脑安装了 pnpm
111+
pnpm run dev
112+
```
113+
114+
115+
运行的结果和产生在`backend/project/work_dir/xxx/*`目录下
116+
- notebook.ipynb: 保存运行过程中产生的代码
117+
- res.md: 保存最后运行产生的结果为 markdown 格式,使用 markdown 转 word(研究下 pandoc)
80118

81-
- 项目处于**开发阶段**(我有时间就会更新),变更较多,还存在许多 Bug,我正着手修复。
82-
- 欢迎提交 issues 和 PRs
119+
## 🤝 贡献和开发
120+
121+
- 项目处于**开发实验阶段**(我有时间就会更新),变更较多,还存在许多 Bug,我正着手修复。
122+
- 希望大家一起参与,让这个项目变得更好
123+
- 非常欢迎使用和提交 **PRs** 和 issues
83124
- 需求参考 后期计划
84125

126+
clone 项目后,下载 **Todo Tree** 插件,可以查看代码中所有具体位置的 todo
127+
128+
`.cursor/*` 有项目整体架构、rules、mcp 可以方便开发使用
129+
85130
## 📄 版权License
86131

87-
请勿商业用途,商业用途联系我(作者)
132+
个人免费使用,请勿商业用途,商业用途联系我(作者)
88133

89134
## 🙏 Reference
90135

@@ -101,5 +146,6 @@ Thanks to the following projects:
101146
[danmo-tyc](https://github.com/danmo-tyc)
102147

103148
有问题可以进群问
149+
[QQ 群:699970403](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=rFKquDTSxKcWpEhRgpJD-dPhTtqLwJ9r&authKey=xYKvCFG5My4uYZTbIIoV5MIPQedW7hYzf0%2Fbs4EUZ100UegQWcQ8xEEgTczHsyU6&noverify=0&group_code=699970403)
104150

105151
<img src="./docs/qq.jpg" height="400px">

README_EN.md

Lines changed: 91 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,33 @@
77
Automatically complete mathematical modeling and generate a ready-to-submit paper.
88
</h4>
99

10-
<br>
11-
<h5 align="center"> <a href="README.md">简体中文</a> | English </h5>
10+
<h5 align="center"><a href="README.md">简体中文</a> | English</h5>
1211

13-
## Vision:
14-
3 days to 1 hour <br>
15-
Automatically generate an award-worthy mathematical modeling paper
12+
## 🌟 Vision
13+
14+
Turn 3 days of competition into 1 hour <br>
15+
Automatically generate an award-level modeling paper
16+
17+
<p align="center">
18+
<img src="./docs/index.png">
19+
<img src="./docs/coder.png">
20+
<img src="./docs/writer.png">
21+
</p>
1622

1723
## ✨ Features
1824

1925
- 🔍 Automatic problem analysis, mathematical modeling, code writing, error correction, and paper writing
2026
- 💻 Local code interpreter
2127
- 📝 Generate a well-formatted paper
2228
- 🤝 Multi-agents: ~~modeling expert~~, coding expert (reflection module, local code interpreter), paper expert
23-
- 🔄 Multi-llms: Different models for each agent
29+
- 🔄 Multi-LLMs: Different models for each agent
30+
- 💰 Low cost agentless (about 1 RMB per task)
2431

2532
## 🚀 Future Plans
2633

34+
- [x] Add and complete webui, cli
2735
- [ ] Comprehensive tutorials and documentation
28-
- [ ] Web service
36+
- [ ] Provide web service
2937
- [ ] English support (MCM/ICM)
3038
- [ ] LaTeX template integration
3139
- [ ] Vision model integration
@@ -34,49 +42,106 @@ Automatically generate an award-worthy mathematical modeling paper
3442
- [ ] Docker deployment
3543
- [ ] User interaction (model selection, rewriting, etc.)
3644
- [ ] Cloud integration for code interpreter (e.g., e2b providers)
37-
38-
After cloning the project, install the **Todo Tree** plugin to view all specific todo locations in the code
45+
- [ ] Multi-language: R, Matlab
46+
- [ ] Drawing: napki, draw.io
3947

4048
## Video Demo
4149

4250
<video src="https://github.com/user-attachments/assets/10b3145a-feb7-4894-aaca-30d44bb35b9e"></video>
4351

44-
4552
## 📖 Usage Guide
4653

47-
1. Install Dependencies
54+
> **Notice:** Please make sure Python, Nodejs, and **Redis** are installed on your computer.
55+
>
56+
> If you want to run the CLI version, switch to the [master](https://github.com/jihe520/MathModelAgent/tree/master) branch. It's easier to deploy, but will not be updated in the future.
57+
58+
1. Configure Model
59+
60+
Copy `/backend/.env.dev.example` to `/backend/.env.dev` (remove the `.example` suffix), and fill in the model configuration and APIKEY
61+
[Deepseek Developer Platform](https://platform.deepseek.com/)
62+
63+
```bash
64+
ENV=dev
65+
# Compatible with OpenAI format, refer to official docs
66+
DEEPSEEK_API_KEY=
67+
DEEPSEEK_MODEL=
68+
DEEPSEEK_BASE_URL=
69+
# Max Q&A turns
70+
MAX_CHAT_TURNS=60
71+
# Reflection retries
72+
MAX_RETRIES=5
73+
# https://e2b.dev/
74+
E2B_API_KEY=
75+
76+
LOG_LEVEL=DEBUG
77+
DEBUG=true
78+
# Make sure Redis is installed
79+
REDIS_URL=redis://localhost:6379/0
80+
REDIS_MAX_CONNECTIONS=20
81+
CORS_ALLOW_ORIGINS=http://localhost:5173,http://localhost:3000
82+
```
83+
84+
It is recommended to use models with strong capabilities and large parameter counts.
85+
86+
2. Install Dependencies
87+
88+
Clone the project
89+
4890
```bash
4991
git clone https://github.com/jihe520/MathModelAgent.git
50-
pip install uv
51-
uv venv # create venv
52-
uv sync # install dependencies
5392
```
54-
2. Configure Model
55-
Copy `/config/config.toml.example` to `/config/config.toml` and fill in the model configuration
5693

57-
Recommend using models with strong capabilities and large parameter counts.
94+
Start backend
5895

59-
3. Run Tests and Start Project
6096
```bash
61-
uv run example.py # simple test to verify correct operation
62-
uv run main.py # complete project
97+
cd backend
98+
pip install uv # Recommended: use uv to manage python projects
99+
uv sync # Install dependencies
100+
# Start backend
101+
ENV=DEV uvicorn app.main:app --host 0.0.0.0 --port 8000 --ws-ping-interval 60 --ws-ping-timeout 120
63102
```
64103

65-
Results will be in the `/project/work_dir/` directory
104+
Start frontend
105+
106+
```bash
107+
cd frontend
108+
pnpm i # Make sure pnpm is installed
109+
pnpm run dev
110+
```
111+
112+
Results and outputs are generated in the `backend/project/work_dir/xxx/*` directory:
113+
- notebook.ipynb: code generated during execution
114+
- res.md: final results in markdown format, can be converted to Word (try pandoc)
115+
116+
## 🤝 Contribution & Development
66117

67-
## 🤝 Contribution
118+
- The project is in **experimental development stage** (updated when I have time), with frequent changes and some bugs being fixed.
119+
- Everyone is welcome to participate and make the project better.
120+
- PRs and issues are very welcome.
121+
- For requirements, refer to Future Plans.
68122

69-
- Project is in **development stage** (I update when time permits), with frequent changes and some bugs that I'm working to fix.
70-
- Issues and PRs are welcome
71-
- For requirements, refer to Future Plans
123+
After cloning the project, install the **Todo Tree** plugin to view all todo locations in the code.
124+
125+
`.cursor/*` contains overall architecture, rules, and mcp for easier development.
72126

73127
## 📄 License
74128

75-
Not for commercial use. Contact me (author) for commercial purposes.
129+
Free for personal use. For commercial use, please contact me (the author).
76130

77131
## 🙏 Reference
132+
78133
Thanks to the following projects:
79134
- [OpenCodeInterpreter](https://github.com/OpenCodeInterpreter/OpenCodeInterpreter/tree/main)
80135
- [TaskWeaver](https://github.com/microsoft/TaskWeaver)
81136
- [Code-Interpreter](https://github.com/MrGreyfun/Local-Code-Interpreter/tree/main)
82137
- [Latex](https://github.com/Veni222987/MathModelingLatexTemplate/tree/main)
138+
139+
## Others
140+
141+
Thanks to sponsors
142+
[danmo-tyc](https://github.com/danmo-tyc)
143+
144+
For questions, join the group
145+
[QQ Group: 699970403](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=rFKquDTSxKcWpEhRgpJD-dPhTtqLwJ9r&authKey=xYKvCFG5My4uYZTbIIoV5MIPQedW7hYzf0%2Fbs4EUZ100UegQWcQ8xEEgTczHsyU6&noverify=0&group_code=699970403)
146+
147+
<img src="./docs/qq.jpg" height="400px">

docs/coder.png

2.79 MB
Loading

docs/index.png

1.51 MB
Loading

docs/writer.png

3.72 MB
Loading

0 commit comments

Comments
 (0)