Documentation
¶
Index ¶
- Variables
- type App
- func (a *App) FlushRuntimeState() error
- func (a *App) FlushRuntimeStateIfDirty() error
- func (a *App) LoadRuntimeState(path string) error
- func (a *App) Run(ctx context.Context) error
- func (a *App) SetAutomationRunner(runner AutomationRunner)
- func (a *App) SetPromptLoader(loader *prompting.Loader)
- func (a *App) UpdateRuntimeConfig(cfg config.Config)
- type Attachment
- type AttachmentDownloader
- type AutomationRunner
- type ChatMemberNameResolver
- type Job
- type JobProcessState
- type LarkSender
- func (s *LarkSender) AddReaction(ctx context.Context, messageID, emojiType string) error
- func (s *LarkSender) DownloadAttachment(ctx context.Context, resourceScopeKey, sourceMessageID string, ...) error
- func (s *LarkSender) GetMessageText(ctx context.Context, messageID string) (string, error)
- func (s *LarkSender) ReplyCard(ctx context.Context, sourceMessageID, cardContent string) (string, error)
- func (s *LarkSender) ReplyCardDirect(ctx context.Context, sourceMessageID, cardContent string) (string, error)
- func (s *LarkSender) ReplyFile(ctx context.Context, sourceMessageID, fileKey string) (string, error)
- func (s *LarkSender) ReplyImage(ctx context.Context, sourceMessageID, imageKey string) (string, error)
- func (s *LarkSender) ReplyRichText(ctx context.Context, sourceMessageID string, lines []string) (string, error)
- func (s *LarkSender) ReplyRichTextMarkdown(ctx context.Context, sourceMessageID, markdown string) (string, error)
- func (s *LarkSender) ReplyRichTextMarkdownDirect(ctx context.Context, sourceMessageID, markdown string) (string, error)
- func (s *LarkSender) ReplyText(ctx context.Context, sourceMessageID, text string) (string, error)
- func (s *LarkSender) ReplyTextDirect(ctx context.Context, sourceMessageID, text string) (string, error)
- func (s *LarkSender) ResolveChatMemberName(ctx context.Context, chatID, openID, userID string) (string, error)
- func (s *LarkSender) ResolveUserName(ctx context.Context, openID, userID string) (string, error)
- func (s *LarkSender) ResourceRootForScope(resourceScopeKey string) string
- func (s *LarkSender) SendCard(ctx context.Context, receiveIDType, receiveID, cardContent string) error
- func (s *LarkSender) SendFile(ctx context.Context, receiveIDType, receiveID, fileKey string) error
- func (s *LarkSender) SendImage(ctx context.Context, receiveIDType, receiveID, imageKey string) error
- func (s *LarkSender) SendText(ctx context.Context, receiveIDType, receiveID, text string) error
- func (s *LarkSender) UploadFile(ctx context.Context, localPath, fileName string) (string, error)
- func (s *LarkSender) UploadImage(ctx context.Context, localPath string) (string, error)
- type MentionedUser
- type Processor
- func (p *Processor) FlushSessionState() error
- func (p *Processor) FlushSessionStateIfDirty() error
- func (p *Processor) LoadSessionState(path string) error
- func (p *Processor) ProcessJob(ctx context.Context, job Job) bool
- func (p *Processor) ProcessJobState(ctx context.Context, job Job) JobProcessState
- func (p *Processor) SetBuiltinHelpConfig(cfg config.Config)
- func (p *Processor) SetImmediateFeedback(mode, emojiType string)
- func (p *Processor) SetLLMBackend(backend llm.Backend)
- func (p *Processor) SetPromptLoader(loader *prompting.Loader)
- func (p *Processor) SetReplyMessages(failureMessage, thinkingMessage string)
- func (p *Processor) SetRuntimeAPI(baseURL, token, runtimeBin string)
- type ReplyContextProvider
- type Sender
- type UserNameResolver
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIgnoreMessage = errors.New("ignore message")
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) FlushRuntimeState ¶
func (*App) FlushRuntimeStateIfDirty ¶
func (*App) LoadRuntimeState ¶
func (*App) SetAutomationRunner ¶
func (a *App) SetAutomationRunner(runner AutomationRunner)
func (*App) SetPromptLoader ¶
func (*App) UpdateRuntimeConfig ¶
type Attachment ¶
type AttachmentDownloader ¶
type AttachmentDownloader interface {
DownloadAttachment(ctx context.Context, resourceScopeKey, sourceMessageID string, attachment *Attachment) error
}
type AutomationRunner ¶
type ChatMemberNameResolver ¶
type Job ¶
type Job struct {
ReceiveID string
ReceiveIDType string
ChatType string
BotOpenID string
BotUserID string
SenderName string
SenderOpenID string
SenderUserID string
SenderUnionID string
MentionedUsers []MentionedUser
SourceMessageID string
ReplyParentMessageID string
ThreadID string
RootID string
MessageType string
Text string
Attachments []Attachment
RawContent string
EventID string
ReceivedAt time.Time
ResourceScopeKey string
SessionKey string
SessionVersion uint64
Scene string
ResponseMode string
CreateFeishuThread bool
LLMModel string
LLMProfile string
LLMReasoningEffort string
LLMPersonality string
NoReplyToken string
DisableAck bool
WorkflowPhase string
}
type JobProcessState ¶
type JobProcessState string
const ( JobProcessCompleted JobProcessState = "completed" JobProcessRetryAfterRestart JobProcessState = "retry_after_restart" )
type LarkSender ¶
type LarkSender struct {
// contains filtered or unexported fields
}
func NewLarkSender ¶
func NewLarkSender(client *lark.Client, resourceDir string) *LarkSender
func (*LarkSender) AddReaction ¶
func (s *LarkSender) AddReaction(ctx context.Context, messageID, emojiType string) error
func (*LarkSender) DownloadAttachment ¶
func (s *LarkSender) DownloadAttachment(ctx context.Context, resourceScopeKey, sourceMessageID string, attachment *Attachment) error
func (*LarkSender) GetMessageText ¶
func (*LarkSender) ReplyCardDirect ¶ added in v0.3.13
func (*LarkSender) ReplyImage ¶
func (*LarkSender) ReplyRichText ¶
func (*LarkSender) ReplyRichTextMarkdown ¶
func (*LarkSender) ReplyRichTextMarkdownDirect ¶ added in v0.3.13
func (*LarkSender) ReplyTextDirect ¶ added in v0.3.13
func (*LarkSender) ResolveChatMemberName ¶
func (*LarkSender) ResolveUserName ¶
func (*LarkSender) ResourceRootForScope ¶
func (s *LarkSender) ResourceRootForScope(resourceScopeKey string) string
func (*LarkSender) SendCard ¶
func (s *LarkSender) SendCard(ctx context.Context, receiveIDType, receiveID, cardContent string) error
func (*LarkSender) SendFile ¶
func (s *LarkSender) SendFile(ctx context.Context, receiveIDType, receiveID, fileKey string) error
func (*LarkSender) SendImage ¶
func (s *LarkSender) SendImage(ctx context.Context, receiveIDType, receiveID, imageKey string) error
func (*LarkSender) SendText ¶
func (s *LarkSender) SendText(ctx context.Context, receiveIDType, receiveID, text string) error
func (*LarkSender) UploadFile ¶
func (*LarkSender) UploadImage ¶
type MentionedUser ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func NewProcessor ¶
func (*Processor) FlushSessionState ¶
func (*Processor) FlushSessionStateIfDirty ¶
func (*Processor) LoadSessionState ¶
func (*Processor) ProcessJobState ¶
func (p *Processor) ProcessJobState(ctx context.Context, job Job) JobProcessState
func (*Processor) SetBuiltinHelpConfig ¶ added in v0.3.12
func (*Processor) SetImmediateFeedback ¶
func (*Processor) SetLLMBackend ¶
func (*Processor) SetPromptLoader ¶
func (*Processor) SetReplyMessages ¶
func (*Processor) SetRuntimeAPI ¶
type ReplyContextProvider ¶
type Sender ¶
type Sender interface {
SendText(ctx context.Context, receiveIDType, receiveID, text string) error
SendCard(ctx context.Context, receiveIDType, receiveID, cardContent string) error
AddReaction(ctx context.Context, messageID, emojiType string) error
ReplyText(ctx context.Context, sourceMessageID, text string) (string, error)
ReplyTextDirect(ctx context.Context, sourceMessageID, text string) (string, error)
ReplyRichText(ctx context.Context, sourceMessageID string, lines []string) (string, error)
ReplyRichTextMarkdown(ctx context.Context, sourceMessageID, markdown string) (string, error)
ReplyRichTextMarkdownDirect(ctx context.Context, sourceMessageID, markdown string) (string, error)
ReplyCard(ctx context.Context, sourceMessageID, cardContent string) (string, error)
ReplyCardDirect(ctx context.Context, sourceMessageID, cardContent string) (string, error)
}
Source Files
¶
- app.go
- app_automation.go
- app_queue.go
- app_state.go
- card.go
- group_scenes.go
- message.go
- message_identity.go
- message_mentions.go
- message_post.go
- outgoing_mentions.go
- processor.go
- processor_builtin_command.go
- processor_context.go
- processor_user_names.go
- prompt_templates.go
- reply_dispatcher.go
- runtime_store.go
- sender.go
- sender_content.go
- sender_media.go
- sender_user_name.go
- session_state.go
- types.go
Click to show internal directories.
Click to hide internal directories.