|
4 | 4 | author_url: https://github.com/owndev/ |
5 | 5 | project_url: https://github.com/owndev/Open-WebUI-Functions |
6 | 6 | funding_url: https://github.com/sponsors/owndev |
7 | | -version: 1.6.5 |
| 7 | +version: 1.6.6 |
8 | 8 | license: Apache License 2.0 |
9 | 9 | description: Highly optimized Google Gemini pipeline with advanced image generation capabilities, intelligent compression, and streamlined processing workflows. |
10 | 10 | features: |
@@ -158,14 +158,14 @@ class Valves(BaseModel): |
158 | 158 | default=os.getenv("GOOGLE_API_VERSION", "v1alpha"), |
159 | 159 | description="API version to use for Google Generative AI (e.g., v1alpha, v1beta, v1).", |
160 | 160 | ) |
161 | | - THINKING_ENABLED: bool = Field( |
162 | | - default=os.getenv("GOOGLE_THINKING_ENABLED", "true").lower() == "true", |
163 | | - description="Enable Gemini thinking outputs (set false to disable).", |
164 | | - ) |
165 | 161 | STREAMING_ENABLED: bool = Field( |
166 | 162 | default=os.getenv("GOOGLE_STREAMING_ENABLED", "true").lower() == "true", |
167 | 163 | description="Enable streaming responses (set false to force non-streaming mode).", |
168 | 164 | ) |
| 165 | + INCLUDE_THOUGHTS: bool = Field( |
| 166 | + default=os.getenv("GOOGLE_INCLUDE_THOUGHTS", "true").lower() == "true", |
| 167 | + description="Enable Gemini thoughts outputs (set false to disable).", |
| 168 | + ) |
169 | 169 | USE_VERTEX_AI: bool = Field( |
170 | 170 | default=os.getenv("GOOGLE_GENAI_USE_VERTEXAI", "false").lower() == "true", |
171 | 171 | description="Whether to use Google Cloud Vertex AI instead of the Google Generative AI API.", |
@@ -1423,9 +1423,9 @@ def _configure_generation( |
1423 | 1423 |
|
1424 | 1424 | # Enable Gemini "Thinking" when requested (default: on) and supported by the model |
1425 | 1425 | include_thoughts = body.get("include_thoughts", True) |
1426 | | - if not self.valves.THINKING_ENABLED: |
| 1426 | + if not self.valves.INCLUDE_THOUGHTS: |
1427 | 1427 | include_thoughts = False |
1428 | | - self.log.debug("Thinking disabled via GOOGLE_THINKING_ENABLED") |
| 1428 | + self.log.debug("Thoughts disabled via GOOGLE_INCLUDE_THOUGHTS") |
1429 | 1429 |
|
1430 | 1430 | if include_thoughts and self._check_thinking_support(model_id): |
1431 | 1431 | try: |
|
0 commit comments