├── README.md ├── .gitignore ├── summaryprompt.txt ├── summaryprompt2.txt ├── mainprompt2.txt ├── summaries ├── 0004.txt ├── 0001.txt ├── 0005.txt ├── 0003.txt ├── 0002.txt ├── 0010.txt ├── 0008.txt ├── 0006.txt ├── 0007.txt └── 0009.txt ├── novel ├── 0006.txt ├── 0003.txt ├── 0004.txt ├── 0002.txt ├── 0007.txt ├── 0005.txt ├── 0009.txt ├── 0008.txt ├── 0001.txt └── 0010.txt ├── LICENSE ├── example01.txt ├── mainprompt.txt ├── write_novel.py └── novel.txt /README.md: -------------------------------------------------------------------------------- 1 | # AutoMuse -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | gpt3_logs/ 3 | openaiapikey.txt 4 | discordkey.txt -------------------------------------------------------------------------------- /summaryprompt.txt: -------------------------------------------------------------------------------- 1 | Write a concise summary of the following excerpt: 2 | <> 3 | 4 | Concise summary: -------------------------------------------------------------------------------- /summaryprompt2.txt: -------------------------------------------------------------------------------- 1 | Write a detailed summary of the following novel excerpt: 2 | 3 | <> 4 | 5 | Detailed summary: -------------------------------------------------------------------------------- /mainprompt2.txt: -------------------------------------------------------------------------------- 1 | The following is a summary of a novel so far. Read the summary and continue the story. 2 | 3 | Summary: 4 | 5 | <> 6 | 7 | Last few lines: 8 | 9 | <> 10 | 11 | Write a long continuation of the above story: -------------------------------------------------------------------------------- /summaries/0004.txt: -------------------------------------------------------------------------------- 1 | The excerpt is about June when she starts to remember her time in space. When the crew saw her disappear they start to run after her, but soon realize that she wakes up back on Earth. The last thing she remembers before waking up is running through a bright doorway with her crew. -------------------------------------------------------------------------------- /summaries/0001.txt: -------------------------------------------------------------------------------- 1 | June is an explorer who found the Obelisk. She has been travelling for twenty years and was the first to find it. The Obelisk is a diamond shaped object about a thousand miles long and half as wide, not made of any material we can recognize but with a gravitational field. It sends out signals that we have not figured out what they mean yet. -------------------------------------------------------------------------------- /novel/0006.txt: -------------------------------------------------------------------------------- 1 | The crew tries to go on despite warnings, but soon hears somebody yell "I told you not to come back!", causing three trees to stand in front of them again saying "We are sorry for your loss." One says "You have been here before," while the other two add "We can't stop now." The three tall creatures say that they will never be able to leave the Obelisk and they ask June if she wants a second chance at life. She replies yes and gets transported back into reality, this time with her family. -------------------------------------------------------------------------------- /summaries/0005.txt: -------------------------------------------------------------------------------- 1 | June's crew are trying to find out what happened when June disappeared. They follow the same steps as before, but this time they find that the world is darker and more sinister than before. On their way, they meet a person who remembers them from their previous visit. The crew attempts to go on despite warnings, but soon hears somebody yell "I told you not to come back!", causing three trees to stand in front of them again saying "We are sorry for your loss" and "You've been here before." -------------------------------------------------------------------------------- /novel/0003.txt: -------------------------------------------------------------------------------- 1 | June starts to realize that this place is like her home. She has been here before, but she doesn't remember it. It's like the door unlocked something in her head and all of a sudden she remembers what happened before. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. -------------------------------------------------------------------------------- /novel/0004.txt: -------------------------------------------------------------------------------- 1 | June starts to realize that this place is like her home. She has been here before, but she doesn't remember it. It's like the door unlocked something in her head and all of a sudden she remembers what happened before. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. -------------------------------------------------------------------------------- /summaries/0003.txt: -------------------------------------------------------------------------------- 1 | June starts to realize that this place is like her home. She has been here before, but she doesn't remember it. It's like the door unlocked something in her head and all of a sudden she remembers what happened before. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. -------------------------------------------------------------------------------- /summaries/0002.txt: -------------------------------------------------------------------------------- 1 | The crew of Daedalus sets out to explore the Obelisk again. Upon reaching it, they find that many people had already come and gone before them, seemingly leaving nothing worthwhile to explore. One day while exploring the Obelisk on her own, June discovers a doorway made of light. She enters this door and finds an entirely different world with talking animals and plants which sing when you step on them. She starts running around trying to explore more of this place until she hears a voice behind her say "I told you not to run." All of the sudden there are three tall creatures standing in front of her who look like trees. One says "We are sorry for your loss." Another adds "You have been here before." -------------------------------------------------------------------------------- /summaries/0010.txt: -------------------------------------------------------------------------------- 1 | June is in a lab and can't remember what had happened. All she knows is that it was bad because she starts crying when she wakes up. She remembers the dreams from before like they just happened yesterday but also feels like she has been there for years. Suddenly another doctor enters the room, asking questions about who took care of her while she was gone and June doesn't know what he means so he explains that apparently somebody had taken care of her for five years while she was asleep - feeding her, changing clothes, everything! Eventually though June realizes that this person is probably also one of those creatures from before with their warning not to come back - which gives even more credence to their words than before! -------------------------------------------------------------------------------- /novel/0002.txt: -------------------------------------------------------------------------------- 1 | June and her crew set out in their ship, Daedalus, to go back to the Obelisk. They thought it would be difficult, but when they reached it they found that many people had already come and gone before them. It didn't seem like there was anything worth exploring anymore. 2 | 3 | One day while she was exploring the Obelisk on her own (she wasn't sure why) she came upon a doorway made of light. Upon entering this door, she discovered an entirely different world with talking animals and plants which sang when you stepped on them. She started running around trying to explore more of this place until she heard a voice behind her say "I told you not to run." 4 | All of the sudden there were three tall creatures that looked like trees standing in front of her. One said "We are sorry for your loss." Another added "You have been here before." -------------------------------------------------------------------------------- /summaries/0008.txt: -------------------------------------------------------------------------------- 1 | June is on an exploration of the Obelisk with her crew when she comes across a doorway made of light. They go through and find themselves in an entirely different world with talking animals and plants that sing when you step on them. June starts running around, but then she hears someone say "I told you not to run." Three tall creatures appear in front of her who look like trees, one says "We are sorry for your loss," while the other two add "You've been here before." June starts to realize this place is like her home, she remembers walking through the doorway made of light with her crew but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after him calling out "June! June!" But then they disappeared and she wakes up back in reality on Earth. -------------------------------------------------------------------------------- /summaries/0006.txt: -------------------------------------------------------------------------------- 1 | June is at the Obelisk with her crew, trying to capture footage of it for a documentary. They are getting warnings not to proceed from the creatures that live there, but they ignore their words and continue on. Nobody else hears the warnings except June, who sees three tall figures appear before them out of nowhere. The three beings say that they have been here before, which scares June's team away after one creature says "We told you not to come back!" After further discussion between themselves about what happened when they were in this place before, two other trees stand up saying "You have been here before" while the third adds "We can't stop now." All three creatures say that they will never be able to leave this spot until someone grants them a second chance at life - which happens when June agrees to let herself be transported back into reality where she has her family waiting for her. -------------------------------------------------------------------------------- /novel/0007.txt: -------------------------------------------------------------------------------- 1 | June and her crew were exploring the Obelisk and had found a doorway made of light. They soon found themselves in a strange, new world with talking animals and plants that sing when you step on them. June was running around trying to explore this place until she heard a voice behind her say "I told you not to run." All of the sudden there were three tall creatures standing in front of her who looked like trees. One says "We are sorry for your loss," while the other two add "You've been here before." June starts to realize that this place is like her home. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. -------------------------------------------------------------------------------- /summaries/0007.txt: -------------------------------------------------------------------------------- 1 | June and her crew were exploring the Obelisk when they found a doorway made of light. They soon found themselves in a strange, new world with talking animals and plants that sing when you step on them. June was running around trying to explore this place until she heard a voice behind her say "I told you not to run." All of the sudden there were three tall creatures standing in front of her who looked like trees. One says "We are sorry for your loss," while the other two add "You've been here before." June starts to realize that this place is like her home. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from long ago by the government. -------------------------------------------------------------------------------- /novel/0005.txt: -------------------------------------------------------------------------------- 1 | When the crew saw her disappear, they started to run after her, but soon realized that she woke up back on Earth. The last thing she remembers before waking up is running through a bright doorway with her crew. They start trying to find out what happened and find June's original journal entry about entering this world previously. They travel through the Obelisk again following the same steps as before and eventually reach the doorway made of light. However, when they enter this world, it doesn't look anything like it did for June before. It looks more sinister--darker colors, less nature-like. Almost all of the creatures are dead or dying and there are people everywhere who have been tortured horribly by some unknown force. The crew comes across one person who remembers their previous visit to this place but has no idea why it changed so drastically in just twenty years' time. One of them says "Maybe we shouldn't go any farther." The other two reply "We can't stop now." But then they hear somebody say "I told you not to come back!" And three trees stand in front of them again saying "We are sorry for your loss" and "You've been here before." -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 David Shapiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /novel/0009.txt: -------------------------------------------------------------------------------- 1 | June woke up in a lab, surrounded by white walls and a buzzing sound. One of the doctors walks over to her, checking her pulse. He says "You're going to be fine." She can't remember anything about what had happened, but she knows it was something bad because as soon as she wakes up she starts crying hysterically. The doctor tells her that they found her freezing to death on the side of a road, and now they're trying to figure out how long ago it happened. June does not know how much time has passed since then based on how long it takes for dreams to fade away after waking up from them. She remembers the events of before like they just happened yesterday but at the same time feels like she has been there for years. Suddenly another doctor enters the room and starts asking questions about who had taken care of her while she was gone. She doesn't know what he means so he explains that apparently somebody had taken care of her for five years while she was asleep - feeding her, changing clothes, everything! Eventually though June realizes that this person is probably also one of those creatures from before with their warning not to come back - which gives even more credence to their words than before! -------------------------------------------------------------------------------- /summaries/0009.txt: -------------------------------------------------------------------------------- 1 | June wakes up in a lab, surrounded by white walls and a buzzing sound. One of the doctors walks over to her, checking her pulse. He says "You're going to be fine." She can't remember anything about what had happened, but she knows it was something bad because as soon as she wakes up she starts crying hysterically. The doctor tells her that they found her freezing to death on the side of a road, and now they're trying to figure out how long ago it happened. June does not know how much time has passed since then based on how long it takes for dreams to fade away after waking up from them. She remembers the events of before like they just happened yesterday but at the same time feels like she has been there for years. Suddenly another doctor enters the room and starts asking questions about who had taken care of her while she was gone. She doesn't know what he means so he explains that apparently somebody had taken care of her for five years while she was asleep - feeding her, changing clothes, everything! Eventually though June realizes that this person is probably also one of those creatures from before with their warning not t come back - which gives even more credence to their words than before! -------------------------------------------------------------------------------- /novel/0008.txt: -------------------------------------------------------------------------------- 1 | June gasped as she remembered the creature's words. "You've been here before." She had always thought that it was just a coincidence, but now her memories were filling in the gaps. 2 | 3 | She was with her crew on their first exploration of the Obelisk when they came across a doorway made of light. They went through and found themselves in an entirely different world with talking animals and plants that sing when you step on them. June started running around trying to explore more of this place until she heard a voice behind her say "I told you not to run." All of the sudden there were three tall creatures standing in front of her who looked like trees. One says "We are sorry for your loss," while the other two add "You've been here before." June starts to realize that this place is like her home, she remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after him calling out "June! June!" But then they disappeared and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from long ago by the government. -------------------------------------------------------------------------------- /novel/0001.txt: -------------------------------------------------------------------------------- 1 | Transgalactic flights used to be so boring, that is, until the Obelisk was found. The first hint of it was a sensor ping more than a decade ago, but the crew of that ship dismissed it as a blip. It would be impossible for an object to be several parsecs across. And since they were travelling at relativistic speeds in the intergalactic void, it was difficult to pin down exactly where it was. 2 | But I found it again. 3 | My name is June and I'm an explorer. My ship is called Daedalus and we've been travelling for twenty years. We were the first to find the Obelisk, and we're the only ones who have visited it. 4 | Now that I'm back in my home system, I can't help but feel like something is missing. Like a piece of me is gone. I can't shake the feeling that I've forgotten something important. 5 | I'm going to have to go back. 6 | The Obelisk is a diamond shaped object, about a thousand miles long and half as wide. It's not made of any material we can recognize, but it does have a gravitational field. We've been able to get a few probes and drones close to it, but they've all been destroyed. 7 | We're not sure what the Obelisk is made of, but we think it's organic. It has a magnetic field that seems to be alive, and we've seen some strange things happening at the poles. The only way we can describe them is like auroras, but they don't move like any aurora we've ever seen. They're almost like arms reaching out from the Obelisk. 8 | The Obelisk has been sending out signals for years now, and we still haven't figured out what they mean. We think it's trying to communicate with us in some way, but we just don't know how yet. 9 | I'm going back to find out more about this thing, whatever it is. I have a feeling that if I do this right, I'll be able to make my name as an explorer for years to come." -------------------------------------------------------------------------------- /novel/0010.txt: -------------------------------------------------------------------------------- 1 | June woke up in a lab, surrounded by white walls and a buzzing sound. One of the doctors walks over to her, checking her pulse. He says "You're going to be fine." She can't remember anything about what had happened, but she knows it was something bad because as soon as she wakes up she starts crying hysterically. The doctor tells her that they found her freezing to death on the side of a road, and now they're trying to figure out how long ago it happened. June does not know how much time has passed since then based on how long it takes for dreams to fade away after waking up from them. She remembers the events of before like they just happened yesterday but at the same time feels like she has been there for years. Suddenly another doctor enters the room and starts asking questions about who had taken care of her while she was gone. She doesn't know what he means so he explains that apparently somebody had taken care of her for five years while she was asleep - feeding her, changing clothes, everything! Eventually though June realizes that this person is probably also one of those creatures from before with their warning not to come back - which gives even more credence to their words than before! 2 | 3 | The last thing June remembered before waking up was running through a bright doorway with all three crew members following closely behind when suddenly there were three tall beings in front of them again saying "We are sorry for your loss," and "You've been here before," while looking at each other knowingly as if having an unspoken conversation between themselves which only included themselves- no matter where someone stood or where they pointed their flashlight beam at them you couldn't see any trace or outline apart from these three figures standing in front- blocking their way entirely until two more trees stand up saying "You have been here before" while the third adds "We can't stop now." All three creatures say that they will never be able to leave this spot until someone grants them a -------------------------------------------------------------------------------- /example01.txt: -------------------------------------------------------------------------------- 1 | Write a novel with the following description 2 | Genre: Epic science fiction space opera 3 | Style: Mythic, like Frank Herbert's Dune or Tolkien's Silmarillion 4 | Premise: An object, the Obelisk, has been found in deep space on a route between the Milky Way and Andromeda galaxies. The object is a giant diamond in shape, but of unknown material and origin. This story follows several perspectives as they wrangle with the truth of the Obelisk. Religious orders claim it, as to scientific and governmental agencies. 5 | 6 | The story so far: Beginning 7 | 8 | Novel: Transgalactic flights used to be so boring, that is, until the Obelisk was found. The first hint of it was a sensor ping more than a decade ago, but the crew of that ship dismissed it as a blip. It would be impossible for an object to be several parsecs across. And since they were travelling at relativistic speeds in the intergalactic void, it was difficult to pin down exactly where it was. 9 | But I found it again. 10 | My name is June and I'm an explorer. My ship is called Daedalus and we've been travelling for twenty years. We were the first to find the Obelisk, and we're the only ones who have visited it. 11 | Now that I'm back in my home system, I can't help but feel like something is missing. Like a piece of me is gone. I can't shake the feeling that I've forgotten something important. 12 | I'm going to have to go back. 13 | The Obelisk is a diamond shaped object, about a thousand miles long and half as wide. It's not made of any material we can recognize, but it does have a gravitational field. We've been able to get a few probes and drones close to it, but they've all been destroyed. 14 | We're not sure what the Obelisk is made of, but we think it's organic. It has a magnetic field that seems to be alive, and we've seen some strange things happening at the poles. The only way we can describe them is like auroras, but they don't move like any aurora we've ever seen. They're almost like arms reaching out from the Obelisk. 15 | The Obelisk has been sending out signals for years now, and we still haven't figured out what they mean. We think it's trying to communicate with us in some way, but we just don't know how yet. 16 | I'm going back to find out more about this thing, whatever it is. I have a feeling that if I do this right, I'll be able to make my name as an explorer for years to come." 17 | 18 | -------------------------------------------------------------------------------- /mainprompt.txt: -------------------------------------------------------------------------------- 1 | Continue writing a novel based on the summary and last chunk. 2 | 3 | Example 1 4 | Summary: Frodo met Gandalf in the Shire and they talked about Bilbo's upcoming party. They rode in Gandalf's wagon back to Bilbo's house. Bilbo had his party but then disappeared with a magic ring. 5 | Last chunk: He walked briskly back to his hole, and stood for a moment listening with a smile to the din in the pavilion and to the sounds of merrymaking in other parts of the field. Then he went in. He took off his party clothes, folded up and wrapped in tissue-paper his embroidered silk waistcoat, and put it away. Then he put on quickly some old untidy garments, and fastened round his waist a worn leather belt. On it he hung a short sword in a battered black-leather scabbard. From a locked drawer, smelling of moth-balls, he took out an old cloak and hood. They had been locked up as if they were very precious, but they were so patched and weatherstained that their original colour could hardly be guessed: it might have been dark green. They were rather too large for him. He then went into his study, and from a large strong-box took out a bundle wrapped in old cloths, and a leather-bound manuscript; and also a large bulky envelope. The book and bundle he stuffed into the top of a heavy bag that was standing there, already nearly full. Into the envelope he slipped his golden ring, and its fine chain, and then sealed it, and addressed it to Frodo. At first he put it on the mantelpiece, but suddenly he removed it and stuck it in his pocket. At that moment the door opened and Gandalf came quickly in. 6 | Continuation: ‘Hullo!’ said Bilbo. 'I wondered if you would turn up.’ 7 | 'I am glad to find you visible,’ replied the wizard, sitting down in a chair, 'I wanted to catch you and have a few final words. I suppose you feel that everything has gone off splendidly and according to plan?’ 8 | ‘Yes, I do,’ said Bilbo. "Though that flash was surprising: it quite startled me, let alone the others. A little addition of your own, I suppose?’ 9 | It was. You have wisely kept that ring secret all these years, and it seemed to me necessary to give your guests something else that would seem to explain your sudden vanishment.’ 10 | ‘And would spoil my joke. You are an interfering old busybody,’ laughed Bilbo, ‘but I expect you know best, as usual.’ 11 | ‘I do - when I know anything. But I don’t feel too sure about this whole affair. It has now come to the final point. You have had your joke, and alarmed or offended most of your relations, and given the whole Shire something to talk about for nine days, or ninety-nine more likely. Are you going any further?’ 12 | 13 | Example 2 14 | Summary: <> 15 | Last chunk: <> 16 | Continuation: -------------------------------------------------------------------------------- /write_novel.py: -------------------------------------------------------------------------------- 1 | import openai 2 | import os 3 | 4 | 5 | with open('openaiapikey.txt', 'r') as infile: 6 | open_ai_api_key = infile.read() 7 | openai.api_key = open_ai_api_key 8 | 9 | 10 | novel_dir = 'C:/AutoMuse/novel/' 11 | summary_dir = 'C:/AutoMuse/summaries/' 12 | 13 | 14 | def load_files(directory): 15 | result = list() 16 | for f in os.listdir(directory): 17 | with open(directory + f, 'r', encoding='utf-8') as infile: 18 | result.append(infile.read().strip()) 19 | return result 20 | 21 | 22 | def next_filename(): 23 | last_filename = os.listdir(novel_dir)[-1].strip('.txt') 24 | number = int(last_filename) 25 | number += 1 26 | new_filename = str(number).zfill(4) + '.txt' 27 | return new_filename 28 | 29 | 30 | def save_file(fullpath, content): 31 | with open(fullpath, 'w', encoding='utf-8') as outfile: 32 | outfile.write(content) 33 | 34 | 35 | def completion(prompt, engine, temp=0.7, top_p=1.0, tokens=400, freq_pen=0.75, pres_pen=0.75, stop=['Summary:', 'Last few lines:', 'Write a long continuation of the above story:', 'Detailed summary:']): 36 | try: 37 | print('\n\nPROMPT:', prompt) 38 | response = openai.Completion.create( 39 | engine=engine, 40 | prompt=prompt, 41 | temperature=temp, 42 | max_tokens=tokens, 43 | top_p=top_p, 44 | frequency_penalty=freq_pen, 45 | presence_penalty=pres_pen, 46 | stop=stop) 47 | response = response['choices'][0]['text'].strip() 48 | print('\n\nRESPONSE:', response) 49 | return response 50 | except Exception as oops: 51 | print('ERROR in completion function:', oops) 52 | return None 53 | 54 | 55 | if __name__ == '__main__': 56 | counter = 0 57 | while True: 58 | # 1) load all summaries (and compress?) 59 | # 2) load last prose block 60 | # 3) Populate prompt 61 | # 4) Generate next prose block, save it 62 | # 5) Generate summary of new prose block, save it 63 | counter += 1 64 | if counter >=10: 65 | exit(0) 66 | summaries = load_files(summary_dir) 67 | summary = " ".join(summaries) 68 | last_prose = load_files(novel_dir)[-1] 69 | with open('C:/AutoMuse/mainprompt2.txt', 'r', encoding='utf-8') as infile: 70 | prompt = infile.read().replace('<>', summary).replace('<>', last_prose) 71 | next_prose = completion(prompt, 'davinci-instruct-beta') 72 | with open('C:/AutoMuse/summaryprompt2.txt', 'r', encoding='utf-8') as infile: 73 | prompt = infile.read().replace('<>', next_prose) 74 | new_summary = completion(prompt, 'davinci-instruct-beta') 75 | filename = next_filename() 76 | save_file(novel_dir + filename, next_prose) 77 | save_file(summary_dir + filename, new_summary) 78 | whole_novel = "\n ".join(load_files(novel_dir)) 79 | save_file('C:/AutoMuse/novel.txt', whole_novel) -------------------------------------------------------------------------------- /novel.txt: -------------------------------------------------------------------------------- 1 | Transgalactic flights used to be so boring, that is, until the Obelisk was found. The first hint of it was a sensor ping more than a decade ago, but the crew of that ship dismissed it as a blip. It would be impossible for an object to be several parsecs across. And since they were travelling at relativistic speeds in the intergalactic void, it was difficult to pin down exactly where it was. 2 | But I found it again. 3 | My name is June and I'm an explorer. My ship is called Daedalus and we've been travelling for twenty years. We were the first to find the Obelisk, and we're the only ones who have visited it. 4 | Now that I'm back in my home system, I can't help but feel like something is missing. Like a piece of me is gone. I can't shake the feeling that I've forgotten something important. 5 | I'm going to have to go back. 6 | The Obelisk is a diamond shaped object, about a thousand miles long and half as wide. It's not made of any material we can recognize, but it does have a gravitational field. We've been able to get a few probes and drones close to it, but they've all been destroyed. 7 | We're not sure what the Obelisk is made of, but we think it's organic. It has a magnetic field that seems to be alive, and we've seen some strange things happening at the poles. The only way we can describe them is like auroras, but they don't move like any aurora we've ever seen. They're almost like arms reaching out from the Obelisk. 8 | The Obelisk has been sending out signals for years now, and we still haven't figured out what they mean. We think it's trying to communicate with us in some way, but we just don't know how yet. 9 | I'm going back to find out more about this thing, whatever it is. I have a feeling that if I do this right, I'll be able to make my name as an explorer for years to come." 10 | June and her crew set out in their ship, Daedalus, to go back to the Obelisk. They thought it would be difficult, but when they reached it they found that many people had already come and gone before them. It didn't seem like there was anything worth exploring anymore. 11 | 12 | One day while she was exploring the Obelisk on her own (she wasn't sure why) she came upon a doorway made of light. Upon entering this door, she discovered an entirely different world with talking animals and plants which sang when you stepped on them. She started running around trying to explore more of this place until she heard a voice behind her say "I told you not to run." 13 | All of the sudden there were three tall creatures that looked like trees standing in front of her. One said "We are sorry for your loss." Another added "You have been here before." 14 | June starts to realize that this place is like her home. She has been here before, but she doesn't remember it. It's like the door unlocked something in her head and all of a sudden she remembers what happened before. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. 15 | June starts to realize that this place is like her home. She has been here before, but she doesn't remember it. It's like the door unlocked something in her head and all of a sudden she remembers what happened before. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. 16 | When the crew saw her disappear, they started to run after her, but soon realized that she woke up back on Earth. The last thing she remembers before waking up is running through a bright doorway with her crew. They start trying to find out what happened and find June's original journal entry about entering this world previously. They travel through the Obelisk again following the same steps as before and eventually reach the doorway made of light. However, when they enter this world, it doesn't look anything like it did for June before. It looks more sinister--darker colors, less nature-like. Almost all of the creatures are dead or dying and there are people everywhere who have been tortured horribly by some unknown force. The crew comes across one person who remembers their previous visit to this place but has no idea why it changed so drastically in just twenty years' time. One of them says "Maybe we shouldn't go any farther." The other two reply "We can't stop now." But then they hear somebody say "I told you not to come back!" And three trees stand in front of them again saying "We are sorry for your loss" and "You've been here before." 17 | The crew tries to go on despite warnings, but soon hears somebody yell "I told you not to come back!", causing three trees to stand in front of them again saying "We are sorry for your loss." One says "You have been here before," while the other two add "We can't stop now." The three tall creatures say that they will never be able to leave the Obelisk and they ask June if she wants a second chance at life. She replies yes and gets transported back into reality, this time with her family. 18 | June and her crew were exploring the Obelisk and had found a doorway made of light. They soon found themselves in a strange, new world with talking animals and plants that sing when you step on them. June was running around trying to explore this place until she heard a voice behind her say "I told you not to run." All of the sudden there were three tall creatures standing in front of her who looked like trees. One says "We are sorry for your loss," while the other two add "You've been here before." June starts to realize that this place is like her home. She remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after her calling out "June! June!" But then they disappear and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from her long ago by the government. 19 | June gasped as she remembered the creature's words. "You've been here before." She had always thought that it was just a coincidence, but now her memories were filling in the gaps. 20 | 21 | She was with her crew on their first exploration of the Obelisk when they came across a doorway made of light. They went through and found themselves in an entirely different world with talking animals and plants that sing when you step on them. June started running around trying to explore more of this place until she heard a voice behind her say "I told you not to run." All of the sudden there were three tall creatures standing in front of her who looked like trees. One says "We are sorry for your loss," while the other two add "You've been here before." June starts to realize that this place is like her home, she remembers walking through the doorway made of light with her crew, but they don't know what's happening because they can't see anything on the other side except for June who seems to be floating in nothingness. They start running after him calling out "June! June!" But then they disappeared and she wakes up back in reality on Earth, no longer an explorer but a woman whose children were taken from long ago by the government. 22 | June woke up in a lab, surrounded by white walls and a buzzing sound. One of the doctors walks over to her, checking her pulse. He says "You're going to be fine." She can't remember anything about what had happened, but she knows it was something bad because as soon as she wakes up she starts crying hysterically. The doctor tells her that they found her freezing to death on the side of a road, and now they're trying to figure out how long ago it happened. June does not know how much time has passed since then based on how long it takes for dreams to fade away after waking up from them. She remembers the events of before like they just happened yesterday but at the same time feels like she has been there for years. Suddenly another doctor enters the room and starts asking questions about who had taken care of her while she was gone. She doesn't know what he means so he explains that apparently somebody had taken care of her for five years while she was asleep - feeding her, changing clothes, everything! Eventually though June realizes that this person is probably also one of those creatures from before with their warning not to come back - which gives even more credence to their words than before! 23 | June woke up in a lab, surrounded by white walls and a buzzing sound. One of the doctors walks over to her, checking her pulse. He says "You're going to be fine." She can't remember anything about what had happened, but she knows it was something bad because as soon as she wakes up she starts crying hysterically. The doctor tells her that they found her freezing to death on the side of a road, and now they're trying to figure out how long ago it happened. June does not know how much time has passed since then based on how long it takes for dreams to fade away after waking up from them. She remembers the events of before like they just happened yesterday but at the same time feels like she has been there for years. Suddenly another doctor enters the room and starts asking questions about who had taken care of her while she was gone. She doesn't know what he means so he explains that apparently somebody had taken care of her for five years while she was asleep - feeding her, changing clothes, everything! Eventually though June realizes that this person is probably also one of those creatures from before with their warning not to come back - which gives even more credence to their words than before! 24 | 25 | The last thing June remembered before waking up was running through a bright doorway with all three crew members following closely behind when suddenly there were three tall beings in front of them again saying "We are sorry for your loss," and "You've been here before," while looking at each other knowingly as if having an unspoken conversation between themselves which only included themselves- no matter where someone stood or where they pointed their flashlight beam at them you couldn't see any trace or outline apart from these three figures standing in front- blocking their way entirely until two more trees stand up saying "You have been here before" while the third adds "We can't stop now." All three creatures say that they will never be able to leave this spot until someone grants them a --------------------------------------------------------------------------------