Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt

Use this file to discover all available pages before exploring further.

Decorator to react to a user logging out. Useful to clear cookies or other user data through the HTTP response.

Parameters

request
fastapi.Request
The request object.
response
fastapi.Response
The response object.

Usage

from fastapi import Request, Response

import chainlit as cl


@cl.on_logout
def main(request: Request, response: Response):
    response.delete_cookie("my_cookie")