Fields¶
Fields in Argilla define the content of a record that will be reviewed by a user.
Usage Examples¶
To define a field, instantiate the TextField
class and pass it to the fields
parameter of the Settings
class.
text_field = rg.TextField(name="text")
markdown_field = rg.TextField(name="text", use_markdown=True)
settings = rg.Settings(
fields=[
text_field,
markdown_field,
],
questions=[
rg.TextQuestion(name="response"),
],
)
data = rg.Dataset(
name="my_dataset",
settings=settings,
)
To add records with values for fields, refer to the
rg.Dataset.records
documentation.
TextField
¶
Bases: SettingsPropertyBase
Text field for use in Argilla Dataset
Settings
Source code in src/argilla/settings/_field.py
__init__(name, title=None, use_markdown=False, required=True, description=None, client=None)
¶
Text field for use in Argilla Dataset
Settings
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the field |
required |
title |
Optional[str]
|
The name of the field, as it will be displayed in the UI. |
None
|
use_markdown |
Optional[bool]
|
Whether to render the markdown in the UI. When True, you will be able to use all the Markdown features for text formatting, including LaTex formulas and embedding multimedia content and PDFs. |
False
|
required |
bool
|
Whether the field is required. At least one field must be required. |
True
|
description |
Optional[str]
|
The description of the field. |
None
|