process

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRequestTimes added in v1.0.10

func CheckRequestTimes(rmsg *dingbot.ReceiveMsg) bool

CheckRequestTimes 分析处理请求逻辑 主要提供单日请求限额的功能

func Do

func Do(mode string, rmsg *dingbot.ReceiveMsg) error

执行处理请求

func DomainCertMsg added in v1.0.10

func DomainCertMsg(rmsg *dingbot.ReceiveMsg) error

证书信息

func DomainMsg added in v1.0.10

func DomainMsg(rmsg *dingbot.ReceiveMsg) error

域名信息

func FormatMarkdown added in v1.0.18

func FormatMarkdown(md string) string

FormatMarkdown 格式化Markdown 主要修复ChatGPT返回多行代码块,钉钉会将代码块中的#当作Markdown语法里的标题来处理,进行转义;如果Markdown格式内存在html,将Markdown中的html标签转义 代码块缩进问题暂无法解决,因不管是四个空格,还是Tab,在钉钉上均会顶格显示,建议复制代码后用IDE进行代码格式化,针对缩进严格的语言,例如Python,不确定的建议手机端查看下代码块的缩进

func FormatTimeDuation added in v1.0.18

func FormatTimeDuation(duration time.Duration) string

FormatTimeDuation 格式化时间 主要提示单聊/群聊切换时多久后恢复默认聊天模式

func GeneratePrompt added in v0.1.11

func GeneratePrompt(msg string) (rst string, err error)

GeneratePrompt 生成当次请求的 Prompt

func ImageGenerate added in v1.0.4

func ImageGenerate(ctx context.Context, rmsg *dingbot.ReceiveMsg) error

ImageGenerate openai生成图片

func ProcessRequest

func ProcessRequest(rmsg *dingbot.ReceiveMsg) error

ProcessRequest 分析处理请求逻辑

func SelectHistory added in v1.0.7

func SelectHistory(rmsg *dingbot.ReceiveMsg) error

SelectHistory 查询会话历史

Types

This section is empty.

Jump to

Keyboard shortcuts

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