curl --request POST \
--url https://{subdomain}.domo.com/api/ai/v1/messages/tools \
--header 'Content-Type: application/json' \
--header 'X-DOMO-Developer-Token: <api-key>' \
--data '
{
"input": [
{
"role": "USER",
"content": [
{
"type": "TEXT",
"text": "Do you have any blue coats available?"
}
]
}
],
"tools": [
{
"name": "get_product_recommendations",
"description": "Searches for products matching certain criteria in the database",
"parameters": {
"type": "object",
"properties": {
"categories": {
"description": "categories that could be a match",
"type": "array",
"items": {
"type": "string",
"enum": [
"coats & jackets",
"accessories",
"tops",
"jeans & trousers",
"skirts & dresses",
"shoes"
]
}
},
"colors": {
"description": "colors that could be a match, empty array if N/A",
"type": "array",
"items": {
"type": "string",
"enum": [
"black",
"white",
"brown",
"red",
"blue",
"green",
"orange",
"yellow",
"pink",
"gold",
"silver"
]
}
},
"keywords": {
"description": "keywords that should be present in the item title or description",
"type": "array",
"items": {
"type": "string"
}
},
"price_range": {
"type": "object",
"properties": {
"min": {
"type": "number",
"minimum": 100
},
"max": {
"type": "number",
"maximum": 200
}
},
"required": [
"min",
"max"
],
"additionalProperties": false
},
"limit": {
"type": "integer",
"description": "The maximum number of products to return, use 5 by default if nothing is specified by the user",
"const": 100
},
"today": {
"type": "string",
"format": "date-time",
"description": "todays date"
},
"email": {
"type": "string",
"format": "email",
"description": "confirmation email"
},
"phone": {
"type": "string",
"description": "user phone number"
},
"id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"categories",
"colors",
"keywords",
"price_range",
"limit",
"today",
"id"
],
"additionalProperties": false
}
},
{
"name": "get_product_details",
"description": "Fetches more details about a product",
"parameters": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "The ID of the product to fetch details for"
}
},
"required": [
"product_id"
],
"additionalProperties": false
}
},
{
"name": "add_to_cart",
"description": "Add items to cart when the user has confirmed their interest.",
"parameters": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "ID of the product to add to the cart"
},
"quantity": {
"type": "integer",
"description": "Quantity of the product to add to the cart"
}
},
"required": [
"product_id",
"quantity"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
],
"toolChoice": {
"type": "AUTO"
}
}
'{
"content": [
{
"type": "TEXT",
"text": "Certainly! I'd be happy to help you find a blue coat. I'll use the product recommendation tool to search for that."
},
{
"type": "TOOL_USE_REQUEST",
"toolInput": {
"categories": [
"coats & jackets"
],
"colors": [
"blue"
],
"keywords": [
"coat"
],
"price_range": {
"min": 100,
"max": 200
},
"limit": 5,
"today": "2023-06-10T12:00:00.000Z",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"name": "get_product_recommendations",
"toolCallId": "toolu_bdrk_01Tnc9RttRWSwvKHd5JA1sRk"
}
],
"modelId": "domo.domo_ai.domogpt-medium-v1.2:anthropic",
"isCustomerModel": false,
"sessionId": "526bb9ee-02d0-4717-a83d-946715b5fa82",
"requestId": "c765dc33-9f3e-4f23-84e5-cf7aa2cd3f63",
"stopReason": "TOOL_USE"
}Process a tool calling request.
curl --request POST \
--url https://{subdomain}.domo.com/api/ai/v1/messages/tools \
--header 'Content-Type: application/json' \
--header 'X-DOMO-Developer-Token: <api-key>' \
--data '
{
"input": [
{
"role": "USER",
"content": [
{
"type": "TEXT",
"text": "Do you have any blue coats available?"
}
]
}
],
"tools": [
{
"name": "get_product_recommendations",
"description": "Searches for products matching certain criteria in the database",
"parameters": {
"type": "object",
"properties": {
"categories": {
"description": "categories that could be a match",
"type": "array",
"items": {
"type": "string",
"enum": [
"coats & jackets",
"accessories",
"tops",
"jeans & trousers",
"skirts & dresses",
"shoes"
]
}
},
"colors": {
"description": "colors that could be a match, empty array if N/A",
"type": "array",
"items": {
"type": "string",
"enum": [
"black",
"white",
"brown",
"red",
"blue",
"green",
"orange",
"yellow",
"pink",
"gold",
"silver"
]
}
},
"keywords": {
"description": "keywords that should be present in the item title or description",
"type": "array",
"items": {
"type": "string"
}
},
"price_range": {
"type": "object",
"properties": {
"min": {
"type": "number",
"minimum": 100
},
"max": {
"type": "number",
"maximum": 200
}
},
"required": [
"min",
"max"
],
"additionalProperties": false
},
"limit": {
"type": "integer",
"description": "The maximum number of products to return, use 5 by default if nothing is specified by the user",
"const": 100
},
"today": {
"type": "string",
"format": "date-time",
"description": "todays date"
},
"email": {
"type": "string",
"format": "email",
"description": "confirmation email"
},
"phone": {
"type": "string",
"description": "user phone number"
},
"id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"categories",
"colors",
"keywords",
"price_range",
"limit",
"today",
"id"
],
"additionalProperties": false
}
},
{
"name": "get_product_details",
"description": "Fetches more details about a product",
"parameters": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "The ID of the product to fetch details for"
}
},
"required": [
"product_id"
],
"additionalProperties": false
}
},
{
"name": "add_to_cart",
"description": "Add items to cart when the user has confirmed their interest.",
"parameters": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "ID of the product to add to the cart"
},
"quantity": {
"type": "integer",
"description": "Quantity of the product to add to the cart"
}
},
"required": [
"product_id",
"quantity"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
}
}
],
"toolChoice": {
"type": "AUTO"
}
}
'{
"content": [
{
"type": "TEXT",
"text": "Certainly! I'd be happy to help you find a blue coat. I'll use the product recommendation tool to search for that."
},
{
"type": "TOOL_USE_REQUEST",
"toolInput": {
"categories": [
"coats & jackets"
],
"colors": [
"blue"
],
"keywords": [
"coat"
],
"price_range": {
"min": 100,
"max": 200
},
"limit": 5,
"today": "2023-06-10T12:00:00.000Z",
"id": "550e8400-e29b-41d4-a716-446655440000"
},
"name": "get_product_recommendations",
"toolCallId": "toolu_bdrk_01Tnc9RttRWSwvKHd5JA1sRk"
}
],
"modelId": "domo.domo_ai.domogpt-medium-v1.2:anthropic",
"isCustomerModel": false,
"sessionId": "526bb9ee-02d0-4717-a83d-946715b5fa82",
"requestId": "c765dc33-9f3e-4f23-84e5-cf7aa2cd3f63",
"stopReason": "TOOL_USE"
}Documentation Index
Fetch the complete documentation index at: https://domoinc-arun-raj-connectors-domo-479695-remove-crime-report.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Request for making tool calls using AI.
The list of input messages to be processed by the AI.
Show child attributes
The unique identifier for the AI session associated with this request.
System-level messages or configurations to guide the AI's response.
Show child attributes
The identifier of the AI model to be used for generating a response.
Specific parameters or settings that configure the AI model behavior.
Show child attributes
A parameter for controlling the randomness of the model's output.
The maximum number of tokens to generate in the response.
The list of tools the model can call.
Show child attributes
How the model should use the provided tools.
Show child attributes
A flag to determine whether to validate the AI response against the provided schema.
Configuration for reasoning behavior and effort level.
Show child attributes
Successful tool calling response.
Response from a Messages API.
The list of content generated by the model.
Text-based message content.
Show child attributes
The id of the model used to generate the response.
The id of the AI Session associated with this request.
The reason that the model stopped.
TOOL_USE, MAX_TOKENS, STOP_SEQUENCE, END_TURN, CONTENT_FILTERED, SAFETY, UNKNOWN The token usage from the model provider.
Show child attributes