mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-27 18:32:55 +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
|