Files
insightflow/README.md
2026-02-21 18:12:58 +08:00

125 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# InsightFlow - Audio to Knowledge Graph Platform
InsightFlow 是一个音频转知识图谱平台,支持将音频、文档转换为结构化的知识图谱,并提供强大的分析和推理能力。
## 功能特性
### Phase 1-3: 基础功能 ✅
- 音频上传与转录(阿里云听悟 ASR
- 实体提取与关系抽取
- 知识图谱可视化D3.js
- 多文件图谱融合
- PDF/DOCX 文档导入
- 实体对齐与别名管理
- 项目知识库面板
### Phase 4: Agent 助手与知识溯源 ✅
- AI 助手对话RAG 问答)
- 实体操作指令执行
- 知识溯源(关系来源追踪)
- 实体悬停卡片
- 置信度提示
### Phase 5: 高级功能 ✅
- **知识推理** - 因果/对比/时序/关联推理
- **时间线视图** - 实体演变追踪
- **实体属性扩展** - 自定义属性模板
- **Neo4j 图数据库** - 复杂图查询、最短路径、社区发现
- **导出功能** - SVG/PNG/Excel/CSV/PDF/JSON
### Phase 6: API 开放平台 ✅
- **API Key 管理** - 创建、撤销、权限控制
- **Swagger/OpenAPI 文档** - 在线 API 文档
- **限流控制** - 滑动窗口限流、调用统计
- **调用日志** - 详细调用记录和分析
## 技术栈
- **后端**: FastAPI + SQLite
- **前端**: 原生 HTML/JS + D3.js
- **ASR**: 阿里云听悟
- **LLM**: Kimi API
- **图数据库**: Neo4j
- **文档处理**: PyPDF2, python-docx
## 快速开始
### 本地开发
```bash
# 克隆仓库
git clone https://git.sivdead.cn/claw/insightflow
cd insightflow
# 安装依赖
cd backend
pip install -r requirements.txt
# 运行开发服务器
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000
```
### Docker 部署
```bash
# 构建镜像
docker build -t insightflow:latest .
# 运行容器
docker run -d \
-p 18000:8000 \
-v /opt/data:/app/data \
-e KIMI_API_KEY=your_key \
-e ALIYUN_ACCESS_KEY_ID=your_key \
-e ALIYUN_ACCESS_KEY_SECRET=your_secret \
-e INSIGHTFLOW_MASTER_KEY=your_master_key \
insightflow:latest
```
### Docker Compose 部署(推荐)
```bash
# 启动所有服务(含 Neo4j
docker-compose up -d
```
## API 认证
从 Phase 6 开始API 需要认证才能访问:
```bash
# 1. 创建 API Key需要 Master Key
curl -X POST http://localhost:18000/api/v1/api-keys \
-H "X-API-Key: your_master_key" \
-H "Content-Type: application/json" \
-d '{"name": "My App", "permissions": ["read", "write"]}'
# 2. 使用 API Key 访问受保护端点
curl http://localhost:18000/api/v1/projects \
-H "X-API-Key: ak_live_xxxxx"
```
## API 文档
- Swagger UI: http://122.51.127.111:18000/docs
- ReDoc: http://122.51.127.111:18000/redoc
## 部署信息
- **服务器**: 122.51.127.111:18000
- **Neo4j**: 122.51.127.111:7474 (HTTP), 122.51.127.111:7687 (Bolt)
- **Git 仓库**: https://git.sivdead.cn/claw/insightflow
## 开发状态
详见 [STATUS.md](STATUS.md)
## 项目文档
- [PRD v2.0](docs/PRD-v2.0.md) - 产品需求规格说明书
- [STATUS.md](STATUS.md) - 详细开发状态跟踪
## 许可证
MIT