"description": "What type of email this is.",        "type": "string",        "enum": ["update", "action_item", "customer_feedback", "announcement", "other"],        "required": True,    },    {        "name": "mentions",        "description": "A list of all people mentioned in this email.",        "type": "array",        "items": {            "name": "full_name",            "description": "The full name of the person mentioned.",            "type": "string",        },        "required": True,    },    {        "name": "eli5",        "description": "Explain this email to me like I'm 5 years old.",        "type": "string",        "required": True,    },]property_extractor = DoctranPropertyExtractor(properties=properties)Output‚ÄãAfter extracting properties from a document, the result will be returned as a new document with properties provided in the metadataextracted_document = await property_extractor.atransform_documents(    documents, properties=properties)print(json.dumps(extracted_document[0].metadata, indent=2))    {      "extracted_properties": {        "category": "update",        "mentions": [          "John Doe",          "Jane Smith",          "Michael Johnson",          "Sarah Thompson",          "David Rodriguez",          "Jason Fan"        ],        "eli5": "This is an email from the CEO, Jason Fan, giving updates about different areas in the company. He talks about new security measures and praises John Doe for his work. He also mentions new hires and praises Jane Smith for her work in customer service. The CEO reminds everyone about the upcoming benefits enrollment and says to contact Michael Johnson with any questions. He talks about the marketing team's work and praises Sarah Thompson for increasing their social media followers. There's also a product launch event on July 15th. Lastly, he talks about the research and development projects and praises David Rodriguez for his work. There's a brainstorming session on July 10th."      }
We can extract useful features of documents using the Doctran library, which uses OpenAI's function calling feature to extract specific metadata.
We can extract useful features of documents using the Doctran library, which uses OpenAI's function calling feature to extract specific metadata. ->: "description": "What type of email this is.",        "type": "string",        "enum": ["update", "action_item", "customer_feedback", "announcement", "other"],        "required": True,    },    {        "name": "mentions",        "description": "A list of all people mentioned in this email.",        "type": "array",        "items": {            "name": "full_name",            "description": "The full name of the person mentioned.",            "type": "string",        },        "required": True,    },    {        "name": "eli5",        "description": "Explain this email to me like I'm 5 years old.",        "type": "string",        "required": True,    },]property_extractor = DoctranPropertyExtractor(properties=properties)Output‚ÄãAfter extracting properties from a document, the result will be returned as a new document with properties provided in the metadataextracted_document = await property_extractor.atransform_documents(    documents, properties=properties)print(json.dumps(extracted_document[0].metadata, indent=2))    {      "extracted_properties": {        "category": "update",        "mentions": [          "John Doe",          "Jane Smith",          "Michael Johnson",          "Sarah Thompson",          "David Rodriguez",          "Jason Fan"        ],        "eli5": "This is an email from the CEO, Jason Fan, giving updates about different areas in the company. He talks about new security measures and praises John Doe for his work. He also mentions new hires and praises Jane Smith for her work in customer service. The CEO reminds everyone about the upcoming benefits enrollment and says to contact Michael Johnson with any questions. He talks about the marketing team's work and praises Sarah Thompson for increasing their social media followers. There's also a product launch event on July 15th. Lastly, he talks about the research and development projects and praises David Rodriguez for his work. There's a brainstorming session on July 10th."      }