summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/HuggingChat.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner.lohaus@netformic.com>2023-09-09 23:07:00 +0200
committerHeiner Lohaus <heiner.lohaus@netformic.com>2023-09-09 23:07:00 +0200
commitddb6fa30d9b0a5c0c7a611969c9439b39a597214 (patch)
treec54215cc6f57f2f3c49160cfe705fc38f20a8a8d /g4f/Provider/HuggingChat.py
parent~ (diff)
downloadgpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.tar
gpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.tar.gz
gpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.tar.bz2
gpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.tar.lz
gpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.tar.xz
gpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.tar.zst
gpt4free-ddb6fa30d9b0a5c0c7a611969c9439b39a597214.zip
Diffstat (limited to '')
-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: