promptkb

package
v0.0.0-...-fea90a2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyReplaceTextOutToKeyboardPrompts

func ApplyReplaceTextOutToKeyboardPrompts(keyboardPrompts []string, promptstr string) []string

func GetPromptKeyboardAI

func GetPromptKeyboardAI(msg string, promptstr string) []string

你要扮演一个json生成器,根据我下一句提交的QA内容,推断我可能会继续问的问题,生成json数组格式的结果,如:输入Q我好累啊A要休息一下吗,返回["嗯,我想要休息","我想喝杯咖啡","你平时怎么休息呢"],返回需要是["","",""]需要2-3个结果

func ReplaceTextIn

func ReplaceTextIn(text string, promptstr string) string

ReplaceTextIn 使用给定的替换对列表对文本进行替换

func ReplaceTextOut

func ReplaceTextOut(text string, promptstr string) string

ReplaceTextOut 使用给定的替换对列表对文本进行替换

Types

type ResponseDataPromptKeyboard

type ResponseDataPromptKeyboard struct {
	ConversationID string `json:"conversationId"`
	MessageID      string `json:"messageId"`
	Response       string `json:"response"` // 这里是嵌套的JSON字符串
}

ResponseDataPromptKeyboard 用于解析外层响应

Jump to

Keyboard shortcuts

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