run-llama / llama_extract

MIT License
105 stars 16 forks source link

Pydantic Parsing Error when returning None #32

Open johnisanerd opened 2 months ago

johnisanerd commented 2 months ago

Describe the bug I am getting what I think is a pydantic parsing error, when the model returns "none"

Client: Please remove untested options:

Options Multimodal

Additional context I am getting the following error:

validation errors for ParsingModel[ExtractionResult]
__root__ -> data -> fund_amount
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> data -> global_amount
johnisanerd commented 2 months ago

I think I may have solved this; I had "null" as an option in the schema.