| |
| |
| |
| |
| |
| |
|
|
| def route_skill(prompt: str): |
| """ |
| Returns: |
| - skill name (str) if high confidence |
| - None if Core/Base should handle it |
| """ |
|
|
| if not prompt: |
| return None |
|
|
| text = prompt.lower() |
|
|
| |
|
|
| |
| excel_signals = [ |
| "excel file", "spreadsheet", "xlsx", "csv", |
| "sheet", "pivot table", "cell", "column", "row" |
| ] |
| if any(k in text for k in excel_signals): |
| return "excel" |
|
|
| |
| vat_signals = [ |
| "vat calculation", "invoice total", |
| "tax amount", "vat %", "bill amount" |
| ] |
| if any(k in text for k in vat_signals): |
| return "vat" |
|
|
| |
| doc_signals = [ |
| "analyze document", "extract from pdf", |
| "document review", "read this pdf", |
| "contract analysis" |
| ] |
| if any(k in text for k in doc_signals): |
| return "docs" |
|
|
| |
| |
| return None |
|
|