@botonic/plugin-flow-builder 0.37.0-alpha.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +20 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -140,6 +140,26 @@ getKnowledgeBaseResponse: async (
140
140
  },
141
141
  ```
142
142
 
143
+ - `getAiAgentResponse`: Using this option we can inject a function so that the bot can respond to the user using an AI agent with tools.
144
+
145
+ e.g using @botonic/plugin-ai-agents
146
+
147
+ ```ts
148
+ getAiAgentResponse: async (
149
+ request: BotRequest,
150
+ aiAgentArgs: {
151
+ name: string
152
+ instructions: string
153
+ }
154
+ ) => {
155
+ const aiAgentPlugin = request.plugins.aiAgent
156
+ const response = await aiAgentPlugin.getInference(request, aiAgentArgs)
157
+ return response
158
+ },
159
+ ```
160
+
161
+ - `customRatingMessageEnabled`: To enable custom message rating in webchat you need to configure the plugin with this option to true and import from @botonic/react the CustomRatingMessage and add it in webchat/index.ts as a message.customTypes
162
+
143
163
  2. Modify the `routes.ts` file, where routes map user inputs to actions which are in fact React Components:
144
164
 
145
165
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/plugin-flow-builder",
3
- "version": "0.37.0-alpha.0",
3
+ "version": "0.37.0",
4
4
  "main": "./lib/cjs/index.js",
5
5
  "module": "./lib/esm/index.js",
6
6
  "description": "Use Flow Builder to show your contents",
@@ -14,7 +14,7 @@
14
14
  "lint_core": "../../node_modules/.bin/eslint_d --cache --quiet 'src/**/*.ts*'"
15
15
  },
16
16
  "dependencies": {
17
- "@botonic/react": "0.37.0-alpha.0",
17
+ "@botonic/react": "^0.37.0",
18
18
  "axios": "^1.10.0",
19
19
  "uuid": "^10.0.0"
20
20
  },