mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	get rid of silly ollamaIsEnabled
This commit is contained in:
		| @@ -790,9 +790,9 @@ export default class LlmChatPanel extends BasicWidget { | |||||||
|                 enabledProviders.push('anthropic'); |                 enabledProviders.push('anthropic'); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             // Ollama is enabled if the setting is true |             // Ollama is enabled if base URL is set | ||||||
|             const ollamaEnabled = options.is('ollamaEnabled'); |             const ollamaBaseUrl = options.get('ollamaBaseUrl'); | ||||||
|             if (ollamaEnabled) { |             if (ollamaBaseUrl) { | ||||||
|                 enabledProviders.push('ollama'); |                 enabledProviders.push('ollama'); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -287,10 +287,9 @@ export async function initializeDefaultProviders() { | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // Register Ollama provider if enabled |         // Register Ollama provider if base URL is configured | ||||||
|         if (await options.getOptionBool('ollamaEnabled')) { |         const ollamaBaseUrl = await options.getOption('ollamaBaseUrl'); | ||||||
|             const ollamaBaseUrl = await options.getOption('ollamaBaseUrl') || 'http://localhost:11434'; |         if (ollamaBaseUrl) { | ||||||
|  |  | ||||||
|             // Use specific embedding models if available |             // Use specific embedding models if available | ||||||
|             const embeddingModel = await options.getOption('ollamaEmbeddingModel') || 'nomic-embed-text'; |             const embeddingModel = await options.getOption('ollamaEmbeddingModel') || 'nomic-embed-text'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -189,7 +189,7 @@ const defaultOptions: DefaultOption[] = [ | |||||||
|     { name: "anthropicBaseUrl", value: "https://api.anthropic.com/v1", isSynced: true }, |     { name: "anthropicBaseUrl", value: "https://api.anthropic.com/v1", isSynced: true }, | ||||||
|     { name: "ollamaEnabled", value: "false", isSynced: true }, |     { name: "ollamaEnabled", value: "false", isSynced: true }, | ||||||
|     { name: "ollamaDefaultModel", value: "llama3", isSynced: true }, |     { name: "ollamaDefaultModel", value: "llama3", isSynced: true }, | ||||||
|     { name: "ollamaBaseUrl", value: "http://localhost:11434", isSynced: true }, |     { name: "ollamaBaseUrl", value: "", isSynced: true }, | ||||||
|     { name: "ollamaEmbeddingModel", value: "nomic-embed-text", isSynced: true }, |     { name: "ollamaEmbeddingModel", value: "nomic-embed-text", isSynced: true }, | ||||||
|     { name: "embeddingAutoUpdateEnabled", value: "true", isSynced: true }, |     { name: "embeddingAutoUpdateEnabled", value: "true", isSynced: true }, | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user