Files

1 line
36 KiB
JSON

{"repo": "amoylab/unla", "files": {"web/src/config/llm-providers-adapter.ts": {"96f0bb64ece764949fef2d6bce9c40bfc94110f9": {"t": 1785595431.5935905, "n": 9160, "h": "37a8c95c6b1f7f4c", "c": "// Adapter functions to bridge old LLM provider system with new lobe-chat structure\n\nimport i18next from 'i18next';\n\nimport { AIChatModelCard } from '../types/ai-model';\nimport { BuiltinProviderTemplate, LLMModel, convertToLLMModel } from '../types/llm-legacy';\n\nimport { getModelsByProvider } from './ai-models';\nimport { DEFAULT_MODEL_PROVIDER_LIST } from './llm-providers/index';\n\n// Convert lobe-chat providers to old BuiltinProviderTemplate format\nconst convertLobeProviderToTemplate = (lobeProvider: {\n id: string;\n name: string;\n description?: string;\n url?: string;\n showApiKey?: boolean;\n checkModel?: string;\n}): BuiltinProviderTemplate => {\n return {\n id: lobeProvider.id,\n name: lobeProvider.name,\n logo: undefined, // Using lobehub/icons instead\n description: lobeProvider.description || `${lobeProvider.name} AI models`,\n website: lobeProvider.url,\n documentation: lobeProvider.url,\n settings: {\n showApiKey: lobeProvider.showApiKey !== false,\n showBaseURL: true,\n showOrganization: lobeProvider.id === 'openai',\n showTemperature: true,\n showTopP: true,\n showMaxTokens: true,\n showTimeout: true,\n allowClientFetch: true,\n defaultClientFetch: lobeProvider.id === 'ollama' || lobeProvider.id === 'lmstudio' || lobeProvider.id === 'vllm',\n apiKeyRequired: lobeProvider.showApiKey !== false && lobeProvider.id !== 'ollama',\n baseURLRequired: lobeProvider.id === 'azure' || lobeProvider.id === 'ollama' || lobeProvider.id === 'lmstudio' || lobeProvider.id === 'vllm',\n checkModel: lobeProvider.checkModel || getDefaultCheckModel(lobeProvider.id)\n },\n defaultModels: []\n };\n};\n\nconst getDefaultCheckModel = (providerId: string): string => {\n const checkModels: Record<string, string> = {\n 'openai': 'gpt-4o-mini',\n 'anthropic': 'claude-3-5-haiku-20241022',\n 'google': 'gemini-1.5-flash',\n 'azure': 'gpt-4o-mini',\n 'bedrock': 'anthropic.claude-3-5-sonnet-20241022-v2:0',\n 'deepseek': 'deepseek-chat',\n 'qwen': 'qwen-plus',\n 'moonshot': 'moonshot-v1-8k',\n 'zhipu': 'glm-4',\n 'baichuan': 'Baichuan2-Turbo',\n 'minimax': 'abab6.5s-chat',\n 'openrouter': 'openrouter/auto',\n 'huggingface': 'mistralai/Mistral-7B-Instruct-v0.3',\n 'groq': 'llama3-8b-8192',\n 'perplexity': 'llama-3.1-sonar-small-128k-online',\n 'ollama': 'llama3.1:8b',\n 'lmstudio': 'local-model',\n 'vllm': 'local-model',\n 'mistral': 'mistral-large-latest',\n 'cohere': 'command-r-plus',\n 'ai21': 'jamba-1.5-large',\n 'xai': 'grok-beta'\n };\n return checkModels[providerId] || 'gpt-3.5-turbo';\n};\n\n// Build BUILTIN_PROVIDERS from lobe-chat providers\nexport const BUILTIN_PROVIDERS: BuiltinProviderTemplate[] = DEFAULT_MODEL_PROVIDER_LIST.map(convertLobeProviderToTemplate);\n\n// Generate models from lobe-chat AI model configuration\nexport const getProviderModels = (providerId: string): LLMModel[] => {\n const aiModels = getModelsByProvider(providerId).filter(model => model.type === 'chat') as AIChatModelCard[];\n return aiModels.map(model => convertToLLMModel(model, providerId));\n};\n\n// Get provider template\nexport const getProviderTemplate = (providerId: string): BuiltinProviderTemplate | undefined => {\n return BUILTIN_PROVIDERS.find(provider => provider.id === providerId);\n};\n\n// Get all provider IDs\nexport const getAllProviderIds = (): string[] => {\n return BUILTIN_PROVIDERS.map(provider => provider.id);\n};\n\n// Get provider default configuration\nexport const getProviderDefaultConfig = (providerId: string) => {\n const template = getProviderTemplate(providerId);\n if (!template) return {};\n\n return {\n baseURL: getDefaultBaseURL(providerId),\n temperature: 0.7,\n topP: 1.0,\n maxTokens: 2048,\n timeout: 30000,\n fetchOnClient: template.settings.defaultClientFetch\n };\n};\n\nexport const getDefaultBaseURL = (providerId: string): string => {\n const baseURLs: Record<string, string> = {\n // OpenAI and compatible providers\n 'openai': 'https://api.openai.com/v1',\n \n // Anthropic\n 'anthropic': 'https://api.anthropic.com',\n \n // Google providers\n 'google': 'https://generativelanguage.googleapis.com',\n \n // DeepSeek\n 'deepseek': 'https://api.deepseek.com',\n \n // Groq\n 'groq': 'https://api.groq.com/openai/v1',\n \n // Mistral\n 'mistral': 'https://api.mistral.ai',\n \n // Perplexity\n 'perplexity': 'https://api.perplexity.ai',\n \n // OpenRouter\n 'openrouter': 'https://openrouter.ai/api/v1',\n \n // Cohere\n 'cohere': 'https://api.cohere.ai/compatibility/v1',\n \n // Nvidia\n 'nvidia': 'https://integrate.api.nvidia.com/v1',\n \n // Local/self-hosted providers\n 'ollama': 'http://localhost:11434',\n 'lmstudio': 'http://localhost:1234/v1',\n 'vllm': 'http://localhost:8000/v1',\n \n // Chinese providers\n 'qwen': 'https://dashscope.aliyuncs.com/compatible-mode/v1',\n 'moonshot': 'https://api.moonshot.cn/v1',\n 'siliconcloud': 'https://api.siliconflow.cn/v1',\n 'spark': 'https://spark-api-open.xf-yun.com/v1',\n 'qiniu': 'https://api.qnaigc.com/v1',\n 'search1api': 'https://api.search1api.com/v1',\n 'infiniai': 'https://cloud.infini-ai.com/maas/v1',\n 'sambanova': 'https://api.sambanova.ai/v1',\n 'jina': 'https://deepsearch.jina.ai/v1',\n 'xai': 'https://api.x.ai/v1',\n 'higress': 'https://127.0.0.1:8080/v1',\n 'xinference': 'http://localhost:9997/v1',\n \n // Additional Chinese providers (may need custom configuration)\n 'zhipu': '', // Users need to configure custom endpoint\n 'baichuan': '', // Users need to configure custom endpoint \n 'minimax': '', // Users need to configure custom endpoint\n \n // Providers requiring custom setup\n 'azure': '', // Will be set by user (custom endpoint)\n 'bedrock': '', // AWS Bedrock doesn't use standard base URL\n 'vertexai': '', // GCP Vertex AI doesn't use standard base URL\n 'huggingface': '', // HuggingFace uses model-specific URLs\n };\n return baseURLs[providerId] || '';\n};\n\n// Helper function to properly construct URLs without duplicate path segments\nexport const buildEndpointURL = (baseURL: string, path: string): string => {\n // Remove trailing slash from baseURL and leading slash from path\n const cleanBaseURL = baseURL.replace(/\\/$/, '');\n const cleanPath = path.replace(/^\\//, '');\n \n // Check if baseURL already ends with the path or part of it\n if (cleanBaseURL.endsWith(cleanPath)) {\n return cleanBaseURL;\n }\n \n // Check for partial overlaps (like /v1 in baseURL and /v1/chat/completions in path)\n const baseURLParts = cleanBaseURL.split('/');\n const pathParts = cleanPath.split('/');\n \n // Find overlapping segments from the end of baseURL and start of path\n let overlapIndex = 0;\n for (let i = 1; i <= Math.min(baseURLParts.length, pathParts.length); i++) {\n const baseEnd = baseURLParts.slice(-i).join('/');\n const pathStart = pathParts.slice(0, i).join('/');\n if (baseEnd === pathStart) {\n overlapIndex = i;\n }\n }\n \n if (overlapIndex > 0) {\n const remainingPath = pathParts.slice(overlapIndex).join('/');\n return remainingPath ? `${cleanBaseURL}/${remainingPath}` : cleanBaseURL;\n }\n \n return `${cleanBaseURL}/${cleanPath}`;\n};\n\n/**\n * Get a provider or model description with i18n support\n * @param key The i18n key to look up\n * @param fallback The fallback text to use if translation is not available\n * @param lng The language to use (optional)\n * @returns The translated text or fallback\n */\nfunction getI18nDescription(key: string, fallback: string, lng?: string): string {\n try {\n const translated = i18next.t(key, { lng });\n return translated === key ? fallback : translated;\n } catch {\n return fallback;\n }\n}\n\n/**\n * Get a provider description with i18n support\n * @param providerId The ID of the provider (e.g., 'openai', 'google', etc.)\n * @param fallback The fallback text to use if translation is not available\n * @param lng The language to use (optional)\n * @returns The translated text or fallback\n */\nexport const getProviderDescription = (providerId: string, fallback: string, lng?: string): string => {\n return getI18nDescription(`llm.providerDescriptions.${providerId}`, fallback, lng);\n};\n\n/**\n * Get a model description with i18n support\n * @param providerId The ID of the provider (e.g., 'openai', 'google', etc.)\n * @param modelId The ID of the model (e.g., 'gpt-4', 'palm', etc.)\n * @param fallback The fallback text to use if translation is not available\n * @param lng The language to use (optional)\n * @returns The translated text or fallback\n */\nexport const getModelDescription = (providerId: string, modelId: string, fallback: string, lng?: string): string => {\n // Try llm.modelDescriptions.{providerId}.{modelId} first, then llm.modelDescriptions.{modelId}\n const keyWithProvider = `llm.modelDescriptions.${providerId}.${modelId}`;\n const keyWithoutProvider = `llm.modelDescriptions.${modelId}`;\n const descWithProvider = getI18nDescription(keyWithProvider, '', lng);\n if (descWithProvider) return descWithProvider;\n return getI18nDescription(keyWithoutProvider, fallback, lng);\n};"}}, "web/src/config/ai-models/infiniai.ts": {"96f0bb64ece764949fef2d6bce9c40bfc94110f9": {"t": 1785595431.787376, "n": 11413, "h": "5e564d2e61d1b6aa", "c": "import { AIChatModelCard } from '@/types/ai-model';\n\n// https://cloud.infini-ai.com/genstudio/model\n// All models are currently free\n// Currently the platform doesn't support Function Call\n\nconst infiniaiChatModels: AIChatModelCard[] = [\n {\n abilities: {\n reasoning: true,\n },\n contextWindowTokens: 65_536,\n description:\n 'DeepSeek-R1 是一个专注于推理能力的大语言模型,通过创新的训练流程实现了与 OpenAI-o1 相当的数学、代码和推理任务表现。该模型采用了冷启动数据和大规模强化学习相结合的方式进行训练。',\n displayName: 'DeepSeek R1',\n enabled: true,\n id: 'deepseek-r1',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 65_536,\n description:\n 'DeepSeek-V3-0324 是一个强大的专家混合(MoE)语言模型,总参数量为 671B,每个 Token 激活 37B 参数。该模型采用多头潜在注意力(MLA)和 DeepSeekMoE 架构,实现了高效推理和经济训练,并在前代 DeepSeek-V3 的基础上显著提升了性能。',\n displayName: 'DeepSeek V3 0324',\n enabled: true,\n id: 'deepseek-v3',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n reasoning: true,\n },\n contextWindowTokens: 128_000,\n description:\n 'Qwen3-235B-A22B 是 Qwen 系列第三代的大型语言模型,采用混合专家(MoE)架构,总计 2350 亿参数,每 token 激活 220 亿参数。支持无缝切换思考模式(复杂推理)和非思考模式(通用对话),在数学、编码、常识推理及多语言指令执行中表现出色。',\n displayName: 'Qwen3 235B A22B',\n enabled: true,\n id: 'qwen3-235b-a22b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n reasoning: true,\n },\n contextWindowTokens: 128_000,\n description:\n 'Qwen3-30B-A3B 是 Qwen 系列第三代的大型语言模型,采用混合专家(MoE)架构,总计 305 亿参数,每 token 激活 33 亿参数。支持无缝切换思维模式(复杂推理)和非思维模式(通用对话),在数学、编码、常识推理及多语言指令执行中表现出色。',\n displayName: 'Qwen3 30B A3B',\n enabled: true,\n id: 'qwen3-30b-a3b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n reasoning: true,\n },\n contextWindowTokens: 128_000,\n description:\n 'Qwen3-32B 是 Qwen 系列第三代的大型语言模型,拥有 328 亿参数,专为高效推理和多语言任务设计。支持无缝切换思考模式(复杂推理)和非思考模式(通用对话),在数学、编码、常识推理及多语言指令执行中表现出色。',\n displayName: 'Qwen3 32B',\n enabled: true,\n id: 'qwen3-32b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n reasoning: true,\n },\n contextWindowTokens: 128_000,\n description:\n 'Qwen3-14B 是 Qwen 系列第三代的大型语言模型,拥有 148 亿参数,专为高效推理和多语言任务设计。支持无缝切换思维模式(复杂推理)和非思维模式(通用对话),在数学、编码、常识推理及多语言指令执行中表现出色。',\n displayName: 'Qwen3 14B',\n enabled: false,\n id: 'qwen3-14b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n reasoning: true,\n },\n contextWindowTokens: 128_000,\n description:\n 'Qwen3-8B 是 Qwen 系列第三代的大型语言模型,拥有 82 亿参数,专为高效推理和多语言任务设计。支持无缝切换思考模式(复杂推理)和非思考模式(通用对话),在数学、编码、常识推理及多语言指令执行中表现出色。',\n displayName: 'Qwen3 8B',\n enabled: false,\n id: 'qwen3-8b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n vision: true,\n },\n contextWindowTokens: 125_000,\n description:\n 'Qwen2.5-VL 系列模型提升了模型的智能水平、实用性和适用性,使其在自然对话、内容创作、专业知识服务及代码开发等场景中表现更优。旗舰模型 Qwen2.5-VL-72B-Instruct 在涵盖多个领域和任务的基准测试中展现出强大的竞争力,包括大学水平的问题解答、数学、文档理解、通用问答、视频理解以及视觉代理任务等。',\n displayName: 'Qwen2.5 VL 72B Instruct',\n enabled: true,\n id: 'qwen2.5-vl-72b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n vision: true,\n },\n contextWindowTokens: 125_000,\n description:\n 'Qwen2.5-VL 系列模型提升了模型的智能水平、实用性和适用性,使其在自然对话、内容创作、专业知识服务及代码开发等场景中表现更优。32B 版本使用了强化学习技术优化模型,与 Qwen2.5 VL 系列的其它模型相比,提供了更符合人类偏好的输出风格、复杂数学问题的推理能力,以及图像细粒度理解与推理能力。',\n displayName: 'Qwen2.5 VL 32B Instruct',\n enabled: true,\n id: 'qwen2.5-vl-32b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n vision: true,\n },\n contextWindowTokens: 125_000,\n description:\n 'Qwen2.5-VL 系列模型提升了模型的智能水平、实用性和适用性,使其在自然对话、内容创作、专业知识服务及代码开发等场景中表现更优。',\n displayName: 'Qwen2.5 VL 7B Instruct',\n id: 'qwen2.5-vl-7b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n },\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 72B Instruct',\n enabled: true,\n id: 'qwen2.5-72b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n },\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 32B Instruct',\n enabled: true,\n id: 'qwen2.5-32b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5-Coder 是最新的代码专用 Qwen 大型语言模型系列。Qwen2.5-Coder 在 CodeQwen1.5 的基础上带来了以下改进:\\n显著提升代码生成、代码推理和代码修复能力。\\n支持真实世界应用,例如代码代理,增强编码能力和数学及一般能力。\\n支持长上下文处理。',\n displayName: 'Qwen2.5 Coder 32B Instruct',\n id: 'qwen2.5-coder-32b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 14B Instruct',\n id: 'qwen2.5-14b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n },\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 7B Instruct',\n id: 'qwen2.5-7b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n abilities: {\n functionCall: true,\n reasoning: true,\n },\n contextWindowTokens: 65_536,\n description:\n 'QwQ 是 Qwen 系列的推理模型,相比传统指令调优模型,QwQ 具备思考和推理能力,在下游任务尤其是难题上能取得显著性能提升。QwQ-32B 是一款中等规模的推理模型,其性能可与最先进的推理模型相媲美,例如 DeepSeek-R1 和 o1-mini。',\n displayName: 'QwQ 32B',\n enabled: false,\n id: 'qwq-32b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'DeepSeek-R1-Distill-Qwen-32B 是基于 DeepSeek-R1 蒸馏而来的模型,在 Qwen2.5-32B 的基础上使用 DeepSeek-R1 生成的样本进行微调。该模型在各种基准测试中表现出色,保持了强大的推理能力。',\n displayName: 'DeepSeek R1 Distill Qwen 32B',\n enabled: false,\n id: 'deepseek-r1-distill-qwen-32b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 8192,\n description:\n 'Meta 发布的 LLaMA 3.3 多语言大规模语言模型(LLMs)是一个经过预训练和指令微调的生成模型,提供 70B 规模(文本输入/文本输出)。该模型使用超过 15T 的数据进行训练,支持英语、德语、法语、意大利语、葡萄牙语、印地语、西班牙语和泰语,知识更新截止于 2023 年 12 月。',\n displayName: 'LLaMA 3.3 70B',\n enabled: false,\n id: 'llama-3.3-70b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2 是 Qwen 团队推出的新一代大型语言模型系列。它基于 Transformer 架构,并采用 SwiGLU 激活函数、注意力 QKV 偏置(attention QKV bias)、群组查询注意力(group query attention)、滑动窗口注意力(mixture of sliding window attention)与全注意力的混合等技术。此外,Qwen 团队还改进了适应多种自然语言和代码的分词器。',\n displayName: 'Qwen 2 72B Instruct',\n id: 'qwen2-72b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2 是 Qwen 团队推出的新一代大型语言模型系列。它基于 Transformer 架构,并采用 SwiGLU 激活函数、注意力 QKV 偏置(attention QKV bias)、群组查询注意力(group query attention)、滑动窗口注意力(mixture of sliding window attention)与全注意力的混合等技术。此外,Qwen 团队还改进了适应多种自然语言和代码的分词器。',\n displayName: 'Qwen 2 7B Instruct',\n id: 'qwen2-7b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 4096,\n description:\n 'Yi-1.5 是 Yi 的升级版本。 它使用 500B Tokens 的高质量语料库在 Yi 上持续进行预训练,并在 3M 个多样化的微调样本上进行微调。',\n displayName: 'Yi-1.5 34B Chat',\n id: 'yi-1.5-34b-chat',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 16_384,\n description: 'GLM-4-9B-Chat 是智谱 AI 推出的最新一代预训练模型 GLM-4-9B 的人类偏好对齐版本。',\n displayName: 'GLM-4 9B Chat',\n id: 'glm-4-9b-chat',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 8192,\n description:\n 'ChatGLM3 是智谱 AI 与清华 KEG 实验室发布的闭源模型,经过海量中英标识符的预训练与人类偏好对齐训练,相比一代模型在 MMLU、C-Eval、GSM8K 分别取得了 16%、36%、280% 的提升,并登顶中文任务榜单 C-Eval。适用于对知识量、推理能力、创造力要求较高的场景,比如广告文案、小说写作、知识类写作、代码生成等。',\n displayName: 'ChatGLM3',\n id: 'chatglm3',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'ChatGLM3-6b-base 是由智谱开发的 ChatGLM 系列最新一代的 60 亿参数规模的开源的基础模型。',\n displayName: 'ChatGLM3 6B Base',\n id: 'chatglm3-6b-base',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 4096,\n description:\n 'Llama2 是由 Meta 开发并开源的大型语言模型(LLM)系列,这是一组从 70 亿到 700 亿参数不同规模、经过预训练和微调的生成式文本模型。架构层面,LLama2 是一个使用优化型转换器架构的自动回归语言模型。调整后的版本使用有监督的微调(SFT)和带有人类反馈的强化学习(RLHF)以对齐人类对有用性和安全性的偏好。Llama2 较 Llama 系列在多种学术数据集上有着更加不俗的表现,为大量其他模型提供了设计和开发的思路。',\n displayName: 'Llama 2 7B Chat',\n id: 'llama-2-7b-chat',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n {\n contextWindowTokens: 4096,\n description:\n 'Megrez-3B-Instruct 是由无问芯穹完全自主训练的大语言模型。Megrez-3B-Instruct 旨在通过软硬协同理念,打造一款极速推理、小巧精悍、极易上手的端侧智能解决方案。',\n displayName: 'Megrez 3B Instruct',\n id: 'megrez-3b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n type: 'chat',\n },\n];\n\nexport const allModels = [...infiniaiChatModels];\n\nexport default allModels;\n"}}, "web/src/config/llm-providers/infiniai.ts": {"96f0bb64ece764949fef2d6bce9c40bfc94110f9": {"t": 1785595433.791937, "n": 6170, "h": "2756d1aa73652ae1", "c": "import { ModelProviderCard } from '@/types/llm';\n\n// https://cloud.infini-ai.com/genstudio/model\n// All models are currently free\nconst InfiniAI: ModelProviderCard = {\n chatModels: [\n {\n contextWindowTokens: 65_536,\n description:\n 'DeepSeek-R1 是一个专注于推理能力的大语言模型,通过创新的训练流程实现了与 OpenAI-o1 相当的数学、代码和推理任务表现。该模型采用了冷启动数据和大规模强化学习相结合的方式进行训练。',\n displayName: 'DeepSeek R1',\n enabled: true,\n id: 'deepseek-r1',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 65_536,\n description:\n 'DeepSeek-V3 是一个强大的专家混合(MoE)语言模型,总参数量为 671B,每个 Token 激活 37B 参数。该模型采用多头潜在注意力(MLA)和 DeepSeekMoE 架构,实现了高效推理和经济训练。',\n displayName: 'DeepSeek V3',\n enabled: true,\n id: 'deepseek-v3',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 65_536,\n description:\n 'QwQ 是 Qwen 系列的推理模型,相比传统指令调优模型,QwQ 具备思考和推理能力,在下游任务尤其是难题上能取得显著性能提升。QwQ-32B 是一款中等规模的推理模型,其性能可与最先进的推理模型相媲美,例如 DeepSeek-R1 和 o1-mini。',\n displayName: 'QwQ',\n enabled: true,\n id: 'qwq-32b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'DeepSeek-R1-Distill-Qwen-32B 是基于 DeepSeek-R1 蒸馏而来的模型,在 Qwen2.5-32B 的基础上使用 DeepSeek-R1 生成的样本进行微调。该模型在各种基准测试中表现出色,保持了强大的推理能力。',\n displayName: 'DeepSeek R1 Distill Qwen 32B',\n enabled: true,\n id: 'deepseek-r1-distill-qwen-32b',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 72B Instruct',\n enabled: true,\n id: 'qwen2.5-72b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 32B Instruct',\n enabled: true,\n id: 'qwen2.5-32b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5-Coder 是最新的代码专用 Qwen 大型语言模型系列。Qwen2.5-Coder 在 CodeQwen1.5 的基础上带来了以下改进:\\n显著提升代码生成、代码推理和代码修复能力。\\n支持真实世界应用,例如代码代理,增强编码能力和数学及一般能力。\\n支持长上下文处理。',\n displayName: 'Qwen2.5 Coder 32B Instruct',\n enabled: true,\n id: 'qwen2.5-coder-32b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 14B Instruct',\n enabled: true,\n id: 'qwen2.5-14b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2.5 是 Qwen 大型语言模型系列的最新成果。Qwen2.5 发布了从 0.5 到 720 亿参数不等的基础语言模型及指令调优语言模型。Qwen2.5 相比 Qwen2 带来了以下改进:\\n显著增加知识量,在编程与数学领域的能力得到极大提升。\\n在遵循指令、生成长文本、理解结构化数据 (例如,表格) 以及生成结构化输出特别是 JSON 方面有显著提升。对系统提示的多样性更具韧性,增强了聊天机器人中的角色扮演实现和条件设定。\\n支持长上下文处理。\\n支持超过 29 种语言的多语言功能,包括中文、英语、法语、西班牙语、葡萄牙语、德语、意大利语、俄语、日语、韩语、越南语、泰语、阿拉伯语等。',\n displayName: 'Qwen2.5 7B Instruct',\n enabled: true,\n id: 'qwen2.5-7b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2 是 Qwen 团队推出的新一代大型语言模型系列。它基于 Transformer 架构,并采用 SwiGLU 激活函数、注意力 QKV 偏置(attention QKV bias)、群组查询注意力(group query attention)、滑动窗口注意力(mixture of sliding window attention)与全注意力的混合等技术。此外,Qwen 团队还改进了适应多种自然语言和代码的分词器。',\n displayName: 'Qwen 2 72B Instruct',\n enabled: true,\n id: 'qwen2-72b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 32_768,\n description:\n 'Qwen2 是 Qwen 团队推出的新一代大型语言模型系列。它基于 Transformer 架构,并采用 SwiGLU 激活函数、注意力 QKV 偏置(attention QKV bias)、群组查询注意力(group query attention)、滑动窗口注意力(mixture of sliding window attention)与全注意力的混合等技术。此外,Qwen 团队还改进了适应多种自然语言和代码的分词器。',\n displayName: 'Qwen 2 7B Instruct',\n enabled: true,\n id: 'qwen2-7b-instruct',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n {\n contextWindowTokens: 4096,\n description:\n 'Yi-1.5 是 Yi 的升级版本。 它使用 500B Tokens 的高质量语料库在 Yi 上持续进行预训练,并在 3M 个多样化的微调样本上进行微调。',\n displayName: 'Yi-1.5 34B Chat',\n enabled: true,\n id: 'yi-1.5-34b-chat',\n pricing: {\n currency: 'CNY',\n input: 0,\n output: 0,\n },\n },\n ],\n checkModel: 'qwen2.5-7b-instruct',\n description:\n '为应用开发者提供高性能、易上手、安全可靠的大模型服务,覆盖从大模型开发到大模型服务化部署的全流程。',\n id: 'infiniai',\n modelList: { showModelFetcher: true },\n modelsUrl: 'https://cloud.infini-ai.com/genstudio/model',\n name: 'InfiniAI',\n proxyUrl: {\n placeholder: 'https://cloud.infini-ai.com/maas/v1',\n },\n settings: {\n proxyUrl: {\n placeholder: 'https://cloud.infini-ai.com/maas/v1',\n },\n sdkType: 'openai',\n showModelFetcher: true,\n },\n url: 'https://cloud.infini-ai.com/genstudio',\n};\n\nexport default InfiniAI;\n"}}}}