File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,12 @@ def to_markdown(self) -> str:
8989 parts = []
9090 for item in self .content :
9191 if "text" in item :
92- parts .append (item ["text" ])
92+ parts .append (f" \n ``` \n { item ["text" ]} \n ``` \n " )
9393 elif "image" in item :
9494 parts .append (f"" )
9595
9696 markdown = f"### { self .role .capitalize ()} \n "
97- markdown += "\n \n --- \n \n " .join (parts )
97+ markdown += "\n " .join (parts )
9898
9999 # if self.role == "tool":
100100 # assert self.tool_call_id is not None, "Tool call ID is required for tool messages"
@@ -509,6 +509,7 @@ def __init__(
509509
510510 def _call_api (self , messages : list [dict | MessageBuilder ]) -> dict :
511511 input = []
512+
512513 for msg in messages :
513514 input .extend (msg .prepare_message () if isinstance (msg , MessageBuilder ) else [msg ])
514515
You can’t perform that action at this time.
0 commit comments