refactor: Update DuckDbMessageModel import in monitor service

This commit updates the import statement for the `DuckDbMessageModel` class in the `monitor/service.py` file. The import is modified to reflect the recent changes made to the `monitor/schema.py` file, where the `DuckDbMessageModel` class was added. This update ensures that the correct class is imported and used in the `add_row` method of the `MonitorService` class.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-26 17:48:54 -03:00
commit d54672a3e3

View file

@ -10,7 +10,7 @@ from langflow.services.base import Service
from langflow.services.monitor.utils import add_row_to_table, drop_and_create_table_if_schema_mismatch
if TYPE_CHECKING:
from langflow.services.monitor.schema import MessageModel, TransactionModel, VertexBuildModel
from langflow.services.monitor.schema import DuckDbMessageModel, TransactionModel, VertexBuildModel
from langflow.services.settings.service import SettingsService
@ -48,7 +48,7 @@ class MonitorService(Service):
def add_row(
self,
table_name: str,
data: Union[dict, "TransactionModel", "MessageModel", "VertexBuildModel"],
data: Union[dict, "TransactionModel", "DuckDbMessageModel", "VertexBuildModel"],
):
# Make sure the model passed matches the table