From 0e724c148855e632f87ffcdb5cf887eb749ee1c1 Mon Sep 17 00:00:00 2001 From: Owen Date: Sat, 30 Sep 2023 22:26:36 -0400 Subject: [PATCH] fix type error --- .../gen_step_3_table_of_contents.py | 3 +- sciphi/examples/library_of_phi/prompts.py | 31 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/sciphi/examples/library_of_phi/gen_step_3_table_of_contents.py b/sciphi/examples/library_of_phi/gen_step_3_table_of_contents.py index 4eeefcb..62b430f 100644 --- a/sciphi/examples/library_of_phi/gen_step_3_table_of_contents.py +++ b/sciphi/examples/library_of_phi/gen_step_3_table_of_contents.py @@ -1,3 +1,4 @@ +# type: ignore """ YAML Syllabi to YAML Table of Contents Generator @@ -37,7 +38,7 @@ from sciphi.examples.library_of_phi.prompts import ( TABLE_OF_CONTENTS_PROMPT, -) # noqa +) from sciphi.interface import InterfaceManager, ProviderName from sciphi.llm import LLMConfigManager diff --git a/sciphi/examples/library_of_phi/prompts.py b/sciphi/examples/library_of_phi/prompts.py index e9786f0..46ed9ab 100644 --- a/sciphi/examples/library_of_phi/prompts.py +++ b/sciphi/examples/library_of_phi/prompts.py @@ -88,6 +88,22 @@ ) +TABLE_OF_CONTENTS_PROMPT = """ +### Instructions: +Below the course syllabus for {course_name} is shown as a yaml snippet. + +```yaml +{context} +``` + +Pretend you are a prolific author, your task is to translate the shown syllabus into a very detailed Table of Contents for a new textbook that is meant to accompany the course. +Be sure to pick a fitting name for the textbook. Add additional topics so that the table of contents provides much more information than the original syllabus. +Return your final result in an easily parseable yaml format, your final yaml must match the above with course -> textbook, and topics -> chapters, subtopics -> sections, and an additional new key: subsubtopics -> subsections. + +### Response: +""" + + BOOK_FOREWARD_PROMPT = """ ### Instructions: You are a writing a book titled "{title}". You are currently writing the foreward for the book: @@ -200,18 +216,3 @@ ### Response: """ - -TABLE_OF_CONTENTS_PROMPT = """ -### Instructions: -Below the course syllabus for {course_name} is shown as a yaml snippet. - -```yaml -{context} -``` - -Pretend you are a prolific author, your task is to translate the shown syllabus into a very detailed Table of Contents for a new textbook that is meant to accompany the course. -Be sure to pick a fitting name for the textbook. Add additional topics so that the table of contents provides much more information than the original syllabus. -Return your final result in an easily parseable yaml format, your final yaml must match the above with course -> textbook, and topics -> chapters, subtopics -> sections, and an additional new key: subsubtopics -> subsections. - -### Response: -"""