mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Add ollama download shortcut to vector storage
This commit is contained in:
		| @@ -1502,6 +1502,13 @@ jQuery(async () => { | |||||||
|         saveSettingsDebounced(); |         saveSettingsDebounced(); | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|  |     $('#vectors_ollama_pull').on('click', (e) => { | ||||||
|  |         const presetModel = extension_settings.vectors.ollama_model || ''; | ||||||
|  |         e.preventDefault(); | ||||||
|  |         $('#ollama_download_model').trigger('click'); | ||||||
|  |         $('#dialogue_popup_input').val(presetModel); | ||||||
|  |     }); | ||||||
|  |  | ||||||
|     const validSecret = !!secret_state[SECRET_KEYS.NOMICAI]; |     const validSecret = !!secret_state[SECRET_KEYS.NOMICAI]; | ||||||
|     const placeholder = validSecret ? '✔️ Key saved' : '❌ Missing key'; |     const placeholder = validSecret ? '✔️ Key saved' : '❌ Missing key'; | ||||||
|     $('#api_key_nomicai').attr('placeholder', placeholder); |     $('#api_key_nomicai').attr('placeholder', placeholder); | ||||||
|   | |||||||
| @@ -32,8 +32,11 @@ | |||||||
|                     <input id="vectors_ollama_keep" type="checkbox" /> |                     <input id="vectors_ollama_keep" type="checkbox" /> | ||||||
|                     <span data-i18n="Keep model in memory">Keep model in memory</span> |                     <span data-i18n="Keep model in memory">Keep model in memory</span> | ||||||
|                 </label> |                 </label> | ||||||
|                 <i data-i18n="Hint: Download models and set the URL in the API connection settings."> |                 <div> | ||||||
|                     Hint: Download models and set the URL in the API connection settings. |                     The model must be downloaded first! Do it with the <code>ollama pull</code> command or <a href="#" id="vectors_ollama_pull">click here</a>. | ||||||
|  |                 </div> | ||||||
|  |                 <i data-i18n="Hint: Set the URL in the API connection settings."> | ||||||
|  |                     Hint: Set the URL in the API connection settings. | ||||||
|                 </i> |                 </i> | ||||||
|             </div> |             </div> | ||||||
|             <div class="flex-container flexFlowColumn" id="llamacpp_vectorsModel"> |             <div class="flex-container flexFlowColumn" id="llamacpp_vectorsModel"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user