mirror of
https://github.com/QuivrHQ/quivr.git
synced 2025-01-05 23:03:53 +03:00
12 lines
351 B
Python
12 lines
351 B
Python
|
from models.ApiBrainDefinition import ApiBrainDefinitionSchemaProperty
|
||
|
|
||
|
|
||
|
def format_api_brain_property(property: ApiBrainDefinitionSchemaProperty):
|
||
|
property_data: dict = {
|
||
|
"type": property.type,
|
||
|
"description": property.description,
|
||
|
}
|
||
|
if property.enum:
|
||
|
property_data["enum"] = property.enum
|
||
|
return property_data
|