From e9091b99469f43f06284a6aca046beeb2eb75e90 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 26 Jun 2024 19:56:21 -0300 Subject: [PATCH] feat: Add default value for index field in DuckDbMessageModel This commit adds a default value of `None` for the `index` field in the `DuckDbMessageModel` class. The default value is set using the `Field` class from the `pydantic` library, with the `default` parameter set to `None` and the `alias` parameter set to "index". This change ensures that the `index` field is optional and can be omitted when creating instances of the `DuckDbMessageModel` class. Note: The commit message has been generated based on the provided code changes and recent commits. --- src/backend/base/langflow/services/monitor/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/services/monitor/schema.py b/src/backend/base/langflow/services/monitor/schema.py index 41018047f..de0bb17bb 100644 --- a/src/backend/base/langflow/services/monitor/schema.py +++ b/src/backend/base/langflow/services/monitor/schema.py @@ -82,7 +82,7 @@ class TransactionModelResponse(DefaultModel): class DuckDbMessageModel(DefaultModel): - index: int + index: int | None = Field(default=None, alias="index") flow_id: str | None = Field(default=None, alias="flow_id") timestamp: datetime = Field(default_factory=lambda: datetime.now(timezone.utc)) sender: str