Skip to content

Build your personal knowledge base with Trilium Notes

fix(desktop): stream not working on Electron

Elian Doranf2d67d412844
diff --git a/apps/server/src/routes/routes.ts b/apps/server/src/routes/routes.ts
index 21779abc4e..eb78d500e9 100644
--- a/apps/server/src/routes/routes.ts
+++ b/apps/server/src/routes/routes.ts
@@ -330,7 +330,7 @@ function register(app: express.Application) {
apiRoute(GET, "/api/script/relation/:noteId/:relationName", scriptRoute.getRelationBundles);
// LLM chat endpoints
- asyncRoute(PST, "/api/llm-chat/stream", [auth.checkApiAuth, csrfMiddleware], llmChatRoute.streamChat, null);
+ asyncRoute(PST, "/api/llm-chat/stream", [auth.checkApiAuthOrElectron, csrfMiddleware], llmChatRoute.streamChat, null);
apiRoute(GET, "/api/llm-chat/models", llmChatRoute.getModels);
// no CSRF since this is called from android app