From 645f81f7c8b0fdbd571efc464a9ee46c0d55e51b Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 29 Jul 2025 09:52:25 +0800 Subject: [PATCH] fixes a critical bug where Ollama options were not being applied correctly `dict.update()` modifies the dictionary in-place and returns `None`. --- lightrag/api/lightrag_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 48d3d739..fe092557 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -363,7 +363,7 @@ def create_app(args): llm_model_kwargs={ "host": args.llm_binding_host, "timeout": args.timeout, - "options": {"num_ctx": args.ollama_num_ctx}.update(OllamaLLMOptions.options_dict(args)), + "options": OllamaLLMOptions.options_dict(args), "api_key": args.llm_binding_api_key, } if args.llm_binding == "lollms" or args.llm_binding == "ollama"