Generation Stage
Track the progress of tambo's response generation process and expose it to your users.
You may want to show your users something unique during each stage of tambo's response generation process, rather than a static 'loading' message for the entire duration.
To enable this, each thread has a generationStage
property that can be used to track the progress of the response generation process.
You can expose the generation stage ( or a value you derive from it ) to your users so they know what their AI assistant is doing.
Stages
A thread's generation stage is an enum with the following possible values:
Status Message
Instead of determining a custom message for each stage, you can use the statusMessage
property, which is a context-aware string that describes the current stage of the generation process, as generated by Tambo.
For example, if the generation was triggered by a user message asking about the weather in Tokyo, during the CHOOSING_COMPONENT
stage the statusMessage
might be something like "Looking for a component to help with your request about the weather in Tokyo"
.
Use this along with the isProcessing
helper property which returns true
if the generationStage
is CHOOSING_COMPONENT
, FETCHING_CONTEXT
, HYDRATING_COMPONENT
, or STREAMING_RESPONSE
.