prompts
Harrison Chase 1 year ago
parent 10cc7c5267
commit a7a97f96de

@ -7,14 +7,13 @@ folders = BASE_FOLDER.glob("**")
def check_files(files):
if len(files) != 2:
raise ValueError(f"Each directory should have two files, got {len(files)}")
file_names = [f.name for f in files]
if "README.md" not in file_names:
raise ValueError(f"Expected to find a README.md file, but found {files}")
other_file = [file for file in files if file.name != "README.md"][0]
if other_file.suffix in (".json", ".yaml"):
load_prompt(other_file)
other_files = [file for file in files if file.name != "README.md"]
for other_file in other_files:
if other_file.suffix in (".json", ".yaml"):
load_prompt(other_file)
# TODO: testing for python files

@ -1,6 +1,6 @@
input_variables: [existing_answer, text]
output_parser: null
template: '
template: "
Your job is to produce a final summary\n
We have provided an existing summary up to a certain point: {existing_answer}\n
We have the opportunity to refine the existing summary
@ -9,5 +9,5 @@ template: '
{text}\n
------------\n
Given the new context, refine the original summary
If the context isn't useful, return the original summary.'
If the context isn't useful, return the original summary."
template_format: f-string

Loading…
Cancel
Save