Currently if you try to go to http://localhost:1416/docs#/ with an extractive pipeline, an error will be thrown because the response class, ExtractedAnswer, contains a DataFrame, which pydantic is unable to serialize. I have added a function create_valid_type that creates a new type, replacing invalid types with those specified. This also means that it is no longer necessary to convert Documents to HaystackDocument for validation by pydantic.
Currently if you try to go to http://localhost:1416/docs#/ with an extractive pipeline, an error will be thrown because the response class, ExtractedAnswer, contains a DataFrame, which pydantic is unable to serialize. I have added a function create_valid_type that creates a new type, replacing invalid types with those specified. This also means that it is no longer necessary to convert Documents to HaystackDocument for validation by pydantic.