Step Class
The Step
class is a Python Context Manager that can be used to create steps in your chainlit app. The step is created when the context manager is entered and is updated to the client when the context manager is exited.
Parameters
The name of the step. Default to the name of the decorated function.
The type of the step, useful for monitoring and debugging.
Elements to attach to the step.
Language of the output. See https://react-code-blocks-rajinwonderland.vercel.app/?path=/story/codeblock—supported-languages for a list of supported languages.
By default only the output of the step is shown. Set this to True
to also
show the input. You can also set this to a language like json
or python
to
syntax highlight the input.
Send a Step
Stream the Output
Nest Steps
To nest steps, simply create a step inside another step.
Update a Step
Remove a Step
Was this page helpful?