从格式化的选项名称中提取原始模型名称
(formatted_name)
| 385 | |
| 386 | |
| 387 | def extract_model_name(formatted_name): |
| 388 | """从格式化的选项名称中提取原始模型名称""" |
| 389 | if not formatted_name: |
| 390 | return "" |
| 391 | # 移除开头的 emoji 和空格 |
| 392 | if formatted_name.startswith("✅ ") or formatted_name.startswith("❌ "): |
| 393 | return formatted_name[2:].strip() |
| 394 | return formatted_name.strip() |
| 395 | |
| 396 | |
| 397 | def sort_model_choices(models): |
no outgoing calls
no test coverage detected