Fix the errors with parsing

This commit is contained in:
Anton Osika
2023-06-18 22:34:25 +02:00
parent 89d9b6e356
commit 8180f0346c
7 changed files with 26 additions and 33 deletions

View File

@@ -55,6 +55,7 @@ class AI:
msg = delta.get("content", "")
print(msg, end="")
chat.append(msg)
print()
messages = messages + [{"role": "assistant", "content": "".join(chat)}]
logger.debug(f"Chat completion finished: {messages}")
return messages