achan

package
v0.0.0-...-a0ccaba Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AchanID = "achan"

ID

Variables

This section is empty.

Functions

This section is empty.

Types

type AI

type AI interface {
	// 聊天,返回AI的回答文本
	Chat() (string, error)
	// 聊天,text为对话文本,id为聊天的ID,返回AI的回答文本
	ChatWith(text string, id string) (string, error)
}

AI接口

type AchanBot

type AchanBot struct {
	// contains filtered or unexported fields
}

聊天机器人

func (*AchanBot) Init

func (b *AchanBot) Init()

func (*AchanBot) MiraiGoModule

func (a *AchanBot) MiraiGoModule() bot.ModuleInfo

func (*AchanBot) PostInit

func (b *AchanBot) PostInit()

func (*AchanBot) Serve

func (b *AchanBot) Serve(bot *bot.Bot)

func (*AchanBot) Start

func (b *AchanBot) Start(bot *bot.Bot)

func (*AchanBot) Stop

func (b *AchanBot) Stop(bot *bot.Bot, wg *sync.WaitGroup)

type Config

type Config struct {
	Tian     tian.Tian         `json:"tian"`     // 天行机器人的配置
	Ownthink ownthink.Ownthink `json:"ownthink"` // 思知机器人的配置
	Replace  map[string]string `json:"replace"`  // 词语替换
	Replace2 map[string]string `json:"replace2"` // 词语替换第二层
}

配置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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