Created
May 18, 2022 23:28
-
-
Save jwatte/2c06c9304b4b1728b3e3aa9588f97555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I gave GPT3 a writing prompt, to see how well it would keep track of initial | |
conditions. | |
The writing that comes out is in the same ham-handed style as my prompt, it | |
gets 100% on that! But as a writer / prompt completer: | |
1. The conditions established in the first paragraph don't carry through -- there's | |
enough oxygen, so why's the air running out right away? | |
2. How can he feel the smell of the antenna array while in his suit on the moon? | |
Repeating the prompt here: | |
Complete a six paragraph short story about an astronaut on the Moon. | |
First paragraph: Bob walks out the airlock, into the bitter cold of the Moon night. | |
The sunrise is still an hour away, but the communications antenna array had been | |
acting up, and contact with home base is the difference between life and death. | |
Checking the air gauge on the space suit, it's over half full, which is enough. But | |
what if he ran out? He'd have no way of calling for more, unless he fixed the array. | |
So, off he goes, across the razor sharp regolith. | |
This is the completion: | |
Second paragraph: It only takes a few minutes to reach the array, but in that time, | |
Bob's suit starts to feel clammy. The air is stale, and there's a faint smell of | |
something burning. He's not sure if it's the suit, or the array. But he has to check | |
it out. | |
Third paragraph: The array is a mess. The metal is burned and twisted, and the | |
wiring is exposed. It's a miracle it's still working at all. Bob starts to work, | |
trying to repair the damage. But it's too much. The suit is starting to feel | |
tighter, and his head is starting to hurt. He knows he doesn't have much time. | |
Fourth paragraph: Suddenly, the suit alarm goes off. The air is running out! Bob | |
knows he won't make it back to the airlock in time. He starts to feel lightheaded, | |
and the world starts to spin. He knows he's going to die. | |
Fifth paragraph: But then, he hears a voice. It's faint, but it's there. Someone | |
is calling his name. He tries to answer, but he can't speak. He tries to move, but | |
he can't. He's paralyzed. | |
Sixth paragraph: The voice gets louder, and Bob realizes it's coming from the | |
radio. It's base, they've found him! He's going to be okay. He tries to speak, but | |
all that comes out | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import openai | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
response = openai.Completion.create( | |
engine="text-davinci-002", | |
prompt="Complete a six paragraph short story about an astronaut on the Moon.\n\nFirst paragraph: Bob walks out the airlock, into the bitter cold of the Moon night. The sunrise is still an hour away, but the communications antenna array had been acting up, and contact with home base is the difference between life and death. Checking the air gauge on the space suit, it's over half full, which is enough. But what if he ran out? He'd have no way of calling for more, unless he fixed the array. So, off he goes, across the razor sharp regolith.\n", | |
temperature=0.6, | |
max_tokens=300, | |
top_p=1.0, | |
frequency_penalty=0.01, | |
presence_penalty=0.01 | |
) | |
print(response) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment