@@ -196,6 +196,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
196196 self ._context_token = None
197197
198198 def __copy__ (self ):
199+ """Use self.clone. Copies the current session but keeps references to the backend and context."""
199200 new = MelleaSession (backend = self .backend , ctx = self .ctx )
200201 new ._session_logger = self ._session_logger
201202 # Explicitly don't copy over the _context_token.
@@ -206,7 +207,7 @@ def clone(self):
206207 """Useful for running multiple generation requests while keeping the context at a given point in time.
207208
208209 Returns:
209- a copy of the current session. Keeps the context, backend, backend stack, and session logger.
210+ a copy of the current session. Keeps the context, backend, and session logger.
210211
211212 Examples:
212213 >>> from mellea import start_session
@@ -286,7 +287,6 @@ def act(
286287 Returns:
287288 A ModelOutputThunk if `return_sampling_results` is `False`, else returns a `SamplingResult`.
288289 """
289-
290290 r = mfuncs .act (
291291 action ,
292292 context = self .ctx ,
@@ -571,7 +571,6 @@ async def aact(
571571 Returns:
572572 A ModelOutputThunk if `return_sampling_results` is `False`, else returns a `SamplingResult`.
573573 """
574-
575574 r = await mfuncs .aact (
576575 action ,
577576 context = self .ctx ,
@@ -664,7 +663,6 @@ async def ainstruct(
664663 tool_calls: If true, tool calling is enabled.
665664 images: A list of images to be used in the instruction or None if none.
666665 """
667-
668666 r = await mfuncs .ainstruct (
669667 description ,
670668 context = self .ctx ,
@@ -704,7 +702,6 @@ async def achat(
704702 tool_calls : bool = False ,
705703 ) -> Message :
706704 """Sends a simple chat message and returns the response. Adds both messages to the Context."""
707-
708705 result , context = await mfuncs .achat (
709706 content = content ,
710707 context = self .ctx ,
@@ -731,7 +728,6 @@ async def avalidate(
731728 input : CBlock | None = None ,
732729 ) -> list [ValidationResult ]:
733730 """Validates a set of requirements over the output (if provided) or the current context (if the output is not provided)."""
734-
735731 return await mfuncs .avalidate (
736732 reqs = reqs ,
737733 context = self .ctx ,
@@ -787,8 +783,10 @@ async def atransform(
787783 """Transform method for creating a new object with the transformation applied.
788784
789785 Args:
790- obj : The object to be queried. It should be an instance of MObject or can be converted to one if necessary.
786+ obj: The object to be queried. It should be an instance of MObject or can be converted to one if necessary.
791787 transformation: The string representing the query to be executed against the object.
788+ format: format for output parsing; usually not needed with transform.
789+ model_options: Model options to pass to the backend.
792790
793791 Returns:
794792 ModelOutputThunk|Any: The result of the transformation as processed by the backend. If no tools were called,
0 commit comments