def send_message(
        self,
        message: str,
        event_handler: Optional[SessionEventHandler] = None,
        files: Optional[List[Dict[Literal["name", "path", "content"], Any]]] = None,
    ) -> Round:
        """
        Send a message.
        :param message: The message.
        :param event_handler: The event handler.
        :param files: The files.
        :return: The chat round.
        """
        # init span with session_id
        self.tracing.set_span_attribute("session_id", self.session_id)
        self.tracing.set_span_attribute("message", message)
        self.tracing.set_span_attribute("files", str(files))

        message_prefix = ""
        if files is not None:
            file_names: List[str] = []
            for file_info in files:
                file_name = file_info["name"]
                file_path = file_info.get("path", None)
                file_content = file_info.get("content", None)
                file_names.append(self._upload_file(file_name, file_path, file_content))
            if len(file_names) > 0:
                message_prefix += f"files added: {', '.join(file_names)}.\n"

        with self.event_emitter.handle_events_ctx(event_handler):
            chat_round = self._send_text_message(message_prefix + message)

            self.tracing.set_span_attribute("round_id", chat_round.id)
            if chat_round.state != "finished":
                self.tracing.set_span_status("ERROR", "Chat round is not finished successfully.")
            else:
                self.tracing.set_span_attribute("reply_to_user", chat_round.post_list[-1].message)

            return chat_round

        Send a message.
        :param message: The message.
        :param event_handler: The event handler.
        :param files: The files.
        :return: The chat round.
        
taskweaver/session/session.py