Skip to content

Commit 20514ec

Browse files
committed
docs(readme): translate README to English and create Chinese version
1 parent 37b7355 commit 20514ec

4 files changed

Lines changed: 315 additions & 315 deletions

File tree

README.md

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</p>
44

55
<p align="center">
6-
<strong>FlowLLM:让基于LLM的HTTP/MCP服务开发更简单</strong><br>
7-
<em><sub>如果觉得有用,欢迎给个 ⭐ Star,您的支持是我们持续改进的动力</sub></em>
6+
<strong>FlowLLM: Simplifying LLM-based HTTP/MCP Service Development</strong><br>
7+
<em><sub>If you find it useful, please give us a ⭐ Star. Your support drives our continuous improvement.</sub></em>
88
</p>
99

1010
<p align="center">
@@ -15,59 +15,58 @@
1515
</p>
1616

1717
<p align="center">
18-
<a href="./README_EN.md">English</a> | 简体中文
18+
English | <a href="./README_ZH.md">简体中文</a>
1919
</p>
2020

2121
---
2222

23-
## 📖 简介
23+
## 📖 Introduction
2424

25-
FlowLLM 将 LLM/Embedding/vector_store 能力封装为 HTTP/MCP 服务,适用于 AI 对话助手、RAG 应用、工作流服务等场景,并可集成到支持
26-
MCP 的客户端工具中。
25+
FlowLLM encapsulates LLM, Embedding, and vector_store capabilities as HTTP/MCP services. It is suitable for AI assistants, RAG applications, and workflow services, and can be integrated into MCP-compatible client tools.
2726

28-
### 🏗️ 架构概览
27+
### 🏗️ Architecture Overview
2928

3029
<p align="center">
3130
<img src="docs/figure/framework.png" alt="FlowLLM Framework" width="100%">
3231
</p>
3332

34-
### 🌟 基于FlowLLM的应用
33+
### 🌟 Applications Based on FlowLLM
3534

36-
| 项目名 | 描述 |
37-
|-----------------------------------------------|---------------|
38-
| [ReMe](https://github.com/agentscope-ai/ReMe) | 面向智能体的记忆管理工具包 |
35+
| Project Name | Description |
36+
|-----------------------------------------------|--------------------------------------|
37+
| [ReMe](https://github.com/agentscope-ai/ReMe) | Memory management toolkit for agents |
3938

40-
### 📢 最近更新
39+
### 📢 Recent Updates
4140

42-
| 日期 | 更新内容 |
43-
|------------|---------------------------------------------------------------|
44-
| 2025-11-15 | 新增 [File Tool Op](docs/zh/guide/file_tool_op_guide.md) 功能,提供 13 个文件操作工具,支持文件读取、写入、编辑、搜索、目录操作、系统命令执行和任务管理等功能 |
45-
| 2025-11-14 | 新增 Token 计数能力,支持通过 `self.token_count()` 方法准确计算消息和工具的 token 数量,支持多种后端(baseopenai、hf),配置示例参考 [default.yaml](flowllm/config/default.yaml) |
41+
| Date | Update Content |
42+
|------------|-------------------------------------------------------------------------------------------------------------------------------------|
43+
| 2025-11-15 | Added [File Tool Op](docs/zh/guide/file_tool_op_guide.md) feature with 13 file operation tools, supporting file reading, writing, editing, searching, directory operations, system command execution, and task management |
44+
| 2025-11-14 | Added Token counting capability, supporting accurate calculation of token counts for messages and tools via `self.token_count()` method, with support for multiple backends (base, openai, hf). See configuration examples in [default.yaml](flowllm/config/default.yaml) |
4645

47-
### 📚 学习资料分享
46+
### 📚 Learning Resources
4847

49-
项目开发者会在这里分享最近的学习资料。
48+
Project developers will share their latest learning materials here.
5049

51-
| 日期 | 标题 | 描述 |
52-
|------------|-----------------------------------------------------------------------------------|-------------------------------------------------------------------|
53-
| 2025-11-14 | [HaluMem解读](./docs/zh/reading/20251114-halumem.md) | HaluMem: Evaluating Hallucinations in Memory Systems of Agents 解读 |
54-
| 2025-11-13 | [Gemini CLI 上下文管理机制](./docs/zh/reading/20251113-gemini-cli-context-management.md) | Gemini CLI 的多层上下文管理策略 |
55-
| 2025-11-10 | [上下文管理指南](./docs/zh/reading/20251110-manus-context-report.md) | 上下文管理指南 |
56-
| 2025-11-10 | [LangChain&Manus视频资料](./docs/zh/reading/20251110-manus-context-raw.md) | LangChain & Manus Context Management Video |
50+
| Date | Title | Description |
51+
|------------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
52+
| 2025-11-14 | [HaluMem Analysis](./docs/zh/reading/20251114-halumem.md) | HaluMem: Evaluating Hallucinations in Memory Systems of Agents Analysis |
53+
| 2025-11-13 | [Gemini CLI Context Management Mechanism](./docs/zh/reading/20251113-gemini-cli-context-management.md) | Multi-layer Context Management Strategy for Gemini CLI |
54+
| 2025-11-10 | [Context Management Guide](./docs/zh/reading/20251110-manus-context-report.md) | Context Management Guide |
55+
| 2025-11-10 | [LangChain&Manus Video Materials](./docs/zh/reading/20251110-manus-context-raw.md) | LangChain & Manus Context Management Video |
5756

58-
### 核心特性
57+
### Core Features
5958

60-
- **简单易用的 Op 开发**:继承 BaseOpBaseAsyncOp 基类,实现业务逻辑即可。FlowLLM提供了延迟初始化的 LLMEmbedding 模型和向量库,开发者只需通过 `self.llm``self.embedding_model``self.vector_store` 即可轻松使用这些资源。同时FlowLLM提供了完整的 Prompt 模板管理能力,通过 `prompt_format()` `get_prompt()` 方法进行格式化和使用。此外,FlowLLM 还内置了 Token 计数能力,通过 `self.token_count()` 方法可以准确计算消息和工具的 token 数量,支持多种后端(baseopenai、hf 等)。
59+
- **Simple Op Development**: Inherit from `BaseOp` or `BaseAsyncOp` and implement your business logic. FlowLLM provides lazy-initialized LLM, Embedding models, and vector stores accessible via `self.llm`, `self.embedding_model`, and `self.vector_store`. It also offers prompt template management through `prompt_format()` and `get_prompt()` methods. Additionally, FlowLLM includes built-in token counting capabilities. Use `self.token_count()` to accurately calculate token counts for messages and tools, supporting multiple backends (base, openai, hf, etc.).
6160

62-
- **灵活的 Flow 编排**:通过 YAML 配置文件将 Op 组合成 Flow,支持灵活的编排方式。`>>` 表示串行组合,`|` 表示并行组合,例如 `SearchOp() >> (AnalyzeOp() | TranslateOp()) >> FormatOp()` 可构建复杂的工作流。定义输入输出 Schema 后,使用 `flowllm config=your_config` 命令即可启动服务。
61+
- **Flexible Flow Orchestration**: Compose Ops into Flows via YAML configuration. `>>` denotes serial composition; `|` denotes parallel composition. For example, `SearchOp() >> (AnalyzeOp() | TranslateOp()) >> FormatOp()` builds complex workflows. Define input/output schemas and start the service with `flowllm config=your_config`.
6362

64-
- **自动生成服务**:配置完成后,FlowLLM 会自动生成 HTTPMCP CMD 服务。HTTP 服务提供标准的 RESTFul API,支持同步 JSON 响应和 HTTP Stream 流式响应。MCP 服务会自动注册为 Model Context Protocol 工具,可集成到支持 MCP 的客户端中。CMD 服务支持命令行模式执行单个 Op,适合快速测试和调试。
63+
- **Automatic Service Generation**: FlowLLM automatically generates HTTP, MCP, and CMD services. The HTTP service provides RESTful APIs with synchronous JSON and HTTP Stream responses. The MCP service registers as Model Context Protocol tools for MCP-compatible clients. The CMD service executes a single Op in command-line mode for quick testing and debugging.
6564

6665
---
6766

68-
## 快速开始
67+
## Quick Start
6968

70-
### 📦 Step0 安装
69+
### 📦 Step0 Installation
7170

7271
#### 📥 From PyPI
7372

@@ -83,17 +82,17 @@ cd flowllm
8382
pip install -e .
8483
```
8584

86-
详细安装与配置方法请参考 [安装指南](docs/zh/guide/installation.md)
85+
For detailed installation and configuration, refer to the [Installation Guide](docs/zh/guide/installation.md).
8786

88-
### ⚙️ 配置
87+
### ⚙️ Configuration
8988

90-
创建 `.env` 文件,配置 API Key。你可以从 `example.env` 复制并修改:
89+
Create a `.env` file and configure your API keys. Copy from `example.env` and modify:
9190

9291
```bash
9392
cp example.env .env
9493
```
9594

96-
然后在 `.env` 文件中配置你的 API Key:
95+
Configure your API keys in the `.env` file:
9796

9897
```bash
9998
FLOW_LLM_API_KEY=sk-xxxx
@@ -102,9 +101,9 @@ FLOW_EMBEDDING_API_KEY=sk-xxxx
102101
FLOW_EMBEDDING_BASE_URL=https://xxxx/v1
103102
```
104103

105-
详细配置说明请参考 [配置指南](docs/zh/guide/config_guide.md)
104+
For detailed configuration, refer to the [Configuration Guide](docs/zh/guide/config_guide.md).
106105

107-
### 🛠️ Step1 构建Op
106+
### 🛠️ Step1 Build Op
108107

109108
```python
110109
from flowllm.core.context import C
@@ -118,19 +117,19 @@ class SimpleChatOp(BaseAsyncOp):
118117
query = self.context.get("query", "")
119118
messages = [Message(role=Role.USER, content=query)]
120119

121-
# 使用 token_count 方法计算 token 数量
120+
# Use token_count method to calculate token count
122121
token_num = self.token_count(messages)
123122
print(f"Input tokens: {token_num}")
124123

125124
response = await self.llm.achat(messages=messages)
126125
self.context.response.answer = response.content.strip()
127126
```
128127

129-
详细内容请参考 [简单 Op 指南](docs/zh/guide/async_op_minimal_guide.md)[LLM Op 指南](docs/zh/guide/async_op_llm_guide.md)[高级 Op 指南](docs/zh/guide/async_op_advance_guide.md)(包含 EmbeddingVectorStore 和并发执行等高级功能)。
128+
For details, refer to the [Simple Op Guide](docs/zh/guide/async_op_minimal_guide.md), [LLM Op Guide](docs/zh/guide/async_op_llm_guide.md), and [Advanced Op Guide](docs/zh/guide/async_op_advance_guide.md) (including Embedding, VectorStore, and concurrent execution).
130129

131-
### 📝 Step2 配置config
130+
### 📝 Step2 Configure Config
132131

133-
以下示例展示如何构建一个 MCPModel Context Protocol)服务。创建配置文件 `my_mcp_config.yaml`
132+
The following example demonstrates building an MCP (Model Context Protocol) service. Create a configuration file `my_mcp_config.yaml`:
134133

135134
```yaml
136135
backend: mcp
@@ -156,75 +155,76 @@ llm:
156155
model_name: qwen3-30b-a3b-instruct-2507
157156
params:
158157
temperature: 0.6
159-
token_count: # 可选,配置 token 计数后端
158+
token_count: # Optional, configure token counting backend
160159
model_name: Qwen/Qwen3-30B-A3B-Instruct-2507
161-
backend: hf # 支持 baseopenai、hf 等
160+
backend: hf # Supports base, openai, hf, etc.
162161
params:
163162
use_mirror: true
164163
```
165164
166-
### 🚀 Step3 启动 MCP 服务
165+
### 🚀 Step3 Start MCP Service
167166
168167
```bash
169168
flowllm \
170169
config=my_mcp_config \
171-
backend=mcp \ # 可选,覆盖config配置
172-
mcp.transport=sse \ # 可选,覆盖config配置
173-
mcp.port=8001 \ # 可选,覆盖config配置
174-
llm.default.model_name=qwen3-30b-a3b-thinking-2507 # 可选,覆盖config配置
170+
backend=mcp \ # Optional, overrides config
171+
mcp.transport=sse \ # Optional, overrides config
172+
mcp.port=8001 \ # Optional, overrides config
173+
llm.default.model_name=qwen3-30b-a3b-thinking-2507 # Optional, overrides config
175174
```
176175

177-
服务启动后可以参考[Client Guide](docs/zh/guide/client_guide.md)来使用服务,可以直接获取模型所需要的tool_call。
176+
After the service starts, refer to the [Client Guide](docs/zh/guide/client_guide.md) to use the service and obtain the tool_call required by the model.
178177

179178
---
180179

181-
## 📚 详细文档
180+
## 📚 Detailed Documentation
182181

183-
### 🚀 入门指南
184-
- [安装指南](docs/zh/guide/installation.md)
185-
- [配置指南](docs/zh/guide/config_guide.md)
182+
### 🚀 Getting Started
183+
- [Installation Guide](docs/zh/guide/installation.md)
184+
- [Configuration Guide](docs/zh/guide/config_guide.md)
186185

187-
### 🔧 Op 开发
188-
- [Op 介绍](docs/zh/guide/op_introduction.md)
189-
- [简单 Op 指南](docs/zh/guide/async_op_minimal_guide.md)
190-
- [LLM Op 指南](docs/zh/guide/async_op_llm_guide.md)
191-
- [高级 Op 指南](docs/zh/guide/async_op_advance_guide.md)
192-
- [Tool Op 指南](docs/zh/guide/async_tool_op_guide.md)
193-
- [File Tool Op 指南](docs/zh/guide/file_tool_op_guide.md)
194-
- [Vector Store 指南](docs/zh/guide/vector_store_guide.md)
186+
### 🔧 Op Development
187+
- [Op Introduction](docs/zh/guide/op_introduction.md)
188+
- [Simple Op Guide](docs/zh/guide/async_op_minimal_guide.md)
189+
- [LLM Op Guide](docs/zh/guide/async_op_llm_guide.md)
190+
- [Advanced Op Guide](docs/zh/guide/async_op_advance_guide.md)
191+
- [Tool Op Guide](docs/zh/guide/async_tool_op_guide.md)
192+
- [File Tool Op Guide](docs/zh/guide/file_tool_op_guide.md)
193+
- [Vector Store Guide](docs/zh/guide/vector_store_guide.md)
195194

196-
### 🔀 Flow 编排
197-
- [Flow 指南](docs/zh/guide/flow_guide.md)
195+
### 🔀 Flow Orchestration
196+
- [Flow Guide](docs/zh/guide/flow_guide.md)
198197

199-
### 🌐 服务使用
200-
- [HTTP 服务指南](docs/zh/guide/http_service_guide.md)
201-
- [HTTP Stream 指南](docs/zh/guide/http_stream_guide.md)
202-
- [MCP 服务指南](docs/zh/guide/mcp_service_guide.md)
203-
- [CMD 服务指南](docs/zh/guide/cmd_service_guide.md)
204-
- [客户端指南](docs/zh/guide/client_guide.md)
198+
### 🌐 Service Usage
199+
- [HTTP Service Guide](docs/zh/guide/http_service_guide.md)
200+
- [HTTP Stream Guide](docs/zh/guide/http_stream_guide.md)
201+
- [MCP Service Guide](docs/zh/guide/mcp_service_guide.md)
202+
- [CMD Service Guide](docs/zh/guide/cmd_service_guide.md)
203+
- [Client Guide](docs/zh/guide/client_guide.md)
205204

206205
---
207206

208-
## 🤝 参与贡献
207+
## 🤝 Contributing
209208

210-
欢迎各种形式的贡献!具体参与方式请参考 [贡献指南](docs/zh/guide/contribution.md)
209+
Contributions of all forms are welcome! For participation methods, refer to the [Contribution Guide](docs/zh/guide/contribution.md).
211210

212211
---
213212

214-
## 📄 许可证
213+
## 📄 License
215214

216-
本项目采用 [Apache 2.0](LICENSE) 许可证。
215+
This project is licensed under the [Apache 2.0](LICENSE) license.
217216

218217
---
219218

220-
## Star History
219+
## Star 历史
221220

222221
[![Star History Chart](https://api.star-history.com/svg?repos=flowllm-ai/flowllm&type=Date)](https://www.star-history.com/#flowllm-ai/flowllm&Date)
223222

224223
---
225224

226225
<p align="center">
227226
<a href="https://github.com/flowllm-ai/flowllm">GitHub</a> •
228-
<a href="https://flowllm-ai.github.io/flowllm/">文档</a> •
227+
<a href="https://flowllm-ai.github.io/flowllm/">Documentation</a> •
229228
<a href="https://pypi.org/project/flowllm/">PyPI</a>
230229
</p>
230+

0 commit comments

Comments
 (0)