From 4dd01eeaa19863178d74aae0ad9aa5cc4ac39201 Mon Sep 17 00:00:00 2001 From: Dinesh Yeduguru Date: Tue, 5 Nov 2024 15:09:04 -0800 Subject: [PATCH] fix postgres config validation (#380) * fix postgres config validation * dont remove types --------- Co-authored-by: Dinesh Yeduguru --- llama_stack/providers/utils/kvstore/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llama_stack/providers/utils/kvstore/config.py b/llama_stack/providers/utils/kvstore/config.py index b2f56b885..0a21bf4ca 100644 --- a/llama_stack/providers/utils/kvstore/config.py +++ b/llama_stack/providers/utils/kvstore/config.py @@ -54,8 +54,9 @@ class PostgresKVStoreConfig(CommonConfig): password: Optional[str] = None table_name: str = "llamastack_kvstore" + @classmethod @field_validator("table_name") - def validate_table_name(self, v: str) -> str: + def validate_table_name(cls, v: str) -> str: # PostgreSQL identifiers rules: # - Must start with a letter or underscore # - Can contain letters, numbers, and underscores