npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

koishi-plugin-isthattrue

v0.2.6

Published

事实核查插件 - 使用多Agent LLM验证消息真实性

Downloads

140

Readme

koishi-plugin-chatluna-fact-check

npm

事实核查插件,提供两个核心工具:

  • fact_check:快速搜索聚合(默认)
  • deep_search:迭代式深度搜索(可选)

安装

npm install koishi-plugin-chatluna-fact-check

最小配置

chatluna-fact-check:
  api:
    apiKeys:
      - [ollama, '', 'https://ollama.com/api/web_search', true]
  factCheck:
    enableChatlunaSearch: false
    chatlunaSearchModel: ''
    chatlunaSearchDiversifyModel: ''
    timeout: 60000
    maxRetries: 2
    proxyMode: follow-global
    proxyAddress: ''
    logLLMDetails: false
  agent:
    enable: true
    enableQuickTool: true
    quickToolName: fact_check
    grokModel: x-ai/grok-4-1
  deepSearch:
    enable: false

API Key / Base URL 对照表

推荐优先在 api.apiKeys 表格中集中填写(来源 / key / base url / 启用开关)。

| key | base url | 说明 | |---|---|---| | api.apiKeysprovider=ollamaapiKey | api.apiKeysprovider=ollamabaseUrl | 统一填写 Ollama 凭据(唯一入口);key 留空再回退 OLLAMA_API_KEY | | N/AfactCheck.enableChatlunaSearch) | N/A | 依赖 chatluna-search-service 内部配置,不在本插件配置 API key |

FactCheck 配置

factCheck 负责核查流程的运行参数:

  • Chatluna 搜索模型:factCheck.chatlunaSearchModel
  • 搜索关键词多样化:factCheck.chatlunaSearchDiversifyModel
  • 搜索集成开关:factCheck.enableChatlunaSearch
  • 超时与重试:factCheck.timeout / factCheck.maxRetries
  • 代理与调试:factCheck.proxyMode / factCheck.proxyAddress / factCheck.logLLMDetails

Gemini 搜索模型要求

factCheck.chatlunaSearchModel(及 agent.geminiModel)填写 Gemini 模型时,必须满足以下条件,否则会报 Cannot read properties of undefined (reading 'model') 错误:

  1. 使用 Gemini 适配器koishi-plugin-chatluna-gemini-adapter),不可使用 OpenAI 兼容中转。
  2. Gemini 适配器内仅开启以下两项联网工具,其余工具(如代码执行等)关闭:
    • Google Search(网络搜索)
    • URL context(URL 内容读取)

原因:chatluna-search-serviceweb_search 工具在 summaryTypebalanced 时需要向 LLM 发送 configurable,若适配器或工具配置不兼容,configurable 解析的 model 字段会为 undefined 导致崩溃。Gemini 原生适配器 + 仅开启搜索类工具可规避此问题。

搜索源上下文注入

1) fact_check 追加上下文(仅附加参考,不改变最终判定)

  • Chatluna Search:agent.appendChatlunaSearchContext + agent.chatlunaSearchContext*
  • Ollama Search:agent.appendOllamaSearchContext + agent.ollamaSearchContext*

触发条件与失败行为:

  • 开关为 true 且依赖可用才会执行
  • 超时或调用失败会“跳过该上下文”,不会中断 fact_check

2) deep_search 迭代来源

  • deepSearch.useChatlunaSearchTool:调用 web_search
  • api.apiKeys 中启用 ollama 行:允许 DeepSearch 调用 Ollama Search

失败行为:

  • 工具调用失败时回退到模型搜索
  • 若来源整体不可用,最终报告会降置信度并提示来源不足

DeepSearch(可选)

推荐配置:

chatluna-fact-check:
  deepSearch:
    enable: true
    controllerModel: google/gemini-3-flash
    maxIterations: 3
    perIterationTimeout: 30000
    useChatlunaSearchTool: true

调试与排障

  • factCheck.proxyMode:排障建议先设为 direct
  • factCheck.logLLMDetails:仅排障时打开

License

MIT