chatgpt-on-wechat icon indicating copy to clipboard operation
chatgpt-on-wechat copied to clipboard

More accurate checking keywords

Open Zhaoyi-Yan opened this issue 2 years ago • 4 comments

In this improvement, we use regular expressions to split the text, allowing for more accurate checking for the presence of keywords in content

Zhaoyi-Yan avatar Apr 20 '23 04:04 Zhaoyi-Yan

想法很好,但是代码里的错误太多了,建议自测一下是否达到了想要的效果

lanvent avatar Apr 20 '23 05:04 lanvent

图片 图片

  1. 关键字支持句中匹配
  2. 分句逐个匹配,并输出所有匹配到的关键字词

Zhaoyi-Yan avatar Apr 26 '23 03:04 Zhaoyi-Yan

config: 3

Zhaoyi-Yan avatar Apr 26 '23 03:04 Zhaoyi-Yan

需要匹配多个关键词吗,总觉得使用场景不多,比如 关键词a 和 关键词b 是都会回复同一篇内容c,这样是不是就重复了呢。 关键词插件其实如果要搞完善一点,我有一些想法是:

  1. 每个内容可以设置多个关键词触发,类似sd插件里的一条规则,
  2. 每条规则可以设置是否使用正则,加入 regex= true,插件里会把这条规则的keyword用正则来匹配。
  3. 用户能够在配置项里开启一条消息匹配一次还是多次。

这些会让关键词插件更加完善,适用不同的场景。 因为本人最近较忙,没有时间来实现这些想法,关键词插件先保持最简单的样子吧。

lanvent avatar Apr 26 '23 15:04 lanvent

关键词的匹配是否可以使用embedding的方式呢,在使用中,有一些确定的信息(如客服回答产品规格、价格等信息),希望能准确的给用户回复

andyzlys avatar May 16 '23 09:05 andyzlys

关键词匹配如果能回复本地或者url指向的图片就好了。

befantasy avatar Jul 05 '23 08:07 befantasy