Skip to content

Build your personal knowledge base with Trilium Notes

move providers to their own folder

perf3ctff679b00b6f4
diff --git a/src/routes/routes.ts b/src/routes/routes.ts
index ba1f8b7d18..b461b7be93 100644
--- a/src/routes/routes.ts
+++ b/src/routes/routes.ts
@@ -76,7 +76,7 @@ import etapiBackupRoute from "../etapi/backup.js";
import apiDocsRoute from "./api_docs.js";
-const MAX_ALLOWED_FILE_SIZE_MB = 250;
+const MAX_ALLOWED_FILE_SIZE_MB = 100000;
const GET = "get",
PST = "post",
PUT = "put",
diff --git a/src/services/llm/ai_service_manager.ts b/src/services/llm/ai_service_manager.ts
index b30cfe5b10..8d4331d1b2 100644
--- a/src/services/llm/ai_service_manager.ts
+++ b/src/services/llm/ai_service_manager.ts
@@ -1,8 +1,8 @@
import options from '../options.js';
import type { AIService, ChatCompletionOptions, ChatResponse, Message } from './ai_interface.js';
-import { OpenAIService } from './openai_service.js';
-import { AnthropicService } from './anthropic_service.js';
-import { OllamaService } from './ollama_service.js';
+import { OpenAIService } from './providers/openai_service.js';
+import { AnthropicService } from './providers/anthropic_service.js';
+import { OllamaService } from './providers/ollama_service.js';
import log from '../log.js';
type ServiceProviders = 'openai' | 'anthropic' | 'ollama';
diff --git a/src/services/llm/anthropic_service.ts b/src/services/llm/providers/anthropic_service.ts
similarity index 96%
rename from src/services/llm/anthropic_service.ts
rename to src/services/llm/providers/anthropic_service.ts
index c49865b8f1..167ddb2942 100644
--- a/src/services/llm/anthropic_service.ts
+++ b/src/services/llm/providers/anthropic_service.ts
@@ -1,6 +1,6 @@
-import options from '../options.js';
-import { BaseAIService } from './base_ai_service.js';
-import type { ChatCompletionOptions, ChatResponse, Message } from './ai_interface.js';
+import options from '../../options.js';
+import { BaseAIService } from '../base_ai_service.js';
+import type { ChatCompletionOptions, ChatResponse, Message } from '../ai_interface.js';
export class AnthropicService extends BaseAIService {
constructor() {
diff --git a/src/services/llm/ollama_service.ts b/src/services/llm/providers/ollama_service.ts
similarity index 99%
rename from src/services/llm/ollama_service.ts
rename to src/services/llm/providers/ollama_service.ts
index 1c726441b0..6776113f7f 100644
--- a/src/services/llm/ollama_service.ts
+++ b/src/services/llm/providers/ollama_service.ts
@@ -1,6 +1,6 @@
-import options from '../options.js';
-import { BaseAIService } from './base_ai_service.js';
-import type { ChatCompletionOptions, ChatResponse, Message } from './ai_interface.js';
+import options from '../../options.js';
+import { BaseAIService } from '../base_ai_service.js';
+import type { ChatCompletionOptions, ChatResponse, Message } from '../ai_interface.js';
export class OllamaService extends BaseAIService {
constructor() {
diff --git a/src/services/llm/openai_service.ts b/src/services/llm/providers/openai_service.ts
similarity index 95%
rename from src/services/llm/openai_service.ts
rename to src/services/llm/providers/openai_service.ts
index 3a664077d4..f645f3433c 100644
--- a/src/services/llm/openai_service.ts
+++ b/src/services/llm/providers/openai_service.ts
@@ -1,6 +1,6 @@
-import options from '../options.js';
-import { BaseAIService } from './base_ai_service.js';
-import type { ChatCompletionOptions, ChatResponse, Message } from './ai_interface.js';
+import options from '../../options.js';
+import { BaseAIService } from '../base_ai_service.js';
+import type { ChatCompletionOptions, ChatResponse, Message } from '../ai_interface.js';
export class OpenAIService extends BaseAIService {
constructor() {