Merge pull request #46 from paxionfull/feature/infiniai

feat: support infiniai
This commit is contained in:
WangYK
2025-03-06 16:43:29 +08:00
committed by GitHub
7 changed files with 27 additions and 1 deletions

View File

@ -15,7 +15,7 @@ Features:
Currently available providers: Currently available providers:
- AI: OpenAI compatible, SiliconFlow, DeepSeek, OpenRouter, Ollama and more - AI: OpenAI compatible, SiliconFlow, Infiniai, DeepSeek, OpenRouter, Ollama and more
- Web Search: Tavily (1000 free credits / month), Firecrawl (cloud / self-hosted) - Web Search: Tavily (1000 free credits / month), Firecrawl (cloud / self-hosted)
Please give a 🌟 Star if you like this project! Please give a 🌟 Star if you like this project!

View File

@ -51,6 +51,15 @@
link: 'https://cloud.siliconflow.cn/i/J0NHrrX8', link: 'https://cloud.siliconflow.cn/i/J0NHrrX8',
linkText: 'cloud.siliconflow.cn', linkText: 'cloud.siliconflow.cn',
}, },
{
label: t('settings.ai.providers.infiniai.title'),
help: 'settings.ai.providers.infiniai.description',
// Only kept for easy reference in i18n Ally
_help: t('settings.ai.providers.infiniai.description'),
value: 'infiniai',
link: 'https://cloud.infini-ai.com/genstudio/model?deepsearch',
linkText: 'cloud.infini-ai.com',
},
{ {
label: 'DeepSeek', label: 'DeepSeek',
value: 'deepseek', value: 'deepseek',

View File

@ -22,6 +22,7 @@ export const useAiModel = () => {
} else if ( } else if (
config.ai.provider === 'deepseek' || config.ai.provider === 'deepseek' ||
config.ai.provider === 'siliconflow' || config.ai.provider === 'siliconflow' ||
config.ai.provider === 'infiniai' ||
// Special case if model name includes 'deepseek' // Special case if model name includes 'deepseek'
// This ensures compatibilty with providers like Siliconflow // This ensures compatibilty with providers like Siliconflow
config.ai.model?.toLowerCase().includes('deepseek') config.ai.model?.toLowerCase().includes('deepseek')

View File

@ -4,6 +4,7 @@ import type { Locale } from '@/components/LangSwitcher.vue'
export type ConfigAiProvider = export type ConfigAiProvider =
| 'openai-compatible' | 'openai-compatible'
| 'siliconflow' | 'siliconflow'
| 'infiniai'
| 'openrouter' | 'openrouter'
| 'deepseek' | 'deepseek'
| 'ollama' | 'ollama'
@ -84,6 +85,9 @@ export const useConfigStore = defineStore('config', () => {
if (ai.provider === 'siliconflow') { if (ai.provider === 'siliconflow') {
return ai.apiBase || 'https://api.siliconflow.cn/v1' return ai.apiBase || 'https://api.siliconflow.cn/v1'
} }
if (ai.provider === 'infiniai') {
return ai.apiBase || 'https://cloud.infini-ai.com/maas/v1'
}
return ai.apiBase || 'https://api.openai.com/v1' return ai.apiBase || 'https://api.openai.com/v1'
}) })
const webSearchApiBase = computed(() => { const webSearchApiBase = computed(() => {

View File

@ -27,6 +27,10 @@
"siliconflow": { "siliconflow": {
"title": "SiliconFlow", "title": "SiliconFlow",
"description": "Offers ¥14 free credits on register. Get one API key at {0}." "description": "Offers ¥14 free credits on register. Get one API key at {0}."
},
"infiniai": {
"title": "Infiniai",
"description": "After registration, you can use the full-powered Deepseek R1 and other inference-accelerated models without any barriers. Generate an APIKEY after logging in at {0}."
} }
} }
}, },

View File

@ -27,6 +27,10 @@
"siliconflow": { "siliconflow": {
"title": "SiliconFlow", "title": "SiliconFlow",
"description": "Biedt ¥14 (€1,85) gratis credits bij registratie. Krijg één API-sleutel bij {0}." "description": "Biedt ¥14 (€1,85) gratis credits bij registratie. Krijg één API-sleutel bij {0}."
},
"infiniai": {
"title": "Infiniai",
"description": "Na registratie kunt u zonder drempels de volwaardige Deepseek R1 en andere inferentie-versnelde modellen gebruiken. Genereer een APIKEY na inloggen op {0}."
} }
} }
}, },

View File

@ -27,6 +27,10 @@
"siliconflow": { "siliconflow": {
"title": "SiliconFlow 硅基流动", "title": "SiliconFlow 硅基流动",
"description": "注册赠送 ¥14 元免费额度。在 {0} 生成一个 API key。" "description": "注册赠送 ¥14 元免费额度。在 {0} 生成一个 API key。"
},
"infiniai": {
"title": "Infiniai 无问芯穹",
"description": "注册后无门槛免费用deepseek r1满血等推理加速版模型。登录 {0} 后生成 APIKEY"
} }
} }
}, },