Skip to content

Commit 10ea9ba

Browse files
committed
Account for None type content messages in tools
1 parent 99bec73 commit 10ea9ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aider/coders/base_coder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,10 @@ def get_read_only_files_content(self):
654654
def get_cur_message_text(self):
655655
text = ""
656656
for msg in self.cur_messages:
657-
text += msg["content"] + "\n"
657+
# For some models the content is None if the message
658+
# contains tool calls.
659+
content = msg["content"] or ""
660+
text += content + "\n"
658661
return text
659662

660663
def get_ident_mentions(self, text):

0 commit comments

Comments
 (0)