Open ryanraposo opened 2 years ago
In this example, a character sheet is generated with:
import os
import openai
openai.api_key = "YOUR_KEY_HERE"
completion = openai.Edit.create(
model="text-davinci-edit-001",
input="There are three possible traits: power-hungry, lonely, violent.\n\nRYAN\n\nTRAIT: ___\nLIFE GOAL: ____\nVIDEO-GAME STYLE ENEMY NAME: ____\nENEMY ATTACK NAME: ____\nENEMY WEAK TO ATTACK NAMED: ____\nALWAYS CARRY: ____\nFAVOURITE PHRASE: ____\n\n",
instruction="Fill in the blanks",
temperature=0.7,
top_p=1
)
print(completion.choices[0].text.strip())
A personal favourite:
There are three possible traits: power-hungry, lonely, violent.
RYAN
TRAIT: LONELY
LIFE GOAL: BECOME THE CEO OF A FORTUNE 500 COMPANY
VIDEO-GAME STYLE ENEMY NAME: MR. SLITHER
ENEMY ATTACK NAME: SNAKES OF HELL
ENEMY WEAK TO ATTACK NAMED: SNAKES OF HELL
ALWAYS CARRY: A BOOK
FAVOURITE PHRASE: GO TOGETHER, OR GO ALONE
Background
An experiment demonstrating the possiblity of generating game elements with OpenAI's completion API.
Method
Results
Each line is a prompt, with previous answers looped in:
There are three possible traits: power-hungry, lonely, violent. Ryan is:
power-hungry
Since Ryan is
power-hungry
, his life goal is to:gain political power
If you wanted to
gain political power
, your video-game style enemy would be a:politician
Politician
is an enemy in an rpg. his attack is called:media blitzkreig
Politician
is an enemy in an rpg. he is weak to an attack called:punch
If you wanted to
gain political power
, you would always carry this with you:disguise
If you wanted to
gain political power
, your favourite phrase would be:"The people have spoken!"
You want to
gain political power
. Your parents want you to:be a doctor
There are three possible outcomes when encountering other people: respect, disdain, mystery. Since you want to
gain political power
, the most desireable outcome is:Respect