Auto tagging obsidian notes w/ AI
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add OpenRouter as a dedicated AI provider

Co-authored-by: jaspermayone <65788728+jaspermayone@users.noreply.github.com>

+20
+1
src/i18n/locales/ar.json
··· 8 8 "openai": "OpenAI (GPT)", 9 9 "mistral": "Mistral AI", 10 10 "google": "Google (Gemini)", 11 + "openrouter": "OpenRouter", 11 12 "custom": "نقطة نهاية مخصصة (متوافقة مع OpenAI)" 12 13 }, 13 14 "customEndpoint": {
+1
src/i18n/locales/de.json
··· 8 8 "openai": "OpenAI (GPT)", 9 9 "mistral": "Mistral AI", 10 10 "google": "Google (Gemini)", 11 + "openrouter": "OpenRouter", 11 12 "custom": "Benutzerdefinierter Endpunkt (OpenAI-kompatibel)" 12 13 }, 13 14 "customEndpoint": {
+1
src/i18n/locales/en.json
··· 8 8 "openai": "OpenAI (GPT)", 9 9 "mistral": "Mistral AI", 10 10 "google": "Google (Gemini)", 11 + "openrouter": "OpenRouter", 11 12 "custom": "Custom Endpoint (OpenAI Compatible)" 12 13 }, 13 14 "customEndpoint": {
+1
src/i18n/locales/es.json
··· 8 8 "openai": "OpenAI (GPT)", 9 9 "mistral": "Mistral AI", 10 10 "google": "Google (Gemini)", 11 + "openrouter": "OpenRouter", 11 12 "custom": "Endpoint personalizado (Compatible con OpenAI)" 12 13 }, 13 14 "customEndpoint": {
+13
src/models/constants.ts
··· 63 63 defaultModel: "gemini-1.5-flash", 64 64 apiKeyUrl: "https://aistudio.google.com/app/apikey", 65 65 }, 66 + [AIProvider.OpenRouter]: { 67 + apiUrl: "https://openrouter.ai/api/v1/chat/completions", 68 + models: [ 69 + { id: "anthropic/claude-3.5-sonnet", name: "Claude 3.5 Sonnet" }, 70 + { id: "openai/gpt-4o", name: "GPT-4o" }, 71 + { id: "openai/gpt-4-turbo", name: "GPT-4 Turbo" }, 72 + { id: "google/gemini-pro-1.5", name: "Gemini Pro 1.5" }, 73 + { id: "meta-llama/llama-3.1-70b-instruct", name: "Llama 3.1 70B" }, 74 + { id: "mistralai/mistral-large", name: "Mistral Large" }, 75 + ], 76 + defaultModel: "anthropic/claude-3.5-sonnet", 77 + apiKeyUrl: "https://openrouter.ai/keys", 78 + }, 66 79 [AIProvider.Custom]: { 67 80 apiUrl: "", 68 81 models: [{ id: "custom-model", name: "Custom Model" }],
+1
src/models/types.ts
··· 5 5 OpenAI = "openai", 6 6 Mistral = "mistral", 7 7 Google = "google", 8 + OpenRouter = "openrouter", 8 9 Custom = "custom", 9 10 } 10 11
+1
src/services/tagGenerator.ts
··· 54 54 55 55 case AIProvider.OpenAI: 56 56 case AIProvider.Mistral: 57 + case AIProvider.OpenRouter: 57 58 case AIProvider.Custom: 58 59 const endpoint = 59 60 settings.provider === AIProvider.Custom
+1
src/ui/AITaggerSettingTab.ts
··· 39 39 .addOption(AIProvider.OpenAI, i18n.t("settings.provider.openai")) 40 40 .addOption(AIProvider.Mistral, i18n.t("settings.provider.mistral")) 41 41 .addOption(AIProvider.Google, i18n.t("settings.provider.google")) 42 + .addOption(AIProvider.OpenRouter, i18n.t("settings.provider.openrouter")) 42 43 .addOption(AIProvider.Custom, i18n.t("settings.provider.custom")) 43 44 .setValue(this.plugin.settings.provider) 44 45 .onChange(async (value) => {