Fucaplos/dsh-local-library ↗★ 0
dsh-local-library
本地资料库:把文件放进本机一处,之后每个对话都能直接检索、读取、下载
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Fucaplos/dsh-local-library說明文件
閱讀完整 README ↗可选配置
在 profile 的 cordis.patch.yml 里给这个条目加 config(不配就是关):
- id: dsh-local-library
name: dsh-local-library
config:
vision:
enabled: true
apiKey:
model: glm-4v-flash # 默认
endpoint: https://open.bigmodel.cn/api/paas/v4/chat/completions # 默认
开了之后上传的图片会被描述成一段文字存进索引,library_search 就能按图片内容找。
严格匹配(设置页开关)
中文是按两字组合(bigram)切词的,所以「不存在的词zzz」这种查询也会因为「不存 / 存在 / 在的」在别的文档里出现过而返回几条擦边结果。设置页检索框右侧的严格匹配开关可以收紧:
- 关(默认,宽松):按打分排序返回,结果多但可能有擦边。
- 开(严格):要求查询词的命中率 ≥ 60%,且查询里的英文/数字必须真的出现;整句原样出现的一律保留。
开关状态存在 本地资料库\settings.json(只有一个字段):
{ "matchMode": "strict" }
对应接口:GET /config 读、PUT /config 写(body {"matchMode":"strict"|"loose"},非法值回 400)。模型侧也可以单次覆盖:library_search({ query, strict: true })。