aireply

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Overview

Package aireply 人工智能回复

Index

Constants

View Source
const (
	// QYKURL api地址
	QYKURL = "http://api.qingyunke.com/api.php?key=free&appid=0&msg=%v"
	// QYKBotName ...
	QYKBotName = "菲菲"
)
View Source
const (
	// XiaoAiURL api地址
	XiaoAiURL = "http://81.70.100.130/api/xiaoai.php?n=text&msg=%v"
	// XiaoAiBotName ...
	XiaoAiBotName = "小爱"
)
View Source
const (
	// ChatGPTURL api地址
	ChatGPTURL = "https://api.openai.com/v1/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AIReply

type AIReply interface {
	// Talk 取得带 CQ 码的回复消息
	Talk(uid int64, msg, nickname string) string
	// Talk 取得文本回复消息
	TalkPlain(uid int64, msg, nickname string) string
	// String 获得实际使用的回复服务名
	fmt.Stringer
}

AIReply 公用智能回复类

type ChatGPT added in v1.7.0

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

ChatGPT GPT回复类

func NewChatGPT added in v1.7.0

func NewChatGPT(u, key string, banwords ...string) *ChatGPT

NewChatGPT ...

func (*ChatGPT) String added in v1.7.0

func (*ChatGPT) String() string

String ...

func (*ChatGPT) Talk added in v1.7.0

func (c *ChatGPT) Talk(_ int64, msg, _ string) string

Talk 取得带 CQ 码的回复消息

func (*ChatGPT) TalkPlain added in v1.7.0

func (c *ChatGPT) TalkPlain(_ int64, msg, nickname string) string

TalkPlain 取得回复消息

type QYK added in v1.7.0

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

QYK 青云客回复类

func NewQYK added in v1.7.0

func NewQYK(u, name string, banwords ...string) *QYK

NewQYK ...

func (*QYK) String added in v1.7.0

func (*QYK) String() string

String ...

func (*QYK) Talk added in v1.7.0

func (q *QYK) Talk(_ int64, msg, nickname string) string

Talk 取得带 CQ 码的回复消息

func (*QYK) TalkPlain added in v1.7.0

func (q *QYK) TalkPlain(_ int64, msg, nickname string) string

TalkPlain 取得回复消息

type XiaoAi added in v1.7.0

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

XiaoAi 小爱回复类

func NewXiaoAi added in v1.7.0

func NewXiaoAi(u, name string, banwords ...string) *XiaoAi

NewXiaoAi ...

func (*XiaoAi) String added in v1.7.0

func (*XiaoAi) String() string

String ...

func (*XiaoAi) Talk added in v1.7.0

func (x *XiaoAi) Talk(_ int64, msg, nickname string) string

Talk 取得带 CQ 码的回复消息

func (*XiaoAi) TalkPlain added in v1.7.0

func (x *XiaoAi) TalkPlain(_ int64, msg, nickname string) string

TalkPlain 取得回复消息

Jump to

Keyboard shortcuts

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