mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Debug ollama
This commit is contained in:
parent
13322ad134
commit
0848cdcc0b
1 changed files with 2 additions and 1 deletions
|
@ -94,7 +94,8 @@ async def ollama_stream_reader(response: httpx.Response) -> typing.AsyncGenerato
|
||||||
# Each chunk is a JSON string
|
# Each chunk is a JSON string
|
||||||
try:
|
try:
|
||||||
yield json.loads(chunk.strip().decode("utf-8", "replace"))
|
yield json.loads(chunk.strip().decode("utf-8", "replace"))
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError as e:
|
||||||
|
print("Failed to decode chunk %r: %r" % (chunk, e), file=sys.stderr)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue