Documentation
¶
Index ¶
- Constants
- Variables
- type Action
- type ActionInfo
- func (a *ActionInfo) PatchCard(ctx context.Context, msgId *string, cardContent string) error
- func (a *ActionInfo) SendAIModeListsCard(ctx context.Context, sessionId *string, msgId *string, aiModeStrs []string)
- func (a *ActionInfo) SendRoleListCard(ctx context.Context, sessionId *string, msgId *string, roleTag string, ...)
- func (a *ActionInfo) SendRoleTagsCard(ctx context.Context, sessionId *string, msgId *string, roleTags []string)
- func (a *ActionInfo) UpdateImageCard(ctx context.Context, base64Str string, msgId *string, sessionId *string, ...) error
- func (a *ActionInfo) UpdateTextCard(ctx context.Context, msg string, msgId *string, ifNewTopic bool) error
- type CardChatType
- type CardKind
- type CardMsg
- type Config
- type FileAction
- type HandlerType
- type HelpAction
- type MenuOption
- type MessageAction
- type MessageHandler
- type MessageHandlerInterface
- type MsgInfo
- type PreAction
- type Server
Constants ¶
View Source
const ( GroupHandler = "group" UserHandler = "personal" )
Variables ¶
View Source
var ( ClearCardKind = CardKind("clear") // 清空上下文 PicModeChangeKind = CardKind("pic_mode_change") // 切换图片创作模式 VisionModeChangeKind = CardKind("vision_mode") // 切换图片解析模式 PicResolutionKind = CardKind("pic_resolution") // 图片分辨率调整 PicStyleKind = CardKind("pic_style") // 图片风格调整 VisionStyleKind = CardKind("vision_style") // 图片推理级别调整 PicTextMoreKind = CardKind("pic_text_more") // 重新根据文本生成图片 PicVarMoreKind = CardKind("pic_var_more") // 变量图片 RoleTagsChooseKind = CardKind("role_tags_choose") // 内置角色所属标签选择 RoleChooseKind = CardKind("role_choose") // 内置角色选择 AIModeChooseKind = CardKind("ai_mode_choose") // AI模式选择 )
View Source
var ( GroupChatType = CardChatType("group") UserChatType = CardChatType("personal") )
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface {
Execute(a *ActionInfo) bool
}
type ActionInfo ¶
type ActionInfo struct {
// contains filtered or unexported fields
}
func (*ActionInfo) SendAIModeListsCard ¶
func (*ActionInfo) SendRoleListCard ¶
func (*ActionInfo) SendRoleTagsCard ¶
func (*ActionInfo) UpdateImageCard ¶
func (*ActionInfo) UpdateTextCard ¶
type CardChatType ¶
type CardChatType string
type CardMsg ¶
type CardMsg struct { Kind CardKind ChatType CardChatType Value interface{} SessionId string MsgId string }
type Config ¶
type Config struct { FeishuAppId string `mapstructure:"FEISHU_APP_ID"` FeishuAppSecret string `mapstructure:"FEISHU_APP_SECRET"` FeishuEncryptKey string `mapstructure:"FEISHU_ENCRYPT_KEY"` FeishuVerificationToken string `mapstructure:"FEISHU_VERIFICATION_TOKEN"` OpenaiApiKey string `mapstructure:"OPENAI_KEY"` OpenaiModel string `mapstructure:"OPENAI_MODEL"` OpenaiMaxTokens int `mapstructure:"OPENAI_MAX_TOKENS"` OpenaiApiUrl string `mapstructure:"OPENAI_API_URL"` }
type FileAction ¶
type FileAction struct { }
func (*FileAction) Execute ¶
func (*FileAction) Execute(a *ActionInfo) bool
type HandlerType ¶
type HandlerType string
type HelpAction ¶
type HelpAction struct { }
func (*HelpAction) Execute ¶
func (*HelpAction) Execute(a *ActionInfo) bool
type MenuOption ¶
type MenuOption struct {
// contains filtered or unexported fields
}
type MessageAction ¶
type MessageAction struct { }
func (*MessageAction) Execute ¶
func (*MessageAction) Execute(a *ActionInfo) bool
type MessageHandler ¶
type MessageHandler struct {
// contains filtered or unexported fields
}
func (MessageHandler) MsgReceivedHandler ¶
func (m MessageHandler) MsgReceivedHandler(ctx context.Context, event *larkim.P2MessageReceiveV1) error
type MessageHandlerInterface ¶
type MessageHandlerInterface interface {
MsgReceivedHandler(ctx context.Context, event *larkim.P2MessageReceiveV1) error
}
func NewMessageHandler ¶
Click to show internal directories.
Click to hide internal directories.