feat: 完成 issue #44 ④ 本地 70B 模型接入与推理封装

This commit is contained in:
2026-08-05 01:56:59 +08:00
parent f5d2294ee4
commit 169492a6db
4 changed files with 273 additions and 0 deletions
+5
View File
@@ -17,6 +17,8 @@
分解,配套评测报告脚本 evaluate_hallucination.py)。
- gateway 混合网关主编排(EPIC #6 主体):路由 → 生成 → 溯源校验 →
DLP 出站防线,端到端闭环。
- backends 本地 70B 推理后端实现(Issue #44 完成交付):OpenAI 兼容
vLLM/TGI 接入、参数化、dry-run 兼容,数据不出厂。
测试:`python -m unittest discover -s tests -v`(在 core/llm-gateway 目录下执行)。
"""
@@ -53,6 +55,7 @@ from .gateway import (
LLMGateway,
LocalBackend,
)
from .backends import Local70BBackend
__all__ = [
# dlp
@@ -65,5 +68,7 @@ __all__ = [
"GuardVerdict", "HallucinationGuard",
# gateway
"InferenceBackend", "LocalBackend", "CloudBackend",
# backends
"Local70BBackend",
"GatewayResult", "LLMGateway",
]