finic-ai / doctran

MIT License
479 stars 42 forks source link

Missing [] around `properties` in README #8

Open codeananda opened 1 year ago

codeananda commented 1 year ago

This code block from the README didn't work for me

from doctran import ExtractProperty

properties = ExtractProperty(
    name="millenial_or_boomer", 
    description="A prediction of whether this document was written by a millenial or boomer",
    type="string",
    enum=["millenial", "boomer"],
    required=True
)
document = await document.extract(properties=properties).execute()

Had to do

document = await document.extract(properties=[properties]).execute()

instead