summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-01-20 18:37:30 +0100
committerGitHub <noreply@github.com>2024-01-20 18:37:30 +0100
commitbdf65cf99f330bd17aab19d6a9eda82b2448d3f0 (patch)
treec1fe321b6e9cbe738d28f9a69c03c6e0970fd4e0 /g4f/Provider
parentFeedback form - https://forms.gle/FeWV9RLEedfdkmFN6 (diff)
parentLlama2.py result decode error (diff)
downloadgpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.tar
gpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.tar.gz
gpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.tar.bz2
gpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.tar.lz
gpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.tar.xz
gpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.tar.zst
gpt4free-bdf65cf99f330bd17aab19d6a9eda82b2448d3f0.zip
Diffstat (limited to 'g4f/Provider')
-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"