From 3947463e9345cb68780d71a02b938df6cc090dd9 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sat, 31 May 2025 15:00:20 +0800 Subject: [PATCH] feat(librechat): add example settings= --- modules/nixos/server/librechat/default.nix | 27 +++++++++++++++++++++- systems/x86_64-linux/apollo/default.nix | 24 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/modules/nixos/server/librechat/default.nix b/modules/nixos/server/librechat/default.nix index 3ffa85e..3f20e60 100644 --- a/modules/nixos/server/librechat/default.nix +++ b/modules/nixos/server/librechat/default.nix @@ -19,7 +19,32 @@ in example = # nix '' { - + version = "1.0.8"; + cache = true; + interface = { + privacyPolicy = { + externalUrl = "https://librechat.ai/privacy-policy"; + openNewTab = true; + }; + }; + endpoints = { + custom = [ + { + name = "OpenRouter"; + # Note that the following $ should be escaped with a backslash, not ''' + apiKey = "''${OPENROUTER_KEY}"; + baseURL = "https://openrouter.ai/api/v1"; + models = { + default = ["meta-llama/llama-3-70b-instruct"]; + fetch = true; + }; + titleConvo = true; + titleModule = "meta-llama/llama-3-70b-instruct"; + dropParams = ["stop"]; + modelDisplayLabel = "OpenRouter"; + } + ]; + }; } ''; description = "A free-form attribute set that will be written to librechat.yaml."; diff --git a/systems/x86_64-linux/apollo/default.nix b/systems/x86_64-linux/apollo/default.nix index 5d068fb..83c2777 100644 --- a/systems/x86_64-linux/apollo/default.nix +++ b/systems/x86_64-linux/apollo/default.nix @@ -32,6 +32,30 @@ mongodbURI = "mongodb://apollo:27017"; settings = { version = "1.0.8"; + cache = true; + interface = { + privacyPolicy = { + externalUrl = "https://librechat.ai/privacy-policy"; + openNewTab = true; + }; + }; + endpoints = { + custom = [ + { + name = "OpenRouter"; + apiKey = "\${OPENROUTER_KEY}"; + baseURL = "https://openrouter.ai/api/v1"; + models = { + default = [ "meta-llama/llama-3-70b-instruct" ]; + fetch = true; + }; + titleConvo = true; + titleModule = "meta-llama/llama-3-70b-instruct"; + dropParams = [ "stop" ]; + modelDisplayLabel = "OpenRouter"; + } + ]; + }; }; auth = { allowEmailLogin = true;