process

package
v0.0.0-...-d978967 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRequestTimes

func CheckRequestTimes(rmsg *dingbot.ReceiveMsg) bool

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

func Do

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

执行处理请求

func DomainCertMsg

func DomainCertMsg(rmsg *dingbot.ReceiveMsg) error

证书信息

func DomainMsg

func DomainMsg(rmsg *dingbot.ReceiveMsg) error

域名信息

func FormatMarkdown

func FormatMarkdown(md string) string

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

func FormatTimeDuation

func FormatTimeDuation(duration time.Duration) string

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

func GeneratePrompt

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

GeneratePrompt 生成当次请求的 Prompt

func ImageGenerate

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

ImageGenerate openai生成图片

func ProcessRequest

func ProcessRequest(rmsg *dingbot.ReceiveMsg) error

ProcessRequest 分析处理请求逻辑

func SingleQa

func SingleQa(question string, user string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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