Skip to content

LMPs return a 3-tuple when exempt_from_tracking=True #394

Open
@jwang-paradise

Description

@jwang-paradise

LMPs registered with @ell.simple/complex/tool return different shapes with different exempt_from_tracking settings.

For example, when exempt_from_tracking=False, LMP returns a message as expected:

@ell.complex(...)
def complex_lmp(message_history: list[Message]) -> list[Message]: ...

resp_message = complex_lmp(message_history)

But when exempt_from_tracking=True, LMP returns a 3 tuple:

@ell.complex(..., exempt_from_tracking=True)
def complex_lmp_EXEMPTED(message_history: list[Message]) -> list[Message]: ...

resp_message, final_call_params, api_metadata = complex_lmp_EXEMPTED(message_history)
# unexpectedly got a 3 tuple

The docs should really mention this weird side effect. Took me quite a while to figure it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions