update
This commit is contained in:
@@ -317,15 +317,16 @@
|
||||
|
||||
<label for="llmProviderSelect">Provider:</label>
|
||||
<select id="llmProviderSelect">
|
||||
<option value="default">default</option>
|
||||
<option value="ollama">Ollama</option>
|
||||
<option value="openai">OpenAI</option>
|
||||
</select>
|
||||
|
||||
<label for="llmBaseUrlInput">Base URL:</label>
|
||||
<input type="text" id="llmBaseUrlInput" placeholder="输入API基础URL" value="http://localhost:11434">
|
||||
<input type="text" id="llmBaseUrlInput" placeholder="https://api.deepseek.com" value="">
|
||||
|
||||
<label for="llmModelInput">Model:</label>
|
||||
<input type="text" id="llmModelInput" placeholder="输入模型名称" value="qwen3.5:9b">
|
||||
<input type="text" id="llmModelInput" placeholder="deepseek-v4-flash" value="">
|
||||
|
||||
<label for="llmApiKeyInput">API Key:</label>
|
||||
<input type="password" id="llmApiKeyInput" placeholder="输入API密钥(如果需要)">
|
||||
@@ -897,13 +898,13 @@
|
||||
try {
|
||||
const config = JSON.parse(savedConfig);
|
||||
if (document.getElementById('llmProviderSelect')) {
|
||||
document.getElementById('llmProviderSelect').value = config.provider || 'ollama';
|
||||
document.getElementById('llmProviderSelect').value = config.provider || 'default';
|
||||
}
|
||||
if (document.getElementById('llmBaseUrlInput')) {
|
||||
document.getElementById('llmBaseUrlInput').value = config.base_url || 'http://localhost:11434';
|
||||
document.getElementById('llmBaseUrlInput').value = config.base_url || '';
|
||||
}
|
||||
if (document.getElementById('llmModelInput')) {
|
||||
document.getElementById('llmModelInput').value = config.model || 'qwen3.5:9b';
|
||||
document.getElementById('llmModelInput').value = config.model || '';
|
||||
}
|
||||
if (document.getElementById('llmApiKeyInput')) {
|
||||
document.getElementById('llmApiKeyInput').value = config.api_key || '';
|
||||
@@ -932,9 +933,9 @@
|
||||
|
||||
// 返回默认配置
|
||||
return {
|
||||
provider: 'ollama',
|
||||
base_url: 'http://localhost:11434',
|
||||
model: 'qwen3.5:9b',
|
||||
provider: 'default',
|
||||
base_url: '',
|
||||
model: '',
|
||||
api_key: ''
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user