================================== Showing Messages in LabOps ================================== The Artificial SDK provides two functions for showing simple messages in LabOps: :func:`~artificial.workflows.runtime.show_info` and :func:`~artificial.workflows.runtime.show_warning`. When these actions run, the messages will show up as popups in LabOps. They will also persist in the activity log. Info Messages ============= You should use :func:`~artificial.workflows.runtime.show_info` to show informative messages in LabOps. Info Message-only ----------------- .. code-block:: python from artificial.workflows.decorators import workflow from artificial.workflows.runtime import show_info @workflow('Show Info Example', 'show_info_workflow', 'lab_id') async def show_info_workflow() -> None: await show_info("message") shows this popup: .. image:: _static/show_info.png and shows up in the log like this: .. image:: _static/show_info_log.png Message and title ----------------- .. code-block:: python from artificial.workflows.decorators import workflow from artificial.workflows.runtime import show_info @workflow('Show Info Example', 'show_info_workflow', 'lab_id') async def show_info_workflow() -> None: await show_info("message", "title") shows this popup: .. image:: _static/show_info_with_title.png and shows up in the logs like this: .. image:: _static/show_info_with_title_log.png Warning Messages ================ You should use :func:`~artificial.workflows.runtime.show_warning` to show warning messages in LabOps. Warning Message-only -------------------- .. code-block:: python from artificial.workflows.decorators import workflow from artificial.workflows.runtime import show_warning @workflow('Show Warning Example', 'show_warning_workflow', 'lab_id') async def show_warning_workflow() -> None: await show_warning("message") shows this popup: .. image:: _static/show_warning.png and shows up in the log like this: .. image:: _static/show_warning_log.png Warning Message and title -------------------------- .. code-block:: python from artificial.workflows.decorators import workflow from artificial.workflows.runtime import show_warning @workflow('Show Warning Example', 'show_warning_workflow', 'lab_id') async def show_warning_workflow() -> None: await show_warning("message", "title") shows this popup: .. image:: _static/show_warning_with_title.png and shows up in the logs like this: .. image:: _static/show_warning_with_title_log.png More complex interactions ========================= For more complex information, or to get input from a LabOps user, use an :doc:`Assistant `.