|
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.5.2 |
| 7 | +version: 1.5.1 |
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: |
@@ -1329,18 +1329,9 @@ async def _handle_streaming_response( |
1329 | 1329 | duration_s = int( |
1330 | 1330 | max(0, time.time() - (thinking_started_at or time.time())) |
1331 | 1331 | ) |
1332 | | - # Format each line with > for blockquote while preserving formatting |
1333 | | - thought_content = ''.join(thought_chunks).strip() |
1334 | | - quoted_lines = [] |
1335 | | - for line in thought_content.split('\n'): |
1336 | | - quoted_lines.append(f"> {line}") |
1337 | | - quoted_content = '\n'.join(quoted_lines) |
1338 | | - |
1339 | 1332 | details_block = f"""<details> |
1340 | | -<summary>Thought ({duration_s}s)</summary> |
1341 | | -
|
1342 | | -{quoted_content} |
1343 | | -
|
| 1333 | +<summary>Thinking ({duration_s}s)</summary> |
| 1334 | +{''.join(thought_chunks)} |
1344 | 1335 | </details>""".strip() |
1345 | 1336 |
|
1346 | 1337 | # Combine thoughts and answer (images not processed in streaming mode) |
@@ -1720,18 +1711,9 @@ async def get_response(): |
1720 | 1711 | # If we have thoughts, wrap them using <details> |
1721 | 1712 | if thought_segments: |
1722 | 1713 | duration_s = int(max(0, time.time() - start_ts)) |
1723 | | - # Format each line with > for blockquote while preserving formatting |
1724 | | - thought_content = ''.join(thought_segments).strip() |
1725 | | - quoted_lines = [] |
1726 | | - for line in thought_content.split('\n'): |
1727 | | - quoted_lines.append(f"> {line}") |
1728 | | - quoted_content = '\n'.join(quoted_lines) |
1729 | | - |
1730 | 1714 | details_block = f"""<details> |
1731 | | -<summary>Thought ({duration_s}s)</summary> |
1732 | | -
|
1733 | | -{quoted_content} |
1734 | | -
|
| 1715 | +<summary>Thinking ({duration_s}s)</summary> |
| 1716 | +{''.join(thought_segments)} |
1735 | 1717 | </details>""".strip() |
1736 | 1718 | full_response += details_block |
1737 | 1719 |
|
|
0 commit comments