From f61b02a4db4b950d4316c166b9ee7aaefce1d035 Mon Sep 17 00:00:00 2001 From: phernandez Date: Mon, 16 Dec 2024 21:20:17 -0600 Subject: [PATCH] fix schemas.py --- src/basic_memory/schemas.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/basic_memory/schemas.py b/src/basic_memory/schemas.py index 36b12332..d891f1d4 100644 --- a/src/basic_memory/schemas.py +++ b/src/basic_memory/schemas.py @@ -17,9 +17,9 @@ def lower_strip_whitespace(val: str) -> str: Observation = Annotated[str, BeforeValidator(strip_whitespace), MinLen(1), MaxLen(1000)] -EntityType = Annotated[str, BeforeValidator(strip_whitespace), MinLen(1), MaxLen(20)] +EntityType = Annotated[str, BeforeValidator(strip_whitespace), MinLen(1), MaxLen(200)] -RelationType = Annotated[str, BeforeValidator(strip_whitespace), MinLen(1), MaxLen(20)] +RelationType = Annotated[str, BeforeValidator(strip_whitespace), MinLen(1), MaxLen(200)] # Custom field types with validation EntityId = Annotated[str, BeforeValidator(lower_strip_whitespace)] @@ -83,7 +83,7 @@ class SearchNodesRequest(BaseModel): class OpenNodesRequest(BaseModel): """Request schema for open_nodes tool.""" - entity_ids: Annotated[List[str], MinLen(1)] + entity_ids: Annotated[List[EntityId], MinLen(1)] class CreateRelationsRequest(BaseModel):