From 5c35f566ef7c1e701b937128affbcadb885bcf83 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sun, 1 Dec 2024 12:15:31 +0100 Subject: [PATCH] gemini: strip mimetype --- gemini.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gemini.py b/gemini.py index 3a0ef72..d3c69d0 100644 --- a/gemini.py +++ b/gemini.py @@ -126,6 +126,8 @@ def handle_content(resp: SuccessResponse) -> str: except ValueError: mime_type = resp.meta + mime_type = mime_type.strip() + if mime_type == "text/gemini": return resp.data().strip() else: