Update TemplateField title_case default value
This commit is contained in:
parent
4100266aa6
commit
6703880dbf
1 changed files with 4 additions and 2 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
from typing import Any, Callable, Optional, Union
|
from typing import Any, Callable, Optional, Union
|
||||||
|
|
||||||
from langflow.field_typing.range_spec import RangeSpec
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, field_serializer, model_serializer
|
from pydantic import BaseModel, ConfigDict, Field, field_serializer, model_serializer
|
||||||
|
|
||||||
|
from langflow.field_typing.range_spec import RangeSpec
|
||||||
|
|
||||||
|
|
||||||
class TemplateField(BaseModel):
|
class TemplateField(BaseModel):
|
||||||
model_config = ConfigDict()
|
model_config = ConfigDict()
|
||||||
|
|
@ -63,7 +64,7 @@ class TemplateField(BaseModel):
|
||||||
range_spec: Optional[RangeSpec] = Field(default=None, serialization_alias="rangeSpec")
|
range_spec: Optional[RangeSpec] = Field(default=None, serialization_alias="rangeSpec")
|
||||||
"""Range specification for the field. Defaults to None."""
|
"""Range specification for the field. Defaults to None."""
|
||||||
|
|
||||||
title_case: bool = True
|
title_case: bool = False
|
||||||
"""Specifies if the field should be displayed in title case. Defaults to True."""
|
"""Specifies if the field should be displayed in title case. Defaults to True."""
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
|
|
@ -101,3 +102,4 @@ class TemplateField(BaseModel):
|
||||||
if self.title_case:
|
if self.title_case:
|
||||||
value = value.title()
|
value = value.title()
|
||||||
return value
|
return value
|
||||||
|
return value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue