You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ej2-asp-core-mvc/chat-ui/EJ2_ASP.NETCORE/bot-integrations/integration-with-dialogflow.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Before integrating Dialogflow, ensure that the Syncfusion Chat UI component is c
19
19
20
20
## Prerequisites
21
21
22
-
* Google account to access `Dialogflow` and `Google Cloud Console`.
22
+
* Google account to access [Google Dialogflow](https://cloud.google.com/dialogflow/docs) and [Google Cloud Console](https://console.cloud.google.com/).
23
23
* .NET SDK (version 6.0 or higher) for ASP.NET Core.
24
24
* Syncfusion EJ2 ASP.NET Core installed in your project.
25
25
* Dialogflow Service Account with the Dialogflow API Client role and its JSON key file.
1. In the Dialogflow console, create an [agent](https://cloud.google.com/agent-assist/docs), set a name (e.g., `MyChatBot`), and configure the default language (e.g., English - `en`).
45
+
1. In the dialogflow console, create an [agent](https://cloud.google.com/agent-assist/docs), set a name (e.g., `MyChatBot`), and configure the default language (e.g., English - `en`).
46
46
47
-
2. Add intents with training phrases and responses (e.g., greetings, FAQs). Test using the Dialogflow simulator.
47
+
2. Add intents with training phrases and responses (e.g., greetings, FAQs). Test using the dialogflow simulator.
48
48
49
-
3. In the Google Cloud Console, go to `APIs & Services` > `Credentials`, create a Service Account with the Dialogflow API Client role, and download the JSON key file.
49
+
3. In the Google Cloud Console, go to `APIs & Services` > `Credentials`, create a Service Account with the dialogflow API client role, and download the JSON key file.
50
50
51
51
> `Security Note`: Never commit the JSON key file to version control. Use environment variables or a secret manager (e.g., Google Cloud Secret Manager) for production.
52
52
@@ -135,13 +135,13 @@ Use the Chat UI `messageSend` event to exchange messages. This event is triggere
135
135
136
136
### Forward Message to backend:
137
137
138
-
In the messageSend event handler, send a POST request to your backend API endpoint (`/api/chat/message`). The backend forwards the message to Dialogflow and returns the response.
138
+
In the `messageSend` event handler, send a POST request to your backend API endpoint (`/api/chat/message`). The backend forwards the message to dialogflow and returns the response.
139
139
140
140
### Displaying Bot response:
141
141
142
142
Use the `addMessage` method to programmatically add the bot's reply to the Chat UI.
143
143
144
-
Create `Views/Home/Index.cshtml`(assuming MVC) to integrate the Syncfusion Chat UI with the Dialogflow backend:
144
+
Create `Views/Home/Index.cshtml` to integrate the Syncfusion Chat UI with the dialogflow backend:
145
145
146
146
{% tabs %}
147
147
{% highlight Html tabtitle="Index.cshtml" %}
@@ -202,9 +202,9 @@ dotnet run
202
202
203
203
```
204
204
205
-
Open your app and chat with your Dialogflow-powered bot.
205
+
Open your app in the browser and chat with your dialogflow-powered bot.
206
206
207
-

207
+

208
208
209
209
## Troubleshooting:
210
210
@@ -213,4 +213,4 @@ dotnet run
213
213
*`No Response`: Test intents in the Dialogflow Console simulator to ensure they are configured correctly.
214
214
*`Quota Exceeded`: Check Dialogflow API quotas in the Google Cloud Console.
215
215
*`Network Issues`: Confirm the application is running and the API URL is correct.
216
-
*`Invalid Credentials`: Verify the service account JSON or configuration settings are correctly set up.
216
+
*`Invalid Credentials`: Verify the service account JSON or configuration settings are correctly set up.
0 commit comments