[feat] add input parsing and validation with pydantic, refactor code 85dd36a aletrn commited on Nov 20, 2023