Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext struct { LogFilePath string `yaml:"logFilePath"` MaxFetchRecord int `yaml:"maxFetchRecord"` MaxUserRecord int `yaml:"maxUserRecord"` OpenaiApiKey string `yaml:"openaiApiKey"` ApplicationId string `yaml:"applicationId"` BotName string `yaml:"botName"` BotToken string `yaml:"botToken"` ClearCmd string `yaml:"clearCmd"` ClearCmdDesc string `yaml:"clearCmdDesc"` ClearDelimiter string `yaml:"clearDelimiter"` ChatModel string `yaml:"chatModel"` ChatTemperature float32 `yaml:"chatTemperature"` Character string `yaml:"character"` FreeChatLimit int `yaml:"creeChatLimit"` ConversationSupport bool `yaml:"conversationSupport"` ChannelConfig []ChatChannel `yaml:"channelConfig"` BotId string ConfigFilePath string }
type ChatChannel ¶
type ChatChannel struct { ChannelId string `yaml:"channelId"` ChatModel string `yaml:"chatModel,omitempty"` ChatTemperature float32 `yaml:"chatTemperature,omitempty"` Character string `yaml:"character,omitempty"` FreeChatLimit int `yaml:"freeChatLimit,omitempty"` ConversationSupport bool `yaml:"conversationSupport,omitempty"` }
type ChatMessage ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
func (*Stack) GetBottomElement ¶
GetBottomElement returns the bottom element of the stack
type UserSession ¶
type UserSession struct { UserChannelID string //UserSession's unique key UserId string ChannelID string UserName string ClearDelimiter string Prompt string OnConversation bool //Whether to enable context OnAt bool //Whether to reply to the robot only when AT ChatCount int //Number of messages sent by the user }
UserSession Each user holds a session in each channel to save its state
Click to show internal directories.
Click to hide internal directories.