Chunk
- POSTCreate or Upsert Chunk or Chunks
- POSTSearch
- POSTAutocomplete
- POSTGet Recommended Chunks
- POSTScroll Chunks
- POSTCount chunks above threshold
- POSTGenerate suggested queries
- POSTRAG on Specified Chunks
- PUTUpdate Chunk
- PUTUpdate Chunk By Tracking Id
- GETGet Chunk By Id
- GETGet Chunk By Tracking Id
- POSTGet Chunks By Tracking Ids
- POSTGet Chunks By Ids
- DELDelete Chunk
- DELDelete Chunk By Tracking Id
- DELBulk Delete Chunks
- POSTSplit HTML Content into Chunks
Chunk Group
- POSTCreate or Upsert Group or Groups
- POSTSearch Over Groups
- POSTAutocomplete Search Over Groups
- POSTSearch Within Group
- POSTGet Recommended Groups
- POSTAdd Chunk to Group
- POSTAdd Chunk to Group by Tracking ID
- POSTGet Groups for Chunks
- GETGet Chunks in Group by Tracking ID
- GETGet Group by Tracking ID
- PUTUpdate Group
- DELRemove Chunk from Group
- DELDelete Group by Tracking ID
- DELDelete Group
- GETGet Group
- GETGet Chunks in Group
- GETGet Groups for Dataset
Message
Crawl
File
Analytics
Dataset
- POSTCreate Dataset
- POSTBatch Create Datasets
- POSTGet All Tags
- POSTGet events for the dataset
- PUTUpdate Dataset by ID or Tracking ID
- PUTClear Dataset
- GETGet Dataset By ID
- GETGet Dataset by Tracking ID
- GETGet Datasets from Organization
- POSTCreate ETL Job
- PUTCreate Pagefind Index for Dataset
- GETGet Pagefind Index Url for Dataset
- GETGet Usage By Dataset ID
- GETGet dataset crawl options
- GETGet apipublic page
- DELDelete Dataset
- DELDelete Dataset by Tracking ID
Organization
Health
Stripe
Metrics
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
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
Headers
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
Response
200
application/json
A JSON object containing the parameters for the tool function
Response body for getting the parameters of a tool function
Was this page helpful?
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
}
}
Assistant
Responses are generated using AI and may contain mistakes.