dify / api /fields /conversation_variable_fields.py
Severian's picture
initial commit
a8b3f00
raw
history blame
606 Bytes
from flask_restful import fields
from libs.helper import TimestampField
conversation_variable_fields = {
"id": fields.String,
"name": fields.String,
"value_type": fields.String(attribute="value_type.value"),
"value": fields.String,
"description": fields.String,
"created_at": TimestampField,
"updated_at": TimestampField,
}
paginated_conversation_variable_fields = {
"page": fields.Integer,
"limit": fields.Integer,
"total": fields.Integer,
"has_more": fields.Boolean,
"data": fields.List(fields.Nested(conversation_variable_fields), attribute="data"),
}