chore: add openai pre-settings

This commit is contained in:
bridge
2026-01-27 23:13:34 +08:00
parent 3947dfde7b
commit 54714a5ace
3 changed files with 32 additions and 0 deletions

View File

@@ -26,6 +26,12 @@ const modeOptions = computed(() => [
])
const presets = computed(() => [
{
name: t('llm.presets.openai'),
base_url: 'https://api.openai.com/v1',
model_name: 'gpt-4o',
fast_model_name: 'gpt-4o-mini'
},
{
name: t('llm.presets.qwen'),
base_url: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
@@ -282,6 +288,9 @@ onMounted(() => {
<div class="help-section">
<h4>{{ t('llm.help.q3_title') }}</h4>
<p>{{ t('llm.help.q3_content') }}</p>
<div class="format-note">
<p>{{ t('llm.help.q3_format_note') }}</p>
</div>
<div class="code-block">
<p>{{ t('llm.help.q3_base_url') }}</p>
<p>{{ t('llm.help.q3_api_key') }}</p>
@@ -292,6 +301,7 @@ onMounted(() => {
<div class="help-section">
<h4>{{ t('llm.help.q4_title') }}</h4>
<ul class="link-list">
<li><a href="https://platform.openai.com/" target="_blank">{{ t('llm.help_links.openai') }}</a></li>
<li><a href="https://bailian.console.aliyun.com/" target="_blank">{{ t('llm.help_links.qwen') }}</a></li>
<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>
@@ -601,6 +611,22 @@ onMounted(() => {
margin: 0;
}
.format-note {
background: #1a1f2e;
border: 1px solid #4a5a7a;
border-left: 0.3em solid #ffa500;
border-radius: 0.5em;
padding: 0.8em 1em;
margin: 0.8em 0;
}
.format-note p {
margin: 0;
color: #ffd700;
font-size: 0.9em;
line-height: 1.5;
}
.code-block {
background: #111;
border: 1px solid #2a2a2a;

View File

@@ -95,6 +95,7 @@
"q2_gemini": "Produced by Google, top-tier comprehensive performance.",
"q3_title": "📝 3. How to fill configuration?",
"q3_content": "Once you have an API, you need to fill in these three core parameters. Usually, you can find them in the provider's documentation:",
"q3_format_note": "⚠️ Important: This game only supports OpenAI-compatible API format. Services that don't support OpenAI-compatible format cannot be used. We recommend using the presets (they are all confirmed compatible). If you want to use other services, please confirm they provide OpenAI-compatible interfaces.",
"q3_base_url": "API Base URL: The entry point to AI, usually provided by the vendor (e.g., https://api.deepseek.com).",
"q3_api_key": "API Key: Your identity credential, like an account password.",
"q3_model_name": "Model Name: Tell the server which 'brain' to use, e.g., deepseek-chat or gemini-3-flash-preview.",
@@ -105,6 +106,7 @@
"confirm": "I understand"
},
"presets": {
"openai": "OpenAI",
"qwen": "Qwen",
"deepseek": "DeepSeek",
"siliconflow": "SiliconFlow",
@@ -113,6 +115,7 @@
"ollama": "Ollama (Local)"
},
"help_links": {
"openai": "OpenAI Platform",
"qwen": "Aliyun Bailian (Qwen / Recommended)",
"deepseek": "DeepSeek Platform (Fast & Cheap)",
"openrouter": "OpenRouter (All-in-one, Recommended)",

View File

@@ -95,6 +95,7 @@
"q2_gemini": "Google 出品,综合性能顶尖。",
"q3_title": "📝 3. 如何填入配置?",
"q3_content": "获得 API 后你需要填入以下三大核心参数才能使用通常你可以在api提供方的文档中找到 these 参数怎么填:",
"q3_format_note": "⚠️ 重要提示:本游戏仅支持 OpenAI 兼容格式的 API。如果某个服务不支持 OpenAI 兼容格式,将无法使用。推荐使用预设中的服务(它们都已确认兼容)。如需使用其他服务,请确认其提供 OpenAI 兼容接口。",
"q3_base_url": "API Base URL (接口地址): AI 的访问大门,通常由厂商提供 (如 https://api.deepseek.com)。",
"q3_api_key": "API Key (密钥): 你的身份凭证,就像账号密码。",
"q3_model_name": "Model Name (模型名称): 告诉服务器你想用哪颗大脑,如 deepseek-chat 或 gemini-3-flash-preview。",
@@ -105,6 +106,7 @@
"confirm": "我明白了"
},
"presets": {
"openai": "OpenAI",
"qwen": "通义千问",
"deepseek": "DeepSeek",
"siliconflow": "硅基流动",
@@ -113,6 +115,7 @@
"ollama": "Ollama (本地)"
},
"help_links": {
"openai": "OpenAI Platform",
"qwen": "阿里云百炼 (Qwen / 最推荐)",
"deepseek": "DeepSeek 开放平台 (国内推荐,便宜)",
"openrouter": "OpenRouter (全机型聚合,推荐)",