summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordiaodeng <108243171+diaodeng@users.noreply.github.com>2024-01-18 03:55:44 +0100
committerGitHub <noreply@github.com>2024-01-18 03:55:44 +0100
commitdd955e575c794fd9e3081b4ffb6e63a1d954deb2 (patch)
treec1fe321b6e9cbe738d28f9a69c03c6e0970fd4e0
parentFeedback form - https://forms.gle/FeWV9RLEedfdkmFN6 (diff)
downloadgpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.tar
gpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.tar.gz
gpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.tar.bz2
gpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.tar.lz
gpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.tar.xz
gpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.tar.zst
gpt4free-dd955e575c794fd9e3081b4ffb6e63a1d954deb2.zip
-rw-r--r--g4f/Provider/Llama2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/Llama2.py b/g4f/Provider/Llama2.py
index 6d0c0a44..17969621 100644
--- a/g4f/Provider/Llama2.py
+++ b/g4f/Provider/Llama2.py
@@ -62,7 +62,7 @@ class Llama2(AsyncGeneratorProvider):
if not started:
chunk = chunk.lstrip()
started = True
- yield chunk.decode()
+ yield chunk.decode(errors="ignore")
def format_prompt(messages: Messages):
messages = [
@@ -71,4 +71,4 @@ def format_prompt(messages: Messages):
else message["content"]
for message in messages
]
- return "\n".join(messages) + "\n" \ No newline at end of file
+ return "\n".join(messages) + "\n"