Account for None type content messages in tools

This commit is contained in:
Quinlan Jager 2025-05-03 01:02:11 -07:00
parent 99bec73f2e
commit 10ea9baad6

View file

@ -654,7 +654,10 @@ class Coder:
def get_cur_message_text(self):
text = ""
for msg in self.cur_messages:
text += msg["content"] + "\n"
# For some models the content is None if the message
# contains tool calls.
content = msg["content"] or ""
text += content + "\n"
return text
def get_ident_mentions(self, text):