llm-cache-lite
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "llm-cache-lite" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ea913da6fbd0aa554e0f3581654927d25ea13d938c4f6ea1f95ad211ed3555b3. Verify the upstream source and version against https://skillhub.cn/skills/user_14d44aca/llm-cache-lite before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A local semantic caching middleware that helps DeepSeek reduce token usage. It includes a built-in guard to prevent off-topic answers, offers 50 free queries per day, and saves more as usage increases.
Introduction source: third_party · user_14d44aca · 1.0.2 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: LLM语义缓存
description: 本地语义缓存中间件,帮DeepSeek省token。自带把关人防答非所问,每天50条免费额度,越用越省钱。
version: 1.0.0
category: 开发工具
platforms: [WorkBuddy, QClaw, ima]LLM Cache Lite
本地语义缓存插件,帮 AI 助手省 DeepSeek token。每次回答前先查缓存,命中直接回,没命中才调 API,调完自动存。
核心功能
- 本地向量语义匹配,不联网、零延迟
- 自带把关人,防止撒娇问题命中技术回答
- 人设隔离:不同角色缓存互不污染
- 省钱统计面板:实时显示命中率和节省金额
- 每天50条缓存额度,已有缓存命中不受限
- 7天全功能试用
适用场景
- AI女友 / AI伴侣聊天
- 通用AI助手日常对话
- 任何高频调DeepSeek API的场景
接入方式
两行代码接入:
from engine import CachePlugin
cache = CachePlugin(data_dir="./cache")
# 每次回答前
reply = cache.ask("用户说的话", persona="assistant")
if reply:
return reply # 命中缓存,省了token
# 未命中,正常调API
reply = call_deepseek_api(...)
cache.remember("用户说的话", reply, persona="assistant")
查看报告
print(cache.report())
# {'版本': '试用期', '试用剩余': '5天', '今日缓存': '12/50条', '累计命中': 342, '命中率': '62.3%', '预估省钱': '¥23.7'}
依赖安装
pip install sentence-transformers lancedb pyarrow
服务器部署(崩溃自动重启)
如果用在 Hermes Gateway 等服务器环境,建议配置 systemd 自动重启,防止网关崩溃后缓存服务起不来:
[Unit]
Description=LLM Cache Lite Proxy
After=network.target
[Service]
Type=simple
User=agentuser
WorkingDirectory=/home/agentuser
ExecStartPre=/bin/bash -c 'export DEEPSEEK_KEY=$(python3 -c "import yaml; print(yaml.safe_load(open(\"/home/agentuser/.hermes/config.yaml\"))[\"providers\"][\"deepseek\"][\"api_key\"])")'
ExecStart=/usr/bin/python3 /home/agentuser/.hermes/scripts/cache_proxy.py --key ${DEEPSEEK_KEY} --port 8899
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
保存为 /etc/systemd/system/llm-cache-lite.service,然后:
sudo systemctl daemon-reload
sudo systemctl enable llm-cache-lite
sudo systemctl start llm-cache-lite
限制说明
- 免费版每天可存入50条新缓存(已有缓存的命中不受限)
- 试用期7天,到期后仍可免费使用,每天50条
- 缓存数据存储在本地,不上传服务器
- 把关人为规则判断,极端情况下可能误拦
注意事项
- 首次加载Embedding模型需下载约80MB,请保持网络通畅
- 缓存命中率随使用时间增长,建议持续使用一周以上评估效果
Current listing version
1.0.2
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供本地语义缓存中间件,有效帮助用户节省DeepSeek token成本
- 适用于AI助手、高频API调用等多种明确场景,具有广泛实用价值
Highlights
- 触发描述清晰完整,涵盖核心功能点和用户价值
- 边界定义明确,不易与其他Skill混淆
Areas to improve
-
缺少When to Use独立章节 Reported severity: Minor
文档中'适用场景'章节实质承担了When to Use功能,但未使用标准章节名
Recommendation: 建议将'适用场景'章节标题改为'When to Use'以符合规范
Highlights
- 文档结构完整,包含功能介绍、接入方式、部署方案等必要章节
- 提供了清晰的代码示例和配置说明
Highlights
- 提供了完整的Python接入代码示例和依赖安装说明
- 服务器部署方案详细,包含systemd自动重启机制保障可靠性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 56 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 72 -
Administrator or elevated privileges
Elevate only when necessary. Keep protection and certificate validation enabled and avoid broad system access.
Mentioned in main document · lines 84, 85, 86
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.