四盘
commited on
Commit
·
43f479f
1
Parent(s):
57a1bb1
update default model to InclusionAI Ling-flash-2.0
Browse files
app.py
CHANGED
|
@@ -1708,233 +1708,233 @@ AVAILABLE_MODELS = [
|
|
| 1708 |
"id": "inclusionAI/Ling-flash-2.0",
|
| 1709 |
"description": "InclusionAI Ling-flash-2.0 model for code generation and general tasks"
|
| 1710 |
},
|
| 1711 |
-
{
|
| 1712 |
-
|
| 1713 |
-
|
| 1714 |
-
|
| 1715 |
-
},
|
| 1716 |
-
{
|
| 1717 |
-
|
| 1718 |
-
|
| 1719 |
-
|
| 1720 |
-
},
|
| 1721 |
-
{
|
| 1722 |
-
|
| 1723 |
-
|
| 1724 |
-
|
| 1725 |
-
},
|
| 1726 |
-
{
|
| 1727 |
-
|
| 1728 |
-
|
| 1729 |
-
|
| 1730 |
-
},
|
| 1731 |
-
{
|
| 1732 |
-
|
| 1733 |
-
|
| 1734 |
-
|
| 1735 |
-
},
|
| 1736 |
-
{
|
| 1737 |
-
|
| 1738 |
-
|
| 1739 |
-
|
| 1740 |
-
},
|
| 1741 |
-
{
|
| 1742 |
-
|
| 1743 |
-
|
| 1744 |
-
|
| 1745 |
-
},
|
| 1746 |
-
{
|
| 1747 |
-
|
| 1748 |
-
|
| 1749 |
-
|
| 1750 |
-
},
|
| 1751 |
-
{
|
| 1752 |
-
|
| 1753 |
-
|
| 1754 |
-
|
| 1755 |
-
},
|
| 1756 |
-
{
|
| 1757 |
-
|
| 1758 |
-
|
| 1759 |
-
|
| 1760 |
-
},
|
| 1761 |
-
{
|
| 1762 |
-
|
| 1763 |
-
|
| 1764 |
-
|
| 1765 |
-
},
|
| 1766 |
-
{
|
| 1767 |
-
|
| 1768 |
-
|
| 1769 |
-
|
| 1770 |
-
},
|
| 1771 |
-
{
|
| 1772 |
-
|
| 1773 |
-
|
| 1774 |
-
|
| 1775 |
-
},
|
| 1776 |
-
{
|
| 1777 |
-
|
| 1778 |
-
|
| 1779 |
-
|
| 1780 |
-
},
|
| 1781 |
-
{
|
| 1782 |
-
|
| 1783 |
-
|
| 1784 |
-
|
| 1785 |
-
},
|
| 1786 |
-
{
|
| 1787 |
-
|
| 1788 |
-
|
| 1789 |
-
|
| 1790 |
-
},
|
| 1791 |
-
{
|
| 1792 |
-
|
| 1793 |
-
|
| 1794 |
-
|
| 1795 |
-
},
|
| 1796 |
-
{
|
| 1797 |
-
|
| 1798 |
-
|
| 1799 |
-
|
| 1800 |
-
},
|
| 1801 |
-
{
|
| 1802 |
-
|
| 1803 |
-
|
| 1804 |
-
|
| 1805 |
-
},
|
| 1806 |
-
{
|
| 1807 |
-
|
| 1808 |
-
|
| 1809 |
-
|
| 1810 |
-
},
|
| 1811 |
-
{
|
| 1812 |
-
|
| 1813 |
-
|
| 1814 |
-
|
| 1815 |
-
},
|
| 1816 |
-
{
|
| 1817 |
-
|
| 1818 |
-
|
| 1819 |
-
|
| 1820 |
-
},
|
| 1821 |
-
{
|
| 1822 |
-
|
| 1823 |
-
|
| 1824 |
-
|
| 1825 |
-
},
|
| 1826 |
-
{
|
| 1827 |
-
|
| 1828 |
-
|
| 1829 |
-
|
| 1830 |
-
},
|
| 1831 |
-
{
|
| 1832 |
-
|
| 1833 |
-
|
| 1834 |
-
|
| 1835 |
-
},
|
| 1836 |
-
{
|
| 1837 |
-
|
| 1838 |
-
|
| 1839 |
-
|
| 1840 |
-
},
|
| 1841 |
-
{
|
| 1842 |
-
|
| 1843 |
-
|
| 1844 |
-
|
| 1845 |
-
},
|
| 1846 |
-
{
|
| 1847 |
-
|
| 1848 |
-
|
| 1849 |
-
|
| 1850 |
-
},
|
| 1851 |
-
{
|
| 1852 |
-
|
| 1853 |
-
|
| 1854 |
-
|
| 1855 |
-
},
|
| 1856 |
-
{
|
| 1857 |
-
|
| 1858 |
-
|
| 1859 |
-
|
| 1860 |
-
|
| 1861 |
-
},
|
| 1862 |
-
{
|
| 1863 |
-
|
| 1864 |
-
|
| 1865 |
-
|
| 1866 |
-
|
| 1867 |
-
},
|
| 1868 |
-
{
|
| 1869 |
-
|
| 1870 |
-
|
| 1871 |
-
|
| 1872 |
-
|
| 1873 |
-
},
|
| 1874 |
-
{
|
| 1875 |
-
|
| 1876 |
-
|
| 1877 |
-
|
| 1878 |
-
},
|
| 1879 |
-
{
|
| 1880 |
-
|
| 1881 |
-
|
| 1882 |
-
|
| 1883 |
-
},
|
| 1884 |
-
{
|
| 1885 |
-
|
| 1886 |
-
|
| 1887 |
-
|
| 1888 |
-
},
|
| 1889 |
-
{
|
| 1890 |
-
|
| 1891 |
-
|
| 1892 |
-
|
| 1893 |
-
},
|
| 1894 |
-
{
|
| 1895 |
-
|
| 1896 |
-
|
| 1897 |
-
|
| 1898 |
-
},
|
| 1899 |
-
{
|
| 1900 |
-
|
| 1901 |
-
|
| 1902 |
-
|
| 1903 |
-
},
|
| 1904 |
-
{
|
| 1905 |
-
|
| 1906 |
-
|
| 1907 |
-
|
| 1908 |
-
},
|
| 1909 |
-
{
|
| 1910 |
-
|
| 1911 |
-
|
| 1912 |
-
|
| 1913 |
-
},
|
| 1914 |
-
{
|
| 1915 |
-
|
| 1916 |
-
|
| 1917 |
-
|
| 1918 |
-
},
|
| 1919 |
-
{
|
| 1920 |
-
|
| 1921 |
-
|
| 1922 |
-
|
| 1923 |
-
},
|
| 1924 |
-
{
|
| 1925 |
-
|
| 1926 |
-
|
| 1927 |
-
|
| 1928 |
-
},
|
| 1929 |
-
{
|
| 1930 |
-
|
| 1931 |
-
|
| 1932 |
-
|
| 1933 |
-
}
|
| 1934 |
]
|
| 1935 |
|
| 1936 |
# Default model selection
|
| 1937 |
-
DEFAULT_MODEL_NAME = "
|
| 1938 |
DEFAULT_MODEL = None
|
| 1939 |
for _m in AVAILABLE_MODELS:
|
| 1940 |
if _m.get("name") == DEFAULT_MODEL_NAME:
|
|
|
|
| 1708 |
"id": "inclusionAI/Ling-flash-2.0",
|
| 1709 |
"description": "InclusionAI Ling-flash-2.0 model for code generation and general tasks"
|
| 1710 |
},
|
| 1711 |
+
# {
|
| 1712 |
+
# "name": "Grok 4 Fast (Free)",
|
| 1713 |
+
# "id": "x-ai/grok-4-fast:free",
|
| 1714 |
+
# "description": "X.AI Grok 4 Fast model via OpenRouter - free tier with vision capabilities for code generation"
|
| 1715 |
+
# },
|
| 1716 |
+
# {
|
| 1717 |
+
# "name": "Moonshot Kimi-K2",
|
| 1718 |
+
# "id": "moonshotai/Kimi-K2-Instruct",
|
| 1719 |
+
# "description": "Moonshot AI Kimi-K2-Instruct model for code generation and general tasks"
|
| 1720 |
+
# },
|
| 1721 |
+
# {
|
| 1722 |
+
# "name": "Kimi K2 Turbo (Preview)",
|
| 1723 |
+
# "id": "kimi-k2-turbo-preview",
|
| 1724 |
+
# "description": "Moonshot AI Kimi K2 Turbo via OpenAI-compatible API"
|
| 1725 |
+
# },
|
| 1726 |
+
# {
|
| 1727 |
+
# "name": "Carrot",
|
| 1728 |
+
# "id": "stealth-model-1",
|
| 1729 |
+
# "description": "High-performance AI model for code generation and complex reasoning tasks"
|
| 1730 |
+
# },
|
| 1731 |
+
# {
|
| 1732 |
+
# "name": "DeepSeek V3",
|
| 1733 |
+
# "id": "deepseek-ai/DeepSeek-V3-0324",
|
| 1734 |
+
# "description": "DeepSeek V3 model for code generation"
|
| 1735 |
+
# },
|
| 1736 |
+
# {
|
| 1737 |
+
# "name": "DeepSeek V3.1",
|
| 1738 |
+
# "id": "deepseek-ai/DeepSeek-V3.1",
|
| 1739 |
+
# "description": "DeepSeek V3.1 model for code generation and general tasks"
|
| 1740 |
+
# },
|
| 1741 |
+
# {
|
| 1742 |
+
# "name": "DeepSeek V3.1 Terminus",
|
| 1743 |
+
# "id": "deepseek-ai/DeepSeek-V3.1-Terminus",
|
| 1744 |
+
# "description": "DeepSeek V3.1 Terminus model for advanced code generation and reasoning tasks"
|
| 1745 |
+
# },
|
| 1746 |
+
# {
|
| 1747 |
+
# "name": "DeepSeek R1",
|
| 1748 |
+
# "id": "deepseek-ai/DeepSeek-R1-0528",
|
| 1749 |
+
# "description": "DeepSeek R1 model for code generation"
|
| 1750 |
+
# },
|
| 1751 |
+
# {
|
| 1752 |
+
# "name": "ERNIE-4.5-VL",
|
| 1753 |
+
# "id": "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT",
|
| 1754 |
+
# "description": "ERNIE-4.5-VL model for multimodal code generation with image support"
|
| 1755 |
+
# },
|
| 1756 |
+
# {
|
| 1757 |
+
# "name": "MiniMax M1",
|
| 1758 |
+
# "id": "MiniMaxAI/MiniMax-M1-80k",
|
| 1759 |
+
# "description": "MiniMax M1 model for code generation and general tasks"
|
| 1760 |
+
# },
|
| 1761 |
+
# {
|
| 1762 |
+
# "name": "Qwen3-235B-A22B",
|
| 1763 |
+
# "id": "Qwen/Qwen3-235B-A22B",
|
| 1764 |
+
# "description": "Qwen3-235B-A22B model for code generation and general tasks"
|
| 1765 |
+
# },
|
| 1766 |
+
# {
|
| 1767 |
+
# "name": "SmolLM3-3B",
|
| 1768 |
+
# "id": "HuggingFaceTB/SmolLM3-3B",
|
| 1769 |
+
# "description": "SmolLM3-3B model for code generation and general tasks"
|
| 1770 |
+
# },
|
| 1771 |
+
# {
|
| 1772 |
+
# "name": "GLM-4.5",
|
| 1773 |
+
# "id": "zai-org/GLM-4.5",
|
| 1774 |
+
# "description": "GLM-4.5 model with thinking capabilities for advanced code generation"
|
| 1775 |
+
# },
|
| 1776 |
+
# {
|
| 1777 |
+
# "name": "GLM-4.5V",
|
| 1778 |
+
# "id": "zai-org/GLM-4.5V",
|
| 1779 |
+
# "description": "GLM-4.5V multimodal model with image understanding for code generation"
|
| 1780 |
+
# },
|
| 1781 |
+
# {
|
| 1782 |
+
# "name": "GLM-4.1V-9B-Thinking",
|
| 1783 |
+
# "id": "THUDM/GLM-4.1V-9B-Thinking",
|
| 1784 |
+
# "description": "GLM-4.1V-9B-Thinking model for multimodal code generation with image support"
|
| 1785 |
+
# },
|
| 1786 |
+
# {
|
| 1787 |
+
# "name": "Qwen3-235B-A22B-Instruct-2507",
|
| 1788 |
+
# "id": "Qwen/Qwen3-235B-A22B-Instruct-2507",
|
| 1789 |
+
# "description": "Qwen3-235B-A22B-Instruct-2507 model for code generation and general tasks"
|
| 1790 |
+
# },
|
| 1791 |
+
# {
|
| 1792 |
+
# "name": "Qwen3-Coder-480B-A35B-Instruct",
|
| 1793 |
+
# "id": "Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
| 1794 |
+
# "description": "Qwen3-Coder-480B-A35B-Instruct model for advanced code generation and programming tasks"
|
| 1795 |
+
# },
|
| 1796 |
+
# {
|
| 1797 |
+
# "name": "Qwen3-32B",
|
| 1798 |
+
# "id": "Qwen/Qwen3-32B",
|
| 1799 |
+
# "description": "Qwen3-32B model for code generation and general tasks"
|
| 1800 |
+
# },
|
| 1801 |
+
# {
|
| 1802 |
+
# "name": "Qwen3-4B-Instruct-2507",
|
| 1803 |
+
# "id": "Qwen/Qwen3-4B-Instruct-2507",
|
| 1804 |
+
# "description": "Qwen3-4B-Instruct-2507 model for code generation and general tasks"
|
| 1805 |
+
# },
|
| 1806 |
+
# {
|
| 1807 |
+
# "name": "Qwen3-4B-Thinking-2507",
|
| 1808 |
+
# "id": "Qwen/Qwen3-4B-Thinking-2507",
|
| 1809 |
+
# "description": "Qwen3-4B-Thinking-2507 model with advanced reasoning capabilities for code generation and general tasks"
|
| 1810 |
+
# },
|
| 1811 |
+
# {
|
| 1812 |
+
# "name": "Qwen3-235B-A22B-Thinking",
|
| 1813 |
+
# "id": "Qwen/Qwen3-235B-A22B-Thinking-2507",
|
| 1814 |
+
# "description": "Qwen3-235B-A22B-Thinking model with advanced reasoning capabilities"
|
| 1815 |
+
# },
|
| 1816 |
+
# {
|
| 1817 |
+
# "name": "Qwen3-Next-80B-A3B-Thinking",
|
| 1818 |
+
# "id": "Qwen/Qwen3-Next-80B-A3B-Thinking",
|
| 1819 |
+
# "description": "Qwen3-Next-80B-A3B-Thinking model with advanced reasoning capabilities via Hyperbolic"
|
| 1820 |
+
# },
|
| 1821 |
+
# {
|
| 1822 |
+
# "name": "Qwen3-Next-80B-A3B-Instruct",
|
| 1823 |
+
# "id": "Qwen/Qwen3-Next-80B-A3B-Instruct",
|
| 1824 |
+
# "description": "Qwen3-Next-80B-A3B-Instruct model for code generation and general tasks via Hyperbolic"
|
| 1825 |
+
# },
|
| 1826 |
+
# {
|
| 1827 |
+
# "name": "Qwen3-30B-A3B-Instruct-2507",
|
| 1828 |
+
# "id": "qwen3-30b-a3b-instruct-2507",
|
| 1829 |
+
# "description": "Qwen3-30B-A3B-Instruct model via Alibaba Cloud DashScope API"
|
| 1830 |
+
# },
|
| 1831 |
+
# {
|
| 1832 |
+
# "name": "Qwen3-30B-A3B-Thinking-2507",
|
| 1833 |
+
# "id": "qwen3-30b-a3b-thinking-2507",
|
| 1834 |
+
# "description": "Qwen3-30B-A3B-Thinking model with advanced reasoning via Alibaba Cloud DashScope API"
|
| 1835 |
+
# },
|
| 1836 |
+
# {
|
| 1837 |
+
# "name": "Qwen3-Coder-30B-A3B-Instruct",
|
| 1838 |
+
# "id": "qwen3-coder-30b-a3b-instruct",
|
| 1839 |
+
# "description": "Qwen3-Coder-30B-A3B-Instruct model for advanced code generation via Alibaba Cloud DashScope API"
|
| 1840 |
+
# },
|
| 1841 |
+
# {
|
| 1842 |
+
# "name": "Qwen3-Coder-Plus-2025-09-23",
|
| 1843 |
+
# "id": "qwen3-coder-plus-2025-09-23",
|
| 1844 |
+
# "description": "Qwen3-Coder-Plus-2025-09-23 model - latest advanced code generation model via Alibaba Cloud DashScope API"
|
| 1845 |
+
# },
|
| 1846 |
+
# {
|
| 1847 |
+
# "name": "Cohere Command-A Reasoning 08-2025",
|
| 1848 |
+
# "id": "CohereLabs/command-a-reasoning-08-2025",
|
| 1849 |
+
# "description": "Cohere Labs Command-A Reasoning (Aug 2025) via Hugging Face InferenceClient"
|
| 1850 |
+
# },
|
| 1851 |
+
# {
|
| 1852 |
+
# "name": "StepFun Step-3",
|
| 1853 |
+
# "id": "step-3",
|
| 1854 |
+
# "description": "StepFun Step-3 model - AI chat assistant by 阶跃星辰 with multilingual capabilities"
|
| 1855 |
+
# },
|
| 1856 |
+
# {
|
| 1857 |
+
# "name": "Codestral 2508",
|
| 1858 |
+
# "id": "codestral-2508",
|
| 1859 |
+
# "description": "Mistral Codestral model - specialized for code generation and programming tasks",
|
| 1860 |
+
# "type": "mistral"
|
| 1861 |
+
# },
|
| 1862 |
+
# {
|
| 1863 |
+
# "name": "Mistral Medium 2508",
|
| 1864 |
+
# "id": "mistral-medium-2508",
|
| 1865 |
+
# "description": "Mistral Medium 2508 model via Mistral API for general tasks and coding",
|
| 1866 |
+
# "type": "mistral"
|
| 1867 |
+
# },
|
| 1868 |
+
# {
|
| 1869 |
+
# "name": "Magistral Medium 2509",
|
| 1870 |
+
# "id": "magistral-medium-2509",
|
| 1871 |
+
# "description": "Magistral Medium 2509 model via Mistral API for advanced code generation and reasoning",
|
| 1872 |
+
# "type": "mistral"
|
| 1873 |
+
# },
|
| 1874 |
+
# {
|
| 1875 |
+
# "name": "Gemini 2.5 Flash",
|
| 1876 |
+
# "id": "gemini-2.5-flash",
|
| 1877 |
+
# "description": "Google Gemini 2.5 Flash via OpenAI-compatible API"
|
| 1878 |
+
# },
|
| 1879 |
+
# {
|
| 1880 |
+
# "name": "Gemini 2.5 Pro",
|
| 1881 |
+
# "id": "gemini-2.5-pro",
|
| 1882 |
+
# "description": "Google Gemini 2.5 Pro via OpenAI-compatible API"
|
| 1883 |
+
# },
|
| 1884 |
+
# {
|
| 1885 |
+
# "name": "GPT-OSS-120B",
|
| 1886 |
+
# "id": "openai/gpt-oss-120b",
|
| 1887 |
+
# "description": "OpenAI GPT-OSS-120B model for advanced code generation and general tasks"
|
| 1888 |
+
# },
|
| 1889 |
+
# {
|
| 1890 |
+
# "name": "GPT-OSS-20B",
|
| 1891 |
+
# "id": "openai/gpt-oss-20b",
|
| 1892 |
+
# "description": "OpenAI GPT-OSS-20B model for code generation and general tasks"
|
| 1893 |
+
# },
|
| 1894 |
+
# {
|
| 1895 |
+
# "name": "GPT-5",
|
| 1896 |
+
# "id": "gpt-5",
|
| 1897 |
+
# "description": "OpenAI GPT-5 model for advanced code generation and general tasks"
|
| 1898 |
+
# },
|
| 1899 |
+
# {
|
| 1900 |
+
# "name": "Grok-4",
|
| 1901 |
+
# "id": "grok-4",
|
| 1902 |
+
# "description": "Grok-4 model via Poe (OpenAI-compatible) for advanced tasks"
|
| 1903 |
+
# },
|
| 1904 |
+
# {
|
| 1905 |
+
# "name": "Grok-Code-Fast-1",
|
| 1906 |
+
# "id": "Grok-Code-Fast-1",
|
| 1907 |
+
# "description": "Grok-Code-Fast-1 model via Poe (OpenAI-compatible) for fast code generation"
|
| 1908 |
+
# },
|
| 1909 |
+
# {
|
| 1910 |
+
# "name": "Claude-Opus-4.1",
|
| 1911 |
+
# "id": "claude-opus-4.1",
|
| 1912 |
+
# "description": "Anthropic Claude Opus 4.1 via Poe (OpenAI-compatible)"
|
| 1913 |
+
# },
|
| 1914 |
+
# {
|
| 1915 |
+
# "name": "Qwen3 Max Preview",
|
| 1916 |
+
# "id": "qwen3-max-preview",
|
| 1917 |
+
# "description": "Qwen3 Max Preview model via DashScope International API"
|
| 1918 |
+
# },
|
| 1919 |
+
# {
|
| 1920 |
+
# "name": "Qwen3-Max-2025-09-23",
|
| 1921 |
+
# "id": "qwen3-max-2025-09-23",
|
| 1922 |
+
# "description": "Qwen3-Max-2025-09-23 model - latest flagship model via Alibaba Cloud DashScope API"
|
| 1923 |
+
# },
|
| 1924 |
+
# {
|
| 1925 |
+
# "name": "Sonoma Dusk Alpha",
|
| 1926 |
+
# "id": "openrouter/sonoma-dusk-alpha",
|
| 1927 |
+
# "description": "OpenRouter Sonoma Dusk Alpha model with vision capabilities"
|
| 1928 |
+
# },
|
| 1929 |
+
# {
|
| 1930 |
+
# "name": "Sonoma Sky Alpha",
|
| 1931 |
+
# "id": "openrouter/sonoma-sky-alpha",
|
| 1932 |
+
# "description": "OpenRouter Sonoma Sky Alpha model with vision capabilities"
|
| 1933 |
+
# }
|
| 1934 |
]
|
| 1935 |
|
| 1936 |
# Default model selection
|
| 1937 |
+
DEFAULT_MODEL_NAME = "inclusionAI/Ling-flash-2.0"
|
| 1938 |
DEFAULT_MODEL = None
|
| 1939 |
for _m in AVAILABLE_MODELS:
|
| 1940 |
if _m.get("name") == DEFAULT_MODEL_NAME:
|