History
Module containing SQLAlchemy models for the history.
- class HistoryModel(**kwargs)[source]
SQLAlchemy model for history table that maps to HistoryEntry dataclass.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- _sa_class_manager = {'chat_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'chats': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'created_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'deleted_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'interactions': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'updated_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}
- chat_id
- chats
- created_at
- deleted_at
- id
- interactions
- updated_at
- user_id
- class InteractionModel(**kwargs)[source]
SQLAlchemy model for interaction table.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- _sa_class_manager = {'created_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'deleted_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'history_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'question': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'response': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'updated_at': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}
- created_at
- deleted_at
- history_id
- id
- question
- response
- updated_at