curl --request POST \
--url https://api.trieve.ai/api/message/get_tool_function_params \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"image_url": "https://example.com/jacket.jpg",
"tool_function": {
"description": "Decide on which filters to apply to available catalog being used within the knowledge base to respond. Always get filters.",
"name": "get_filters",
"parameters": [
{
"description": "Whether or not the user is looking for jackets.",
"name": "jackets",
"parameter_type": "boolean"
},
{
"description": "Whether or not the user is looking for shirts.",
"name": "shirts",
"parameter_type": "boolean"
}
]
},
"user_message_text": "Get filters for the following message: \n\nI am looking for a jacket."
}'
{
"parameters": {
"jackets": true,
"shirts": false
}
}
This endpoint will generate the parameters for a tool function based on the user’s message and image URL provided in the request body. The response will include the parameters for the tool function as a JSON object.
curl --request POST \
--url https://api.trieve.ai/api/message/get_tool_function_params \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"image_url": "https://example.com/jacket.jpg",
"tool_function": {
"description": "Decide on which filters to apply to available catalog being used within the knowledge base to respond. Always get filters.",
"name": "get_filters",
"parameters": [
{
"description": "Whether or not the user is looking for jackets.",
"name": "jackets",
"parameter_type": "boolean"
},
{
"description": "Whether or not the user is looking for shirts.",
"name": "shirts",
"parameter_type": "boolean"
}
]
},
"user_message_text": "Get filters for the following message: \n\nI am looking for a jacket."
}'
{
"parameters": {
"jackets": true,
"shirts": false
}
}
The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
JSON request payload to get the parameters for a tool function
Request payload for getting the parameters of a tool function
A JSON object containing the parameters for the tool function
Response body for getting the parameters of a tool function
Was this page helpful?