Serverless AI Bot Data Matcher

AI powered service that matches user queries with relevant data items and associates them with appropriate intents.

Endpoint

Match data with intents based on user queries

POSThttps://api.xtartapp.com/bot/data

*Authentication

You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.

Request body

NameTypeRequiredMaxDescription
askstringYes500The user query to match with data items and intents
dataarray of objectsYes25Collection of data items to match against the query
data[].idstringYes100Unique identifier for the data item
data[].contentstringYes250Content of the data item
intentsarray of objectsYes10Available intents to match with data items
intents[].namestringYes50The name of the intent
intents[].descriptionstringYes200The description of the intent
historyarray of objectsNo15Previous conversation history between user and bot
history[].rolestringYes-The role of the message sender (user or bot)
history[].contentstringYes500The message content
languagestringNo-The language code for the response

Response

NameTypeDescription
dataobjectThe response data
data.matchesarrayArray of matched data items with associated intents and confidence scores
data.matches[].dataIdstringThe ID of the matched data item
data.matches[].intentstringThe name of the matched intent
data.matches[].confidencenumberConfidence score for this match (0-1)
data.responsestringThe response message to the user query
data.totalnumberThe total number of matches
metadataobjectMetadata about the data matching process
metadata.costnumberThe cost of the data matching request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400BOT_DATA_ERROREx: could not match data | parsing error
400HARM_CONTENTEx.: The content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance
400INPUT_TOO_LONGThe input text exceeds the maximum length
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.