feat: add Gemini preset template for LLM settings (#97)
* feat: add Gemini preset template for LLM settings * docs: add comment explaining Gemini /openai suffix requirement * feat: update Gemini preset to use latest 3-pro and 3-flash models * docs: improve comment to reference backend client.py implementation
This commit is contained in:
@@ -50,6 +50,16 @@ const presets = computed(() => [
|
||||
model_name: 'anthropic/claude-3.5-sonnet',
|
||||
fast_model_name: 'google/gemini-3-flash'
|
||||
},
|
||||
{
|
||||
name: t('llm.presets.gemini'),
|
||||
// Note: The `/openai` suffix is required to use Google's OpenAI-compatible API.
|
||||
// Our backend (src/utils/llm/client.py) uses OpenAI-compatible format with
|
||||
// Bearer token auth and /chat/completions endpoint, so we need this suffix
|
||||
// to make Google API accept OpenAI-style requests instead of native Gemini format.
|
||||
base_url: 'https://generativelanguage.googleapis.com/v1beta/openai/',
|
||||
model_name: 'gemini-3-pro-preview',
|
||||
fast_model_name: 'gemini-3-flash-preview'
|
||||
},
|
||||
{
|
||||
name: t('llm.presets.ollama'),
|
||||
base_url: 'http://localhost:11434/v1',
|
||||
@@ -286,6 +296,7 @@ onMounted(() => {
|
||||
<li><a href="https://platform.deepseek.com/" target="_blank">{{ t('llm.help_links.deepseek') }}</a></li>
|
||||
<li><a href="https://openrouter.ai/" target="_blank">{{ t('llm.help_links.openrouter') }}</a></li>
|
||||
<li><a href="https://cloud.siliconflow.cn/" target="_blank">{{ t('llm.help_links.siliconflow') }}</a></li>
|
||||
<li><a href="https://aistudio.google.com/" target="_blank">{{ t('llm.help_links.gemini') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -109,13 +109,15 @@
|
||||
"deepseek": "DeepSeek",
|
||||
"siliconflow": "SiliconFlow",
|
||||
"openrouter": "OpenRouter",
|
||||
"gemini": "Gemini",
|
||||
"ollama": "Ollama (Local)"
|
||||
},
|
||||
"help_links": {
|
||||
"qwen": "Aliyun Bailian (Qwen / Recommended)",
|
||||
"deepseek": "DeepSeek Platform (Fast & Cheap)",
|
||||
"openrouter": "OpenRouter (All-in-one, Recommended)",
|
||||
"siliconflow": "SiliconFlow (Domestic Aggregation)"
|
||||
"siliconflow": "SiliconFlow (Domestic Aggregation)",
|
||||
"gemini": "Google AI Studio (Gemini)"
|
||||
}
|
||||
},
|
||||
"game_start": {
|
||||
|
||||
@@ -109,13 +109,15 @@
|
||||
"deepseek": "DeepSeek",
|
||||
"siliconflow": "硅基流动",
|
||||
"openrouter": "OpenRouter",
|
||||
"gemini": "Gemini",
|
||||
"ollama": "Ollama (本地)"
|
||||
},
|
||||
"help_links": {
|
||||
"qwen": "阿里云百炼 (Qwen / 最推荐)",
|
||||
"deepseek": "DeepSeek 开放平台 (国内推荐,便宜)",
|
||||
"openrouter": "OpenRouter (全机型聚合,推荐)",
|
||||
"siliconflow": "硅基流动 (国内聚合)"
|
||||
"siliconflow": "硅基流动 (国内聚合)",
|
||||
"gemini": "Google AI Studio (Gemini)"
|
||||
}
|
||||
},
|
||||
"game_start": {
|
||||
|
||||
Reference in New Issue
Block a user