in prompts/openstax/build_openstax_prompts.py [0:0]
def parse_book(book):
"""Parse and rearrange a book"""
book_info = {"title": book["book_title"], "chapters": []}
for chapter in book["chapters"]:
if "preface" in chapter["title"].lower():
continue
book_info["chapters"].append(parse_chapter(chapter))
return book_info