duan-blocks
段言积木组合平台——把「用户自然语言需求」映射为「预置积木的组合装配」,零 token、全离线。
✅ 已发布到 PyPI:
pip install duan-blocks— https://pypi.org/project/duan-blocks/
演示
- 🎬 概念演示视频(10s,1080P):
demo_video/Cinematic_product_launch_video_2026-08-10T13-02-22.mp4(仓库demo_video/目录) - 🖥️ 本地交互演示页:安装后
uvicorn duan_blocks.api:app --port 8123→ 打开http://localhost:8123/(输入需求实时看积木组合与运行结果)
# 命令行
duan-combo "对一批数字求和再算平均" --输入 "[1,2,3,4,5]"
duan-combo "把这段中文转成拼音" --输入 '"你好"' --json # 结构化诊断
# Web/API(需 fastapi uvicorn)
uvicorn duan_blocks.api:app --port 8123
# GET / 演示页(输入需求实时看组合)
# POST /combo {"requirement":"半径5的圆有多大","input":"5"}
- 零 token 常态:选块/校验/接线/粘合全本地(概念图 + TF-IDF 混合选块,不调 LLM)。
- 兜底沉淀:仅能力缺失时经 LLM(或本地规则)生成新积木并永久入库存,下次零 token 复用。
- 运行依赖:段言运行时(
pip install duan);拼音/繁简/历法等可选pip install duan-blocks[zh](pypinyin / opencc / lunardate)。 - 定位:
DUAN_BLOCKS_LIB环境变量 → 包内数据(wheel 自带_data/积木库)→ 仓库内。 - 构建发布:先
python blocks_pkg/打包数据.py复制积木库数据,再python -m build blocks_pkg产出 sdist+wheel。
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
duan_blocks-1.0.1.tar.gz
(238.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
duan_blocks-1.0.1-py3-none-any.whl
(338.8 kB
view details)
File details
Details for the file duan_blocks-1.0.1.tar.gz.
File metadata
- Download URL: duan_blocks-1.0.1.tar.gz
- Upload date:
- Size: 238.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ed1dadc78054150f9a0eb64d9538f525bc733179b3b457bb01dd2cb7a5e463b
|
|
| MD5 |
bbda9fb2ac00f8ec424fb882ceaeae1c
|
|
| BLAKE2b-256 |
abe1bee24919f921da0b79d31866173ea9998b68075c8d9101cf2bc2607becde
|
File details
Details for the file duan_blocks-1.0.1-py3-none-any.whl.
File metadata
- Download URL: duan_blocks-1.0.1-py3-none-any.whl
- Upload date:
- Size: 338.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a1b8967b526c7d71e55ad02e37f571b61a80c75453ed417b1b6c54807f62acf
|
|
| MD5 |
05d994c8ab45cb6a00df7d2dab6f4516
|
|
| BLAKE2b-256 |
a84afd54a3b891fe5d962f142d639ce27a5a82e2464626bd2b5210a73dace33d
|