diff --git a/chatmastermind/ais/openai.py b/chatmastermind/ais/openai.py index a8ceb34..e3ce5a6 100644 --- a/chatmastermind/ais/openai.py +++ b/chatmastermind/ais/openai.py @@ -150,7 +150,7 @@ class OpenAI(AI): for message in chat.messages: if message.answer: prompt_tokens += append('user', message.question) - prompt_tokens += append('assistant', message.answer) + prompt_tokens += append('assistant', str(message.answer)) if question: prompt_tokens += append('user', question.question) return oai_chat, prompt_tokens