返回目录
模型与 MCP 插件

dsh-WrenAI

vicfei/dsh-WrenAI

A self-hosted semantic layer for DeepSeek Harness — natural-language data questions with metric calibers riding on every result; single-SELECT guard, self-heal SQL. Implements the differentiated core of WrenAI. Not affiliated.

Stars
0
Forks
0
Issues
0
更新
6 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:vicfei/dsh-WrenAI

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-WrenAI — a self-hosted semantic layer for DeepSeek Harness

Ask data questions in natural language; get numbers with their metric calibers attached. The semantic model (dimensions/measures/metrics + 口径) rides between the question and the SQL — that's the line between governed analytics and raw text-to-SQL. 自然语言问数,数字带着指标口径一起回来。语义模型(维度/度量/指标+口径) 站在问题与 SQL 之间——这就是受治理的数据问数与裸 text-to-SQL 的分界线。

DeepSeek Harness License: MIT WrenAI multi

Implements the differentiated core of WrenAI (18.3k★ — GenBI / governed text-to-SQL) natively for DSH: the self-hosted semantic layer. Clean-room, zero upstream code. Not affiliated. Family: the 12-repo quant stack — dsh-TradingAgents · dsh-OpenBB · dsh-CCXT · dsh-quantstats · dsh-freqtrade …

Why (NL2SQL plugins exist — what's missing is the semantic layer)

raw NL2SQL plugins dsh-WrenAI
Model sees table schemas semantic catalog — metrics with calibers, dimensions with business meaning
Trust hope 口径随行: every result cites the metric definitions it used
SQL safety varies single-SELECT guard + self-heal retry, deterministic execution (SQLite stdlib)
Self-hosted — fully local (semantic/models.yaml + SQLite), no cloud service

Quick start

git clone https://github.com/vicfei/dsh-WrenAI && cd dsh-wrenai
python3 scripts/ask.py --init <klines.json>          # load data + build semantic views
python3 scripts/ask.py --ask "average close and annualized volatility over the last 30 days?"
python3 scripts/ask.py --ask "最近30天的平均收盘价和年化波动率是多少?" --lang zh   # zh fallback

Output is English-first (engine, calibers, docs); --lang zh switches the user-facing labels to Chinese.

Real smoke (binance BTC/USDT 365d, 2026-11-17): avg close 75,870 · vol 36.7% — with the vol metric's caliber formula (sqrt(252×mean(ret²)), 30d rolling, non-centered simplification stated) attached to the answer. The first generated SQL had a syntax error; the engine self-healed on the error feedback.

Status & roadmap

v0 semantic engine smoke-tested on live data. ROADMAP: M1 joins + metric versioning + caliber drift alarms; M2 MDL-style model files + multi-DB.

License & disclaimer

MIT; concept credit to WrenAI (multi-licensed upstream, core Apache-2.0) — zero upstream code used. Not investment advice.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。