Question
JSON Example
{
"config": {...},
"admin_context": [...],
"question": "My very very long question for the AI",
"label": "The short description",
"visible_if": "current_screen.name == 'Récapitulatif'".
"data": "get_my_question_data()",
"json_data": {...}
}
Elements of Question
config
- Type:
Config
. - Description: The config for the question. The config will be merged with global config if one exists.
Example:
"config": {...}
admin_context
- Type:
Array<String>
. - Description: The context given to the ai for every questions you ask. The context will be merged with global context if one exists.
Example:
"admin_context": [
"You are an AI assistant that helps people find information about sidely.",
"The second context"
]
question
- Type:
String
. - Description: The prompt that will be send to Ai.
Example:
"question": "My very very long question for the AI"
label
- Type:
String
. - Description: The label that will be displayed on the UI.
- Default: The question it self.
Example:
"label": "The short description"
visible_if
danger
Only available in questions
, not in planning_questions
nor form_questions
- Type:
String
. - Description: The condition that will be evaluated to determine if the question is visible.
- Default:
true
Example:
"visible_if": "current_screen.name == 'Récapitulatif'"
data
danger
Only available in questions
, not in planning_questions
nor form_questions
- Type:
String
. - Description: The function that will be called to get the data for the question. You can use keywords as value.
Example:
"data": "get_my_question_data()"
json_data
- Type:
Object
. - Description: The data that will be sent to the AI. You can use keywords as value.
Example:
"json_data": {
"_products": true,
"my_data": [
{"name": "id"},
{"Jerome": 1},
{"Amine": 2}
]
}
keywords
_products
Send products as CSV to the Ai. It can be a boolean or an Array<Uuid>
.
If true, send all products. If false, none is sent.
_fields
Send fields as CSV to the Ai. It can be a boolean or an Array<String>
where the strings are the fields slugs.
If true, send all fields. If false, none is sent.
_last_fields
Send fields from last instance as CSV to the Ai. It can be a boolean or an Array<String>
where the strings are the fields slugs.
If true, send all fields from last instance. If false, none is sent.