Intent Recognition
The Intent Analysis model will help you capture semantics behind user's messages and assign it to the right label. It is designed to understand human conversation in the form or free text or spoken
Marsview offers intent recognition for text, speech in async and real-time.
Text intent recognition Learn more
Intent recognition in real-time speech analytics Learn more
Intent recognition in async speech analytics Learn more

Creation of Intents

API Request

post
https://api.marsview.ai/cb/v1/profile/intents/create_intent
Creates a new intent and responds with the new intentId in the database

Example Curl Request

Shown below is a code snippet to create a new intent
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/profile/intents/create_intent/<userId>' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <JWT access token>' \
4
--data-raw '{
5
"userId" : "[email protected]",
6
"intentName" : "Demo Intent",
7
"intentSamples" : ["This is an intent sample", "These samples are used of intent recognition"],
8
"intentSamplePhrases" : ["intent phrase", "phrase sample"]
9
}'
Copied!

Example Response

The intent is created if the server responds with a 200 status code and the status is set to True in the JSON response
1
{
2
"status": true,
3
"data": {
4
"intentId": "intent-bxllq7f8vkxgv7vmk-1640136993500"
5
}
6
}
Copied!

Get User Intents

API Request

get
https://api.marsview.ai/cb/v1/profile/intents/get_user_intents
Responds with all the intent data and from the database

Example Curl Request

Shown below is a code snippet to fetch all the intents of a user
1
curl --location --request GET 'https://api.marsview.ai/cb/v1/profile/intents/get_user_intents/<userId>' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <JWT access token>'
Copied!

Example Response

The intents are fetched and returned if the server responds with a 200 status code and the status is set to True in the JSON response
1
{
2
"status": true,
3
"data": {
4
[
5
{
6
"_id": "61c28121c3201048f422b612",
7
"type": "custom",
8
"user_id": "[email protected]",
9
"intent_id": "intent-bxllq7f8vkxgv7vmk-1640136993500",
10
"intent_name": "sample name",
11
"implements": [],
12
"intent_samples": [],
13
"intent_sample_phrases": [
14
"intent sample",
15
"sample intent"
16
],
17
"deleted": false
18
}
19
]
20
}
21
}
Copied!

Deletion of Intents

API Request

delete
https://api.marsview.ai/cb/v1/profile/intents/delete_intent
Deletes an existing intent and responds with the deleted intentId from the database

Example Curl Request

Shown below is a code snippet to delete an existing intent
1
curl --location --request DELETE 'https://api.marsview.ai/cb/v1/profile/intents/create_intent/<userId>/<intentId>' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <JWT access token>'
Copied!

Example Response

The intent is deleted if the server responds with a 200 status code and the status is set to True in the JSON response
1
{
2
"status": true,
3
"data": {
4
"msg": "Intent Deleted successfully",
5
"intentId": "intent-bxllq7f8vkxgv8jhu-1640137024434"
6
}
7
}
Copied!
Last modified 1mo ago