Add OpenRouter chat provider; fix Windows load errors (0.17.0).
- OpenRouter as an alternative chat provider: server-side API key (settings.json or OPENROUTER_API_KEY), model list with vision marks and filter, SSE streaming, images as data URLs. Memory embeddings stay on Ollama; park/warm LLM are no-ops for the remote provider. - AssistentSaveKnowledgeAttach: JArray param is not supported by SwarmUI API reflection and aborted registration of every later API call; use string[]. - SQLite bootstrap: preload native e_sqlite3 for the current OS/arch (win/osx/linux) and resolve DllImport to it. - settings.json: shared-read + atomic write with retry to avoid Windows sharing violations. - csproj: fix MSB4012 in the native SQLite copy target. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f2b92e96ca
commit
d67f5e396e
@@ -92,7 +92,7 @@
|
||||
<option value="write_prompt">Написать промпт</option>
|
||||
</select>
|
||||
<span class="sa-mode-badge" id="sa_mode_badge" title="Активный pack">обычный</span>
|
||||
<select id="sa_model" class="sa-select sa-model-select" title="Модель Ollama (чат)" aria-label="Модель Ollama">
|
||||
<select id="sa_model" class="sa-select sa-model-select" title="Модель чата" aria-label="Модель чата">
|
||||
<option value="">Загрузка моделей…</option>
|
||||
</select>
|
||||
</div>
|
||||
@@ -179,7 +179,26 @@
|
||||
<div class="sa-skills-box" id="sa_skills_box"></div>
|
||||
</div>
|
||||
<div class="sa-spane" data-spane="models" hidden>
|
||||
<p class="sa-settings-hint">Ollama и модель эмбеддингов для крафт-памяти.</p>
|
||||
<p class="sa-settings-hint">Провайдер чата и модель эмбеддингов для крафт-памяти. Память всегда считается через Ollama.</p>
|
||||
<label>Провайдер чата
|
||||
<select id="sa_provider" class="sa-select">
|
||||
<option value="ollama">Ollama (локально)</option>
|
||||
<option value="openrouter">OpenRouter</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="sa-openrouter-box" id="sa_openrouter_box" hidden>
|
||||
<label>OpenRouter API key
|
||||
<input type="password" id="sa_openrouter_key" autocomplete="off" spellcheck="false" placeholder="sk-or-v1-…" />
|
||||
</label>
|
||||
<div class="sa-settings-row">
|
||||
<button type="button" class="basic-button sa-primary" id="sa_btn_openrouter_key_save">Сохранить ключ</button>
|
||||
<button type="button" class="basic-button sa-danger-btn" id="sa_btn_openrouter_key_clear">Удалить ключ</button>
|
||||
<span class="sa-settings-health" id="sa_openrouter_key_status">Ключ не задан</span>
|
||||
</div>
|
||||
<label>Фильтр моделей
|
||||
<input type="text" id="sa_openrouter_filter" autocomplete="off" spellcheck="false" placeholder="например: claude, gpt, qwen, :free" />
|
||||
</label>
|
||||
</div>
|
||||
<label>Ollama URL <input type="text" id="sa_base_url" value="http://127.0.0.1:11434" /></label>
|
||||
<label>Модель чата
|
||||
<select id="sa_settings_chat_model" class="sa-select" title="Синхрон с шапкой">
|
||||
@@ -194,7 +213,7 @@
|
||||
<div class="sa-settings-row">
|
||||
<button type="button" class="basic-button" id="sa_btn_refresh_models">Обновить модели</button>
|
||||
<button type="button" class="basic-button" id="sa_btn_refresh_inventory">Обновить inventory</button>
|
||||
<button type="button" class="basic-button" id="sa_btn_settings_health">Проверить Ollama</button>
|
||||
<button type="button" class="basic-button" id="sa_btn_settings_health">Проверить связь</button>
|
||||
</div>
|
||||
<div class="sa-settings-health" id="sa_settings_health_line">Ollama · …</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user