summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/HuggingChat.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/HuggingChat.py')
-rw-r--r--g4f/Provider/HuggingChat.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/Provider/HuggingChat.py b/g4f/Provider/HuggingChat.py
index 11310a69..85f879f3 100644
--- a/g4f/Provider/HuggingChat.py
+++ b/g4f/Provider/HuggingChat.py
@@ -68,7 +68,7 @@ class HuggingChat(AsyncGeneratorProvider):
if "error" in data:
raise RuntimeError(data["error"])
elif isinstance(data, list):
- yield data[0]["generated_text"]
+ yield data[0]["generated_text"].strip()
else:
raise RuntimeError(f"Response: {data}")
else: