File tree Expand file tree Collapse file tree 6 files changed +99
-0
lines changed
Expand file tree Collapse file tree 6 files changed +99
-0
lines changed Original file line number Diff line number Diff line change 1+ import sendQuery from './send-query'
2+
3+ export default [ sendQuery ]
Original file line number Diff line number Diff line change 1+ import { IRawAction } from '@plumber/types'
2+
3+ const action : IRawAction = {
4+ name : 'Send Query' ,
5+ key : 'sendQuery' ,
6+ description : 'Sends a query to your customised AI Bot' ,
7+ arguments : [
8+ {
9+ label : 'Query' ,
10+ key : 'query' ,
11+ type : 'rich-text' as const ,
12+ required : true ,
13+ variables : true ,
14+ returnMarkdown : true ,
15+ } ,
16+ ] ,
17+
18+ async run ( $ ) {
19+ const query = $ . step . parameters . query
20+
21+ // TODO: add the actual API call here
22+ const formData = new FormData ( )
23+ formData . append ( 'query' , query )
24+
25+ $ . setActionItem ( {
26+ raw : {
27+ query,
28+ } ,
29+ } )
30+ } ,
31+ }
32+
33+ export default action
Original file line number Diff line number Diff line change 1+ import { IApp } from '@plumber/types'
2+
3+ import actions from './actions'
4+
5+ const app : IApp = {
6+ name : 'AIBots' ,
7+ key : 'aibots' ,
8+ description : 'Integrate with your customised AI Bot' ,
9+ iconUrl : '{BASE_URL}/apps/aibots/assets/favicon.svg' ,
10+ authDocUrl : '' ,
11+ baseUrl : '' ,
12+ apiBaseUrl : '' ,
13+ primaryColor : '' ,
14+ category : 'ai' ,
15+ // TODO: add the actual auth here
16+ // auth,
17+ actions,
18+ }
19+
20+ export default app
Original file line number Diff line number Diff line change 11import type { IApp } from '@plumber/types'
22
3+ import aibotsApp from './aibots'
34import aisayApp from './aisay'
45import calculatorApp from './calculator'
56import customApiApp from './custom-api'
@@ -40,6 +41,7 @@ const apps: Record<string, IApp> = {
4041 [ twilioApp . key ] : twilioApp ,
4142 [ vaultWorkspaceApp . key ] : vaultWorkspaceApp ,
4243 [ webhookApp . key ] : webhookApp ,
44+ [ aibotsApp . key ] : aibotsApp ,
4345 [ aisayApp . key ] : aisayApp ,
4446 [ gathersgApp . key ] : gathersgApp ,
4547}
Original file line number Diff line number Diff line change 11import type { IApp } from '@plumber/types'
22
3+ import aibotsApp from '@/apps/aibots'
34import aisayApp from '@/apps/aisay'
45import calculatorApp from '@/apps/calculator'
56import customApiApp from '@/apps/custom-api'
@@ -52,6 +53,7 @@ export const ACTION_APPS_RANKING = [
5253 postmanSmsApp . key ,
5354 telegramBotApp . key ,
5455 slackApp . key ,
56+ aibotsApp . key ,
5557 aisayApp . key ,
5658 gathersgApp . key ,
5759 customApiApp . key ,
You can’t perform that action at this time.
0 commit comments