(lang: str)
| 1861 | |
| 1862 | |
| 1863 | def get_lang_name(lang: str): |
| 1864 | if not lang: |
| 1865 | return '简体中文' |
| 1866 | normalized = lang.lower() |
| 1867 | if normalized.startswith('zh-tw'): |
| 1868 | return '繁体中文' |
| 1869 | if normalized.startswith('en'): |
| 1870 | return '英文' |
| 1871 | if normalized.startswith('ko'): |
| 1872 | return '韩语' |
| 1873 | return '简体中文' |
| 1874 | |
| 1875 | |
| 1876 | def get_last_conversation_rounds(messages, rounds=settings.GENERATE_SQL_QUERY_HISTORY_ROUND_COUNT): |