@client.step
decorator.
The step is automatically ended and sent to the platform when the function returns.
Another advantage of using the decorator is that you get several variables automatically set for you:
name
: The name of the step. This is automatically set to the function name.input
: The input of the step. This is automatically set to the arguments of the function.output
: The output of the step. This is automatically set to the return value of the function.get_current_step
method:
with
statementwith
statement.
The step is automatically ended and sent to the platform when the code exits the with
block.
step
method:
start_step
methodend
method on the step object to end the step and send it to the platform.
start_step
method, or set them directly on the step object:
run
: A generic steptool
: A step that runs a toolllm
: A step that runs a language modelembedding
: A step that runs an embedding modelretrieval
: A step that retrieves documentsrerank
: A step that reranks documentsundefined
: An undefined stepcontent
key to store a message.content
key to store a message.