Fix line length
Create binding_options.py
Remove test property
Add dynamic binding options to CLI and environment config
Automatically generate command-line arguments and environment variable
support for all LLM provider bindings using BindingOptions. Add sample
.env generation and extensible framework for new providers.
Add example option definitions and fix test arg check in OllamaOptions
Add options_dict method to BindingOptions for argument parsing
Add comprehensive Ollama binding configuration options
ruff formatting Apply ruff formatting to binding_options.py
Add Ollama separate options for embedding and LLM
Refactor Ollama binding options and fix class var handling
The changes improve how class variables are handled in binding options
and better organize the Ollama-specific options into LLM and embedding
subclasses.
Fix typo in arg test.
Rename cls parameter to klass to avoid keyword shadowing
Fix Ollama embedding binding name typo
Fix ollama embedder context param name
Split Ollama options into LLM and embedding configs with mixin base
Add Ollama option configuration to LLM and embeddings in lightrag_server
Update sample .env generation and environment handling
Conditionally add env vars and cmdline options only when ollama bindings
are used. Add example env file for Ollama binding options.
- Add ollama_server_infos attribute to LightRAG class with default initialization
- Move default values to constants.py for centralized configuration
- Refactor OllamaServerInfos class with property accessors and CLI support
- Update OllamaAPI to get configuration through rag object instead of direct import
- Add command line arguments for simulated model name and tag
- Fix type imports to avoid circular dependencies
This commit renames the parameter 'llm_model_max_token_size' to 'summary_max_tokens' for better clarity, as it specifically controls the token limit for entity relation summaries.
- Add 9 environment variables to /health endpoint configuration section
- Centralize default constants in lightrag/constants.py for consistency
- Update config.py to use centralized defaults for better maintainability
- Refactor the trigger condition for LLM-based summarization of entities and relations. Instead of relying on character length, the summary is now triggered when the number of merged description fragments exceeds a configured threshold. This provides a more robust and logical condition for consolidation.
- Introduce the `OLLAMA_NUM_CTX` environment variable to explicitly configure the context window size (`num_ctx`) for Ollama models. This decouples the model's context length from the `MAX_TOKENS` parameter, which is now specifically used to limit input for summary generation, making the configuration clearer and more flexible.
- Updated `README` files, `env.example`, and default values to reflect these changes.
This commit introduces `lightrag/constants.py` to centralize default values for various configurations across the API and core components.
Key changes:
- Added `constants.py` to centralize default values
- Improved the `get_env_value` function in `api/config.py` to correctly handle string "None" as a None value and to catch `TypeError` during value conversion.
- Updated the default `SUMMARY_LANGUAGE` to "English"
- Set default `WORKERS` to 2
- Optimize JWT Auth module to load configuration via `global_args`.
- Decouple configuration-related code from `utils_api.py`, and add a new `config.py` file for unified configuration management.
- Adjust configuration import in `lightrag_server.py`, `auth.py`, and `document_routes.py` to be introduced through `global_args`.
- Use .env from current folder for each lightrag instance
- Allow different .env files for different instances
- Make OS env vars take precedence over .env file
- Add an `accounts` dictionary in `AuthHandler` to store multiple user account information.
- Modify login logic to support multiple user account verification.
- Update environment variable example, add description for `AUTH_ACCOUNTS` variable.
- Adjust authentication status check logic, use `auth_handler.accounts` to determine if authentication is configured.