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:
and shows up in the log like this:
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:
and shows up in the logs like this:
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:
and shows up in the log like this:
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:
and shows up in the logs like this:
More complex interactions#
For more complex information, or to get input from a LabOps user, use an Assistant.