@@ -52,9 +52,51 @@ Once you're satisfied with the settings, click on the **SAVE** button. A script
5252
5353If you want to customize your webchat even more, you can opt for a self-hosted installatiton. Just fork this project to get started!
5454
55+ #### Installation
56+
57+ Clone the repository you forked, and install the dependencies.
58+
59+ ```
60+ $> git clone YOUR_REPO_URL
61+ $> cd webchat
62+ $> npm install
63+ ```
64+
65+ #### Run in development mode
66+
67+ ```
68+ $> npm run start
69+ ```
70+
71+ #### Eslint + prettier
72+
73+ ```
74+ $> npm run prettier
75+ ```
76+
77+ #### Build for production
78+
79+ ```
80+ $> npm run build
81+ ```
82+
83+ #### Use your webchat
84+
85+ Once you're done, build it and host it.
86+ To use it instead of the default one provided by Recast.AI, you need to set up the Webchat channel in the ** CONNECT** tab of your bot.
87+ You'll be using the same script as the default installation, but you have ** to replace the src field by your own URL** .
88+
89+
90+ ```
91+ <script
92+ src="YOUR_WEBCHAT_URL"
93+ ...
94+ ></script>
95+ ```
96+
5597### React component
5698You can import the webchat as a React component like the following example:
57- ```
99+ ``` js
58100import RecastWebchat from ' webchat' ;
59101
60102export default class ReactWebchat extends Component {
@@ -115,47 +157,6 @@ this.webchat.clearMessages();
115157| ---| ---|
116158| clearMessages()| Clear all messages in the webchat|
117159
118- #### Installation
119-
120- Clone the repository you forked, and install the dependencies.
121-
122- ```
123- $> git clone YOUR_REPO_URL
124- $> cd webchat
125- $> npm install
126- ```
127-
128- #### Run in development mode
129-
130- ```
131- $> npm run start
132- ```
133-
134- #### Eslint + prettier
135-
136- ```
137- $> npm run prettier
138- ```
139-
140- #### Build for production
141-
142- ```
143- $> npm run build
144- ```
145-
146- #### Use your webchat
147-
148- Once you're done, build it and host it.
149- To use it instead of the default one provided by Recast.AI, you need to set up the Webchat channel in the ** CONNECT** tab of your bot.
150- You'll be using the same script as the default installation, but you have ** to replace the src field by your own URL** .
151-
152-
153- ```
154- <script
155- src="YOUR_WEBCHAT_URL"
156- ...
157- ></script>
158- ```
159160
160161
161162## Getting started with Recast.AI
0 commit comments