Discover how to efficiently handle and process streaming events using Latitude’s API.
latitude-event
: Contains information about the chain progress and results.provider-event
: Contains real-time updates from your AI provider.chain-started
event.step-started
event and end with a step-completed
event. Within a step, you may receive additional events:
provider-started
and provider-completed
events.tools-started
and tool-completed
events occur, indicating the execution status of the requested tool.
chain-completed
.chain-error
: Indicates an error occurred during the processing chain.tools-requested
: Indicates the AI response requested additional tools to be executed by the client, and they are required to continue processing the chain.ChainStarted
StepStarted
ProviderStarted
ProviderCompleted
ToolsStarted
ToolCompleted
ChainError
ChainCompleted
provider-started
and a provider-completed
event. You can expect updates on each stage of the processing, providing insights into the ongoing tasks.
Here’s an example of a Provider Event with the response text delta: