Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pipelines/google/google_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,15 @@ class Valves(BaseModel):
description="Maximum time in seconds to wait for video generation before timing out (0=no limit).",
)

TEXT_THOUGHT: str = Field(
default=os.getenv("GOOGLE_TEXT_THOUGHT", "Thought"),
description="Text shown as 'Thought'.",
)
TEXT_THINKING: str = Field(
default=os.getenv("GOOGLE_TEXT_THINKING", "Thinking"),
description="Text shown as 'Thinking'.",
)

# ---------------- Internal Helpers ---------------- #
async def _gather_history_images(
self,
Expand Down Expand Up @@ -2685,7 +2694,7 @@ async def emit_chat_event(event_type: str, data: Dict[str, Any]) -> None:
"type": "status",
"data": {
"action": "thinking",
"description": f"Thinking… {preview}",
"description": f"{self.valves.TEXT_THINKING}… {preview}",
"done": False,
"hidden": False,
},
Expand Down Expand Up @@ -2734,7 +2743,7 @@ async def emit_chat_event(event_type: str, data: Dict[str, Any]) -> None:
quoted_content = "\n".join(quoted_lines)

details_block = f"""<details>
<summary>Thought ({duration_s}s)</summary>
<summary>{self.valves.TEXT_THOUGHT} ({duration_s}s)</summary>

{quoted_content}

Expand Down Expand Up @@ -3339,7 +3348,7 @@ async def get_response():
quoted_content = "\n".join(quoted_lines)

details_block = f"""<details>
<summary>Thought ({duration_s}s)</summary>
<summary>{self.valves.TEXT_THOUGHT} ({duration_s}s)</summary>

{quoted_content}

Expand Down