Vectors WebLLM (#3631)

* Add WebLLM support for vectorization

* Load models when WebLLM extension installed

* Consistency updated

* Move checkWebLlm to initEngine

* Refactor vector request handling to use getAdditionalArgs

* Add error handling for unsupported WebLLM extension

* Add prefix to error causes
This commit is contained in:
Cohee
2025-03-09 00:51:44 +02:00
committed by GitHub
parent 0ea64050ff
commit 1cb9287684
5 changed files with 227 additions and 10 deletions
@@ -21,8 +21,24 @@
<option value="openai">OpenAI</option>
<option value="togetherai">TogetherAI</option>
<option value="vllm">vLLM</option>
<option value="webllm" data-i18n="WebLLM Extension">WebLLM Extension</option>
</select>
</div>
<div class="flex-container flexFlowColumn" id="webllm_vectorsModel">
<label for="vectors_webllm_model" data-i18n="Vectorization Model">
Vectorization Model
</label>
<div class="flex-container">
<select id="vectors_webllm_model" class="text_pole flex1">
</select>
<div id="vectors_webllm_load" class="menu_button menu_button_icon" title="Verify and load the selected model.">
<i class="fa-solid fa-check-to-slot"></i>
</div>
</div>
<div>
Requires the WebLLM extension to be installed. Click <a href="#" id="vectors_webllm_install">here</a> to install.
</div>
</div>
<div class="flex-container flexFlowColumn" id="ollama_vectorsModel">
<label for="vectors_ollama_model" data-i18n="Vectorization Model">
Vectorization Model