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-chatluna-google-reverse-image-search

v0.1.6

Published

为 ChatLuna 提供 Google Reverse Image Search(Google Lens 以图搜图)工具,支持 Scrapingdog Google Lens API 与 Google Cloud Vision Detecting Web API

Readme

ChatLuna Google Reverse Image Search

npm License

为 ChatLuna 提供 Google Reverse Image Search(Google Lens 以图搜图)工具,支持 Scrapingdog Google Lens API 与 Google Cloud Vision Detecting Web API。

✨ 功能特性

1. 🔎 双服务提供商

  • Scrapingdog(默认):Google Lens API(Google Lens 爬虫)
  • Google:Google Cloud Vision Detecting Web API

2. 🧠 结构化结果输出

  • Scrapingdog:移除 related_searchespricein_stock 字段。
  • Google:只保留 pagesWithMatchingImages 的 URL 结果,webEntities 去除 entityId

3. ⚡ 缓存与一致性

  • 同 URL 缓存:查询结果缓存到数据库,支持 TTL 与清理间隔配置。
  • 失败不缓存:失败结果不写入缓存,避免污染后续请求。
  • 缩略图失效自动刷新:若检测到缓存中的存储缩略图失效,会重新请求并覆盖旧缓存结果。

4. 🖼️ 缩略图可读化

  • 支持将 Scrapingdog 返回的 Base64 缩略图写入 chatluna-storage-service,替换为可访问 URL,方便模型配合 read_files 读取。
  • 若转存失败,会直接删除该条目的 thumbnail 字段。

⚙️ 主要配置

  • tool.*:工具开关、名称、描述
  • provider:服务提供商,scrapingdoggoogle(默认 scrapingdog
  • apiKey:所选服务提供商 API Key
  • serverPath:Koishi 公网地址。用于将查询中 chatluna-storage-service 的内网 serverPath 替换成公网地址(若 chatluna-storage-service 已配置公网地址,请留空)
  • timeoutSeconds:请求超时(秒)
  • proxyMode:代理模式,支持沿用 ChatLuna 全局代理、禁用代理、使用自定义代理
  • proxyAddress:自定义代理地址,仅在 proxyMode=on 时生效
  • maxResults:最大返回结果数
  • customPrompt:附加到工具结果 note 的自定义提示词
  • cacheService.*:缓存开关、TTL、清理间隔、缩略图转存开关

✅ 使用前置条件

  • 必需:koishi-plugin-chatluna、数据库服务。
  • 可选:koishi-plugin-chatluna-storage-service(建议启用,用于 Scrapingdog 缩略图转存与读取)。
  • 若使用 Scrapingdog,请确保传入图像 URL 可被公网访问;内网地址(如 localhost127.0.0.1koishi、私网 IP)无法被 Scrapingdog 抓取。

🛡️ 使用声明

  • 本项目仅供学习、研究与合规开发使用。
  • 使用者应自行遵守目标平台与第三方服务(Google、Scrapingdog)的服务条款与法律法规。
  • 请勿将本插件用于任何违法、违规、侵犯版权或违反平台规则的行为,因不当使用产生的后果由使用者自行承担。

🤝 贡献

欢迎提交 Issue 或 Pull Request 来改进代码。