mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-01 03:21:02 +00:00
Llama2.py result decode error
This commit is contained in:
parent
b955620aeb
commit
dd955e575c
@ -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"
|
||||
return "\n".join(messages) + "\n"
|
||||
|
Loading…
Reference in New Issue
Block a user