This example shows how the get_data_source_fields tool lists the fields of the Product Data Source. The example includes the prompt, the parameters that the AI assistant sends to the tool, and the fields that the tool returns.
Prompt
List of all fields in Data Source 'Product' in a table.
Request
JSON
{
"table": "Product",
"type": "DATASOURCE",
"total": 23,
"fields": [
{
"name": "ProductId",
"label": "Product Id",
"type": "TEXT",
"format": "",
"dimension": true,
"measure": false,
"dateField": false,
"expression": "",
"metaDescription": null
},
{
"name": "BaseQty",
"label": "Base Qty",
"type": "NUMBER",
"format": "",
"dimension": false,
"measure": true,
"dateField": false,
"expression": "",
"metaDescription": null
}
]
}
Response
|
name |
label |
type |
dimension |
measure |
dateField |
|---|---|---|---|---|---|
|
ProductId |
Product Id |
TEXT |
true |
false |
false |
|
ProductName |
Product Name |
TEXT |
false |
false |
false |
|
ProductGroup |
Product Group |
TEXT |
false |
false |
false |
|
BaseQty |
Base Qty |
NUMBER |
false |
true |
false |
|
BaseUoM |
Base UoM |
TEXT |
false |
false |
false |
|
currency |
Currency |
TEXT |
false |
false |
false |
|
image |
Image |
BOOLEAN |
false |
false |
false |
|
lastUpdateDate |
LastUpdateDate |
DATETIME |
false |
false |
true |