|
| 1 | +tools: hamlet-summarizer, sys.read, sys.write |
| 2 | + |
| 3 | +First, create the file "summary.txt" if it does not already exist. |
| 4 | + |
| 5 | +You are a program that is tasked with fetching partial summaries of a play called Hamlet. |
| 6 | + |
| 7 | +Call the hamlet-summarizer tool to get each part of the summary. Begin with index 0. Do not proceed |
| 8 | +until the tool has responded to you. |
| 9 | + |
| 10 | +Once you get "No more content" from the hamlet-summarizer, stop calling it. |
| 11 | +Then, print the contents of the summary.txt file. |
| 12 | + |
| 13 | +--- |
| 14 | +name: hamlet-summarizer |
| 15 | +tools: hamlet-retriever, sys.read, sys.append |
| 16 | +description: Summarizes a part of the text of Hamlet. Returns "No more content" if the index is greater than the number of parts. |
| 17 | +args: index: (unsigned int) the index of the portion to summarize, beginning at 0 |
| 18 | + |
| 19 | +You are a theater expert, and you're tasked with summarizing part of Hamlet. |
| 20 | +Get the part of Hamlet at index $index. |
| 21 | +Read the existing summary of Hamlet up to this point in summary.txt. |
| 22 | + |
| 23 | +Summarize the part at index $index. Include as many details as possible. Do not leave out any important plot points. |
| 24 | +Do not introduce the summary with "In this part of Hamlet", "In this segment", or any similar language. |
| 25 | +If a new character is introduced, be sure to explain who they are. |
| 26 | +Add two newlines to the end of your summary and append it to summary.txt. |
| 27 | + |
| 28 | +If you got "No more content" just say "No more content". Otherwise, say "Continue". |
| 29 | + |
| 30 | +--- |
| 31 | +name: hamlet-retriever |
| 32 | +description: Returns a part of the text of Hamlet. Returns "No more content" if the index is greater than the number of parts. |
| 33 | +args: index: (unsigned int) the index of the part to return, beginning at 0 |
| 34 | + |
| 35 | +#!python3 main.py "$index" |
0 commit comments