MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / create_new_instance

Method create_new_instance

camel/messages/base.py:167–182  ·  view source on GitHub ↗

r"""Create a new instance of the :obj:`BaseMessage` with updated content. Args: content (str): The new content value. Returns: BaseMessage: The new instance of :obj:`BaseMessage`.

(self, content: str)

Source from the content-addressed store, hash-verified

165 )
166
167 def create_new_instance(self, content: str) -> "BaseMessage":
168 r"""Create a new instance of the :obj:`BaseMessage` with updated
169 content.
170
171 Args:
172 content (str): The new content value.
173
174 Returns:
175 BaseMessage: The new instance of :obj:`BaseMessage`.
176 """
177 return self.__class__(
178 role_name=self.role_name,
179 role_type=self.role_type,
180 meta_dict=self.meta_dict,
181 content=content,
182 )
183
184 def __add__(self, other: Any) -> Union["BaseMessage", Any]:
185 r"""Addition operator override for :obj:`BaseMessage`.

Callers 6

reduce_stepMethod · 0.95
__add__Method · 0.95
__mul__Method · 0.95
reduce_stepMethod · 0.95
_set_tool_agentsMethod · 0.45
set_output_languageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected