Skip to main content

UseCaseCustomField

Schema for a use case custom field.

Fields

FieldTypeRequiredDefaultDescription
custom_field_idstrNone-
valueAnyNone-

Usage Example

from credoai.models import UseCaseCustomField

# Create a new instance
model = UseCaseCustomField(
custom_field_id="example_value", # Required field
value=None, # Required field
)

# Convert to dictionary
model_dict = model.model_dump()
print(model_dict)

# Create from dictionary
data = {
"custom_field_id": "example_value",
"value": None,
}
model_from_dict = UseCaseCustomField(**data)

JSON Schema

{
"type": "object",
"title": "UseCaseCustomField",
"description": "Schema for a use case custom field.",
"properties": {
"custom_field_id": {
"type": "str"
},
"value": {
"type": "any"
}
},
"required": ["custom_field_id", "value"]
}