Feat: 调用本地 Ollama

This commit is contained in:
2026-10-12 11:28:37 +08:00
parent c1a3461c49
commit 5d7228ebed
6 changed files with 98 additions and 43 deletions
+3 -2
View File
@@ -125,7 +125,7 @@ function setBusy(busy) {
docContent.disabled = !state.ready;
saveDoc.disabled = !state.ready;
pickFile.disabled = !state.ready;
sendButton.textContent = busy ? "检索中" : "提问";
sendButton.textContent = busy ? "回答中" : "提问";
}
function renderStatus(data) {
@@ -148,7 +148,8 @@ function renderStatus(data) {
const llm = el("span", "pill");
if (data.llm_ready) {
llm.classList.add("is-ok");
llm.textContent = `生成模型 ${data.llm_model}`;
const where = data.llm_provider === "ollama" ? "局域网 Ollama" : "生成模型";
llm.textContent = `${where} · ${data.llm_model}`;
} else {
llm.textContent = "未配置大模型,先摘录原文";
}