v1

latestOpenAPI 3.0.3BSL2026-07-17133415718.8 KB
Message

Get tool function parameters

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.

post/api/message/get_tool_function_params

Headers

TR-Datasetstring uuid required

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.

Request body

audio_inputstring nullable

The base64 encoded audio input of the user message to attach to the topic and then generate an assistant message in response to.

image_urlstring nullable

Image URL to attach to the message to generate the parameters for the tool function.

image_urlsstring[] nullable

Image URLs to attach to the message to generate the parameters for the tool function.

modelstring nullable

Model name to use for the completion. If not specified, this defaults to the dataset's model.

temperaturenumber double nullable

Temperature to use for the completion. If not specified, this defaults to the dataset's temperature.

user_message_textstring nullable

Text of the user's message to the assistant which will be used to generate the parameters for the tool function.

Example request

{
  "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."
}

Response

A JSON object containing the parameters for the tool function

{"stackTrail":"components:schemas:GetToolFunctionParamsRespBody:properties:parameters","oasType":"schema","type":"unknown","description":"Parameters for the tool function.","nullable":true}

Example response

{
  "parameters": {
    "jackets": true,
    "shirts": false
  }
}