ACGImageClassify

package module
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2021 License: GPL-3.0 Imports: 10 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Zerobot-ACGImage-Classify

Zerobot-ACGImage插件的AI评分接口,也可单独引用。

接口说明

func Flush()

手动刷新图片缓存及访问时间戳。

func CanVisit(delay int64) bool

距上次返回true时间间隔大于delay秒则返回true并刷新时间戳,用以避免频繁访问。Classify函数并不会做验证,因此请务必在调用Classify前手动验证,以避免由于缓存时间戳不正确导致的无法加载图片。

请确保delay至少大于1,否则可能导致无法加载图片。

func Classify(ctx *zero.Ctx, targeturl string, noimg bool)

用AI对targeturl指向的图片打分。

  • 如果noimg==true,将用打分回复ctx.Event.MessageID指示的消息。
  • 如果noimg==false,将发送该图片并针对该图片回复打分。

打分等级

普通图

  • [0]这啥啊
  • [1]普通欸
  • [2]有点可爱
  • [3]不错哦
  • [4]很棒
  • [5]我好啦!

r18

由于模型并不精确,目前有较大可能误判,请勿将其作为鉴黄模型使用,仅供娱乐。

  • [6]影响不好啦!
  • [7]太涩啦,🐛了!
  • [8]已经🐛不动啦...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanVisit

func CanVisit(delay int64) bool

func Classify

func Classify(ctx *zero.Ctx, targeturl string, noimg bool)

func Flush

func Flush()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址