Documentation ¶
Index ¶
- Constants
- func AvailableTools() []llms.Tool
- func Behavior(uid types.Uid, flag string, number int)
- func Bootstrap() error
- func Cron() ([]*cron.Ruleset, error)
- func FormMsg(ctx types.Context, id string) types.MsgPayload
- func Help(rules []interface{}) (map[string][]string, error)
- func Init(jsonconf json.RawMessage) error
- func InstructMsg(ctx types.Context, id string, data types.KV) types.MsgPayload
- func List() map[string]Handler
- func PageURL(ctx types.Context, pageRuleId string, param types.KV, ...) (string, error)
- func Register(name string, bot Handler)
- func RunCollect(collectRules []collect.Rule, ctx types.Context, content types.KV) (types.MsgPayload, error)
- func RunCommand(commandRules []command.Rule, ctx types.Context, content interface{}) (types.MsgPayload, error)
- func RunCron(cronRules []cron.Rule, name string) (*cron.Ruleset, error)
- func RunForm(formRules []form.Rule, ctx types.Context, values types.KV) (types.MsgPayload, error)
- func RunLangChain(langchainRules []langchain.Rule, ctx types.Context, args types.KV) (string, error)
- func RunPage(pageRules []page.Rule, ctx types.Context, flag string) (string, error)
- func RunWebhook(webhookRules []webhook.Rule, ctx types.Context, method string, data []byte) (types.MsgPayload, error)
- func RunWorkflow(workflowRules []workflow.Rule, ctx types.Context, input types.KV) (types.KV, error)
- func ServiceURL(ctx types.Context, group, path string, param types.KV) string
- func SettingCovertForm(id string, rule setting.Rule) form.Rule
- func SettingGet(ctx types.Context, id string, key string) (types.KV, error)
- func SettingMsg(ctx types.Context, id string) types.MsgPayload
- func Shortcut(title, link string) (string, error)
- func StoreForm(ctx types.Context, payload types.MsgPayload) types.MsgPayload
- func StoreInstruct(ctx types.Context, payload types.MsgPayload) types.MsgPayload
- func StorePage(ctx types.Context, category model.PageType, title string, ...) types.MsgPayload
- func StoreParameter(params types.KV, expiredAt time.Time) (string, error)
- func Webservice(app *fiber.App, name string, ruleset webservice.Ruleset)
- type Base
- func (Base) Bootstrap() error
- func (Base) Collect(_ types.Context, _ types.KV) (types.MsgPayload, error)
- func (Base) Command(_ types.Context, _ interface{}) (types.MsgPayload, error)
- func (Base) Cron() (*cron.Ruleset, error)
- func (Base) Form(_ types.Context, _ types.KV) (types.MsgPayload, error)
- func (b Base) Help() (map[string][]string, error)
- func (Base) Input(_ types.Context, _ types.KV, _ interface{}) (types.MsgPayload, error)
- func (Base) Instruct() (instruct.Ruleset, error)
- func (Base) LangChain(_ types.Context, _ types.KV) (string, error)
- func (Base) Page(_ types.Context, _ string) (string, error)
- func (Base) Rules() []interface{}
- func (Base) WebService() *restful.WebService
- func (Base) Webhook(_ types.Context, _ string, _ []byte) (types.MsgPayload, error)
- func (Base) Webservice(_ *fiber.App)
- func (Base) Workflow(_ types.Context, _ types.KV) (types.KV, error)
- type Handler
Constants ¶
View Source
const ( MessageBotIncomingBehavior = "message_bot_incoming" MessageGroupIncomingBehavior = "message_group_incoming" )
Variables ¶
This section is empty.
Functions ¶
func AvailableTools ¶
AvailableTools the tools/functions we're making available for the model.
func InstructMsg ¶
func RunCollect ¶ added in v0.18.1
func RunCommand ¶
func RunLangChain ¶
func RunWebhook ¶
func RunWorkflow ¶
func SettingMsg ¶
func SettingMsg(ctx types.Context, id string) types.MsgPayload
func StoreForm ¶
func StoreForm(ctx types.Context, payload types.MsgPayload) types.MsgPayload
func StoreInstruct ¶
func StoreInstruct(ctx types.Context, payload types.MsgPayload) types.MsgPayload
func StorePage ¶
func StorePage(ctx types.Context, category model.PageType, title string, payload types.MsgPayload) types.MsgPayload
func Webservice ¶
func Webservice(app *fiber.App, name string, ruleset webservice.Ruleset)
Types ¶
type Base ¶
type Base struct{}
func (Base) WebService ¶
func (Base) WebService() *restful.WebService
func (Base) Webservice ¶
func (Base) Webservice(_ *fiber.App)
type Handler ¶
type Handler interface { // Init initializes the bot. Init(jsonconf json.RawMessage) error // IsReady сhecks if the bot is initialized. IsReady() bool // Bootstrap Lifecycle hook Bootstrap() error // Help return bot help Help() (map[string][]string, error) // Rules return bot ruleset Rules() []interface{} // Input return input result Input(ctx types.Context, head types.KV, content interface{}) (types.MsgPayload, error) // Command return bot result Command(ctx types.Context, content interface{}) (types.MsgPayload, error) // Form return bot form result Form(ctx types.Context, values types.KV) (types.MsgPayload, error) // Cron cron script daemon Cron() (*cron.Ruleset, error) // Collect return collect result Collect(ctx types.Context, content types.KV) (types.MsgPayload, error) // Instruct return instruct list Instruct() (instruct.Ruleset, error) // Page return page Page(ctx types.Context, flag string) (string, error) // Webservice return webservice routes Webservice(app *fiber.App) // Workflow return workflow result Workflow(ctx types.Context, input types.KV) (types.KV, error) // Webhook return webhook result Webhook(ctx types.Context, method string, data []byte) (types.MsgPayload, error) // LangChain return langchain result LangChain(ctx types.Context, args types.KV) (string, error) }
Click to show internal directories.
Click to hide internal directories.