From 0bef5fb6fa82d8db808923200b94731c18c17390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MANSUY?= Date: Thu, 4 Dec 2025 19:14:29 +0800 Subject: [PATCH] cherry-pick 6686edfd --- lightrag/llm/binding_options.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lightrag/llm/binding_options.py b/lightrag/llm/binding_options.py index e2f94649..b3affb37 100644 --- a/lightrag/llm/binding_options.py +++ b/lightrag/llm/binding_options.py @@ -228,7 +228,7 @@ class BindingOptions: argdef = { "argname": f"{args_prefix}-{field.name}", "env_name": f"{env_var_prefix}{field.name.upper()}", - "type": _resolve_optional_type(field.type), + "type": _resolve_optional_type(field.type), "default": default_value, "help": f"{cls._binding_name} -- " + help.get(field.name, ""), } @@ -486,9 +486,9 @@ class GeminiLLMOptions(BindingOptions): presence_penalty: float = 0.0 frequency_penalty: float = 0.0 stop_sequences: List[str] = field(default_factory=list) - response_mime_type: str | None = None + seed: int | None = None + thinking_config: dict | None = None safety_settings: dict | None = None - system_instruction: str | None = None _help: ClassVar[dict[str, str]] = { "temperature": "Controls randomness (0.0-2.0, higher = more creative)", @@ -498,10 +498,10 @@ class GeminiLLMOptions(BindingOptions): "candidate_count": "Number of candidates returned per request", "presence_penalty": "Penalty for token presence (-2.0 to 2.0)", "frequency_penalty": "Penalty for token frequency (-2.0 to 2.0)", - "stop_sequences": 'Stop sequences (JSON array of strings, e.g., \'["END"]\')', - "response_mime_type": "Desired MIME type for the response (e.g., application/json)", + "stop_sequences": "Stop sequences (JSON array of strings, e.g., '[\"END\"]')", + "seed": "Random seed for reproducible generation (leave empty for random)", + "thinking_config": "Thinking configuration (JSON dict, e.g., '{\"thinking_budget\": 1024}' or '{\"include_thoughts\": true}')", "safety_settings": "JSON object with Gemini safety settings overrides", - "system_instruction": "Default system instruction applied to every request", }