Feat: 调用本地 Ollama
This commit is contained in:
+3
-2
@@ -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 = "未配置大模型,先摘录原文";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user