From d633e64439c832ca2d07f9ba7620c2542589211c Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 26 Jun 2024 17:48:44 -0300 Subject: [PATCH] refactor: Add index field to DuckDbMessageModel in monitor schema This commit adds the `index` field to the `DuckDbMessageModel` class in the `monitor/schema.py` file. The `index` field is of type `int` and is used to store the index value for the message. This modification enhances the schema of the `DuckDbMessageModel` and allows for more efficient querying and sorting of messages based on their index. --- src/backend/base/langflow/services/monitor/schema.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/base/langflow/services/monitor/schema.py b/src/backend/base/langflow/services/monitor/schema.py index 587e7628e..41018047f 100644 --- a/src/backend/base/langflow/services/monitor/schema.py +++ b/src/backend/base/langflow/services/monitor/schema.py @@ -82,6 +82,7 @@ class TransactionModelResponse(DefaultModel): class DuckDbMessageModel(DefaultModel): + index: int flow_id: str | None = Field(default=None, alias="flow_id") timestamp: datetime = Field(default_factory=lambda: datetime.now(timezone.utc)) sender: str