feat: add twitter action and connector (#58)
* feat: add twitter post action Signed-off-by: mudler <mudler@localai.io> * feat: handle twitter post messages limits Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat: add twitter connector, unify client Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * make sure answers do not exceed twitter maximum --------- Signed-off-by: mudler <mudler@localai.io> Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
e32a569796
commit
f0bd184fbd
@@ -27,6 +27,7 @@ const (
|
||||
ActionScraper = "scraper"
|
||||
ActionWikipedia = "wikipedia"
|
||||
ActionBrowse = "browse"
|
||||
ActionTwitterPost = "twitter-post"
|
||||
ActionSendMail = "send_mail"
|
||||
ActionGenerateImage = "generate_image"
|
||||
ActionCounter = "counter"
|
||||
@@ -48,6 +49,7 @@ var AvailableActions = []string{
|
||||
ActionWikipedia,
|
||||
ActionSendMail,
|
||||
ActionGenerateImage,
|
||||
ActionTwitterPost,
|
||||
ActionCounter,
|
||||
}
|
||||
|
||||
@@ -98,6 +100,8 @@ func Actions(a *state.AgentConfig) func(ctx context.Context) []agent.Action {
|
||||
allActions = append(allActions, actions.NewBrowse(config))
|
||||
case ActionSendMail:
|
||||
allActions = append(allActions, actions.NewSendMail(config))
|
||||
case ActionTwitterPost:
|
||||
allActions = append(allActions, actions.NewPostTweet(config))
|
||||
case ActionCounter:
|
||||
allActions = append(allActions, actions.NewCounter(config))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user