AI
AI
Ask AI assistant.
Authorizations
AuthorizationstringRequired
Access token recevied after user login with a deviceToken
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+Body
messagestringRequired
storeUidstringOptionalPattern:
^[A-Za-z0-9-_]*modelstringOptional
Responses
200
Example response
application/json
messagestringRequired
toolsUsedstring[]Required
inputTokensintegerRequired
outputTokensintegerRequired
durationMsintegerRequired
post/tenants/{tenantUid}/ai
POST /v2/tenants/{tenantUid}/ai HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"message": "text",
"conversationHistory": [
{
"role": "USER",
"content": "text"
}
],
"storeUid": "text",
"model": "text"
}200
Example response
{
"message": "text",
"conversationHistory": [
{
"role": "USER",
"content": "text"
}
],
"toolsUsed": [
"text"
],
"inputTokens": 1,
"outputTokens": 1,
"durationMs": 1
}Last updated