classTextField(SettingsPropertyBase):"""Text field for use in Argilla `Dataset` `Settings`"""_model:FieldModel_api:FieldsAPI_dataset:"Dataset"def__init__(self,name:str,title:Optional[str]=None,use_markdown:Optional[bool]=False,required:Optional[bool]=True,description:Optional[str]=None,client:Optional[Argilla]=None,)->None:"""Text field for use in Argilla `Dataset` `Settings` Parameters: name (str): The name of the field title (Optional[str], optional): The title of the field. Defaults to None. use_markdown (Optional[bool], optional): Whether to use markdown. Defaults to False. required (Optional[bool], optional): Whether the field is required. Defaults to True. description (Optional[str], optional): The description of the field. Defaults to None. """client=clientorArgilla._get_default()super().__init__(api=client.api.fields,client=client)self._model=FieldModel(name=name,title=title,required=requiredorTrue,description=description,settings=TextFieldSettings(use_markdown=use_markdown),)@classmethoddeffrom_model(cls,model:FieldModel)->"TextField":instance=cls(name=model.name)instance._model=modelreturninstance@classmethoddeffrom_dict(cls,data:dict)->"TextField":model=FieldModel(**data)returncls.from_model(model=model)@propertydefuse_markdown(self)->Optional[bool]:returnself._model.settings.use_markdown@use_markdown.setterdefuse_markdown(self,value:bool)->None:self._model.settings.use_markdown=value@propertydefdataset(self)->"Dataset":returnself._dataset@dataset.setterdefdataset(self,value:"Dataset")->None:self._dataset=valueself._model.dataset_id=self._dataset.id
Text field for use in Argilla DatasetSettings
Parameters:
name (str): The name of the field
title (Optional[str], optional): The title of the field. Defaults to None.
use_markdown (Optional[bool], optional): Whether to use markdown. Defaults to False.
required (Optional[bool], optional): Whether the field is required. Defaults to True.
description (Optional[str], optional): The description of the field. Defaults to None.
def__init__(self,name:str,title:Optional[str]=None,use_markdown:Optional[bool]=False,required:Optional[bool]=True,description:Optional[str]=None,client:Optional[Argilla]=None,)->None:"""Text field for use in Argilla `Dataset` `Settings` Parameters: name (str): The name of the field title (Optional[str], optional): The title of the field. Defaults to None. use_markdown (Optional[bool], optional): Whether to use markdown. Defaults to False. required (Optional[bool], optional): Whether the field is required. Defaults to True. description (Optional[str], optional): The description of the field. Defaults to None. """client=clientorArgilla._get_default()super().__init__(api=client.api.fields,client=client)self._model=FieldModel(name=name,title=title,required=requiredorTrue,description=description,settings=TextFieldSettings(use_markdown=use_markdown),)