enums

package
v0.0.0-...-3a70735 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChatCache = make(map[string]*Conversation, 1)
View Source
var EventHandlerID uint32 = 0
View Source
var LLM = make(map[string]string)
View Source
var Once sync.Once

Functions

func AddMessage

func AddMessage(jid types.JID, role string, content string)

func GetAllKeyString

func GetAllKeyString(mapTarget map[string]string) []string

func GetValueString

func GetValueString(target string, mapTarget map[string]string) string

func LoadConfig

func LoadConfig() error

Types

type BotInformation

type BotInformation struct {
	NumberJid    *types.JID
	NumberString string `json:"bot_number"`
	DBPath       string `json:"db_path"`
}
var BotInfo BotInformation

type Conversation

type Conversation struct {
	Messages []Message `json:"messages"`
}

type MType

type MType int
const (
	Text MType = iota
	Image
	Audio
	Video
	Document
	Location
	Contact
	Sticker
)

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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