in bots/triage-slackbot/triage_slackbot/openai_utils.py [0:0]
def predict_category_functions(categories: list[RequestCategory]) -> list[dict]:
return [
{
"name": "get_predicted_category",
"description": "Predicts the category of an inbound request.",
"parameters": {
"type": "object",
"properties": {
"category": {
"type": "string",
"enum": [
category.key for category in categories if category.key != OTHER_KEY
],
"description": "Predicted category of the inbound request",
},
},
"required": ["category"],
},
}
]