POST
/
api
/
message
/
get_tool_function_params
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
  }
}

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string
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.

Body

application/json
JSON request payload to get the parameters for a tool function

Request payload for getting the parameters of a tool function

tool_function
object
required

Function for a LLM tool call

audio_input
string | null

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

image_url
string | null

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

model
string | null

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

user_message_text
string | null

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

Response

200
application/json
A JSON object containing the parameters for the tool function

Response body for getting the parameters of a tool function

parameters
any | null

Parameters for the tool function.