all repos — nixfiles @ 7887562056c43d711ef28d2e286311046338ab35

System and user configuration, managed by nix and home-manager

local-llm: set zed edit prediction URL

Alin
commit

7887562056c43d711ef28d2e286311046338ab35

parent

22440978a7fd9f58c03707a7ee8dc8ba3df4295b

1 file changed, 17 insertions(+), 1 deletion(-)

changed files
M user/settings/local-llm.nix → user/settings/local-llm.nix
@@ -1,4 +1,11 @@
-{ ... }: +{ + config, + ... +}: +let + srv = config.services.llama-swap; + apiBase = "http://${srv.listenAddress}:${toString srv.port}"; +in { imports = [ ../modules/llama-swap.nix
@@ -8,5 +15,14 @@ services.llama-swap = {
enable = true; listenAddress = "[::1]"; port = 11343; + }; + + programs.zed-editor.userSettings = { + edit_predictions = { + open_ai_compatible_api = { + api_url = "${apiBase}/v1/completions"; + }; + provider = "open_ai_compatible_api"; + }; }; }