BaseDataLayer
class serves as an abstract foundation for data persistence operations within the Chainlit framework.
This class outlines methods for managing users, feedback, elements, steps, and threads in a chatbot application.
PersistedUser
.User
instance provided. Return type is optionally a PersistedUser
.Feedback
instance and returns a string as an identifier of the persisted feedback.feedback_id
. Return True
if it was successful.ElementDict
as an argument.thread_id
and element_id
. Return type is optionally an ElementDict
.element_id
.StepDict
as an argument.StepDict
as an argument.step_id
.thread_id
. Returns a string representing the author identifier.thread_id
.pagination
and filters
arguments. Returns a PaginatedResponse[ThreadDict]
.thread_id
. Return type is optionally a ThreadDict
.id
. Returns a boolean value indicating success.WebsocketSessions
.BaseDataLayer
, direct instantiation and usage are not practical without subclassing and implementing the abstract methods.
You can refer to the guide for custom data layer implementation.