Showing Messages in LabOps#

The Artificial SDK provides two functions for showing simple messages in LabOps: show_info() and 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 show_info() to show informative messages in LabOps.

Info Message-only#

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:

_images/show_info.png

and shows up in the log like this:

_images/show_info_log.png

Message and title#

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:

_images/show_info_with_title.png

and shows up in the logs like this:

_images/show_info_with_title_log.png

Warning Messages#

You should use show_warning() to show warning messages in LabOps.

Warning Message-only#

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:

_images/show_warning.png

and shows up in the log like this:

_images/show_warning_log.png

Warning Message and title#

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:

_images/show_warning_with_title.png

and shows up in the logs like this:

_images/show_warning_with_title_log.png

More complex interactions#

For more complex information, or to get input from a LabOps user, use an Assistant.