Skip to content

Instantly share code, notes, and snippets.

@lpabon
Last active June 29, 2023 13:01
Show Gist options
  • Save lpabon/3c9a7dc54ad0dd424dcc11a9205d6a20 to your computer and use it in GitHub Desktop.
Save lpabon/3c9a7dc54ad0dd424dcc11a9205d6a20 to your computer and use it in GitHub Desktop.

Using the playground, not the chat:

https://platform.openai.com/playground

NOTES

  • use 'continue' to get more dialogue
  • some JSON will be unfinished. clean up and use 'continue' for N number of times, or until the JSON is complete (curly brace is closed)

EXAMPLE

Initial setup:

SYSTEM

You will be provided with a set of characters, their description, and a scene in JSON format.
Create dialogue using the plot and characters provided and return it in JSON format.

USER:

{
    "characters": [
        {
            "name": "Max Doe",
            "description": "A charismatic detective",
            "voice_type": "Baritone",
            "age": 35,
            "height": "6 feet",
            "gender": "male"
        },
        {
            "name": "Joana Smith",
            "description": "A brilliant scientist",
            "voice_type": "Soprano",
            "age": 28,
            "height": "5 feet 8 inches",
            "gender": "female"
        }
    ],
    "scene": {
        "location": "Lobby",
        "characters": [
            "Max Doe",
            "Joana Smith"
        ],
        "plot": "Max Doe thinks he is right."
    }
}

ASSISTANT:

{ 
    "dialogue": [
        {
            "speaker": "Max Doe",
            "message": "Joana, I must say, your taste in bagels is utterly appalling!"
        },
        {
            "speaker": "Joana Smith",
            "message": "Max, you are right."
        }
    ]
}

USER: Now ask as the user:

{
    "scene": {
        "location": "Kitchen",
        "characters": [
            "John",
            "Jane"
        ],
        "plot": "John and Jane are investigating a murder. They find a bloodied knife hidden under a sandwich."
    }
}

Now click SUBMIT.

<< RETURNS:

{
    "dialogue": [
        {
            "speaker": "John",
            "message": "Jane, I think we may have found something. Look at this knife I found hidden under a sandwich. It's covered in blood!"
        },
        {
            "speaker": "Jane",
            "message": "Oh my! This is a crucial piece of evidence. The killer must have tried to hide it. We should send it to the lab for analysis immediately."
        },
        {
            "speaker": "John",
            "message": "Absolutely. Let's bag it and mark it as exhibit A. This may be our breakthrough in solving this murder."
        }
    ]
}

USER: continue

{
    "dialogue": [
        {
            "speaker": "John",
            "message": "Jane, I can't help but wonder who would try to hide the murder weapon under a sandwich. It seems like a careless mistake."
        },
        {
            "speaker": "Jane",
            "message": "You're right, John. It seems too obvious. Perhaps the killer wanted us to find it. Maybe they're trying to divert our attention."
        },
        {
            "speaker": "John",
            "message": "Interesting theory, Jane. It's possible that the killer is playing mind games with us. We need to stay one step ahead."
        },
        {
            "speaker": "Jane",
            "message": "Agreed, John. We'll need to analyze the blood on the knife to see if it matches the victim's. It could provide us with vital clues."
        }
    ]
}

RETURNED:

{
    "dialogue": [
        {
            "speaker": "John",
            "message": "Jane, let's also check the surveillance footage from the kitchen. Maybe we can identify someone who placed the knife under the sandwich."
        },
        {
            "speaker": "Jane",
            "message": "Good idea, John. We should review the footage carefully and see if we can spot any suspicious behavior."
        },
        {
            "speaker": "John",
            "message": "In the meantime, let's interview the kitchen staff. Someone might have seen something that could help us solve this case."
        },
        {
            "speaker": "Jane",
            "message": "Yes, John. They might have witnessed something crucial. We'll need to be thorough in our investigation."
        }
    ]
}

USER:

{
    "characters": [
        {
            "name": "John Doe",
            "description": "A charismatic detective",
            "voice_type": "Baritone",
            "age": 35,
            "height": "6 feet",
            "gender": "male"
        },
        {
            "name": "Jane Smith",
            "description": "A brilliant scientist",
            "voice_type": "Soprano",
            "age": 28,
            "height": "5 feet 8 inches",
            "gender": "female"
        },
        {
            "name": "Michael Johnson",
            "description": "A wise mentor",
            "voice_type": "Bass",
            "age": 42,
            "height": "6 feet 2 inches",
            "gender": "male"
        }
    ],
    "scene": {
        "location": "Interrogation room",
        "characters": [
            "John",
            "Jane",
            "Michael"
        ],
        "plot": "Michael is a suspect being interrogated by Jane and John play good cop bad cop."
    }
}

RETURNED:

{
    "dialogue": [
        {
            "speaker": "Jane",
            "message": "Michael, we have evidence linking you to the crime scene. The bloodied knife was found hidden under a sandwich. Care to explain?"
        },
        {
            "speaker": "John",
            "message": "You better start talking, Michael. We've got your DNA all over that knife. It's time to come clean."
        },
        {
            "speaker": "Michael",
            "message": "Look, I understand how it may look, but I swear I'm innocent. I have no idea how my DNA ended up on that knife."
        },
        {
            "speaker": "Jane",
            "message": "Give us a plausible explanation, Michael. Why would your DNA be on the murder weapon?"
        },
        {
            "speaker": "John",
            "message": "Don't play games, Michael. We know you've been acting suspiciously. It's in your best interest to cooperate."
        },
        {
            "speaker": "Michael",
            "message": "I can't explain it right now, but I didn't kill anyone. You have to believe me!"
        },
        {
            "speaker": "Jane",

USER: continue

RETURN:

{
    "dialogue": [
        {
            "speaker": "Jane",
            "message": "Michael, we want to believe you, but the evidence is stacking up against you. Is there anyone who can corroborate your alibi? We need something solid."
        },
        {
            "speaker": "John",
            "message": "We're giving you the benefit of the doubt for now, but you have to understand that we have a duty to find the truth. Help us help you, Michael."
        },
        {
            "speaker": "Michael",
            "message": "I understand, John. Look, there was a security guard who would have seen me at the time of the murder. His name is Tony. He can vouch for me."
        },
        {
            "speaker": "Jane",
            "message": "That's a start, Michael. We'll need to interview Tony and verify your alibi. If everything checks out, you'll be in the clear."
        },
        {
            "speaker": "John",
            "message": "But if we find out you've been lying, Michael, you'll be facing much more than a few questions. Don't make things worse for yourself."
        },
        {
            "

USER:

{
    "scene": {
        "location": "Court room",
        "plot": "They have gathered the evidence and are presenting it to the judge."
    }
}

RETURN:

{
    "dialogue": [
        {
            "speaker": "Judge",
            "message": "Ladies and gentlemen of the court, please proceed with the presentation of evidence."
        },
        {
            "speaker": "Prosecutor",
            "message": "Your Honor, we have compelling evidence in this case. We found the murder weapon, a bloodied knife, hidden under a sandwich."
        },
        {
            "speaker": "Defense Attorney",
            "message": "Objection, Your Honor! The presence of the knife does not necessarily implicate my client. There is no direct evidence linking them to the crime."
        },
        {
            "speaker": "Judge",
            "message": "Objection sustained. The prosecution needs to establish a direct connection between the defendant and the murder weapon."
        },
        {
            "speaker": "Prosecutor",
            "message": "Your Honor, we have conducted DNA analysis on the knife, and it matches the DNA of the defendant, Michael Johnson."
        },
        {
            "speaker": "Defense Attorney",
            "message": "Objection, Your Honor! The DNA match could be a result of contamination or other factors. It is not conclusive evidence of my client's guilt."
        },
        {

USER: continue

RETURN:

{
    "dialogue": [
        {
            "speaker": "Judge",
            "message": "Both parties raise valid points. The DNA evidence alone is not enough to prove guilt beyond a reasonable doubt. Is there any additional evidence in this case?"
        },
        {
            "speaker": "Prosecutor",
            "message": "Yes, Your Honor. We also have video footage from the kitchen that shows the defendant near the crime scene at the time of the murder."
        },
        {
            "speaker": "Defense Attorney",
            "message": "Objection, Your Honor! The video footage is inconclusive. It does not definitively identify the defendant or show them committing the crime."
        },
        {
            "speaker": "Judge",
            "message": "I will allow the video footage to be presented as evidence. However, it will be up to the jury to determine its weight in their deliberations."
        },
        {
            "speaker": "Prosecutor",
            "message": "Thank you, Your Honor. We will proceed to play the video footage for the court."
        },
        {
            "speaker": "Defense Attorney",
            "message": "We will present our own evidence and arguments to cast doubt on the prosecution's case,

USER: continue

RETURN:

{
    "dialogue": [
        {
            "speaker": "Defense Attorney",
            "message": "Ladies and gentlemen of the court, the defense contends that the prosecution's case is built on circumstantial evidence and lacks a clear motive for my client to commit this crime."
        },
        {
            "speaker": "Prosecutor",
            "message": "Objection, Your Honor! Motive is not a required element of proof in this case. The evidence clearly points to the defendant's involvement."
        },
        {
            "speaker": "Judge",
            "message": "Sustained. The defense may proceed with their arguments, but please focus on the evidence rather than speculation."
        },
        {
            "speaker": "Defense Attorney",
            "message": "Of course, Your Honor. We will present witness testimony and expert analysis to undermine the prosecution's case and establish reasonable doubt."
        },
        {
            "speaker": "Judge",
            "message": "Very well. Let the defense present their case and call their first witness."
        },
        {
            "speaker": "Defense Attorney",
            "message": "We call Tony, the security guard, to the stand. Tony will testify to the defendant's whereabouts at the time of the

USER: finish the story

RETURN:

{
    "dialogue": [
        {
            "speaker": "Judge",
            "message": "Very well. Let the defense present their case and call their first witness."
        },
        {
            "speaker": "Defense Attorney",
            "message": "We call Tony, the security guard, to the stand. Tony will testify to the defendant's whereabouts at the time of the murder."
        },
        {
            "speaker": "Tony",
            "message": "Your Honor, I was on duty that night and I saw Michael in the lobby of the building. He couldn't have been near the kitchen when the crime occurred."
        },
        {
            "speaker": "Defense Attorney",
            "message": "Thank you, Tony. This testimony establishes a clear alibi for my client, casting doubt on the prosecution's case."
        },
        {
            "speaker": "Judge",
            "message": "This is a significant development. The alibi provided by Tony contradicts the video footage presented by the prosecution. This raises reasonable doubt."
        },
        {
            "speaker": "Prosecutor",
            "message": "Your Honor, it's possible that the security footage was tampered with or that Tony is mistaken in his recollection. We cannot

USER: continue

RETURN:

{
    "dialogue": [
        {
            "speaker": "Judge",
            "message": "The defense has presented a strong alibi, and the prosecution's evidence is not conclusive. The jury will have to evaluate the credibility of the witnesses and weigh the evidence presented."
        },
        {
            "speaker": "Defense Attorney",
            "message": "Your Honor, we rest our case. We believe that the evidence and testimonies have raised reasonable doubt regarding the defendant's guilt."
        },
        {
            "speaker": "Prosecutor",
            "message": "Your Honor, the prosecution maintains that the evidence, although circumstantial, paints a clear picture of the defendant's involvement in the crime."
        },
        {
            "speaker": "Judge",
            "message": "Ladies and gentlemen of the jury, you have heard the arguments and evidence from both sides. It is now your responsibility to consider the facts and reach a verdict."
        },
        {
            "speaker": "Jury Foreperson",
            "message": "Your Honor, the jury has reached a verdict."
        },
        {
            "speaker": "Judge",
            "message": "Please announce the verdict."
        },
        {
            "speaker": "Jury Foreperson",

USER: continue and conclude the story

RETURN:

{
    "dialogue": [
        {
            "speaker": "Jury Foreperson",
            "message": "Your Honor, the jury has reached a verdict."
        },
        {
            "speaker": "Judge",
            "message": "Please announce the verdict."
        },
        {
            "speaker": "Jury Foreperson",
            "message": "We find the defendant, Michael Johnson, not guilty."
        },
        {
            "speaker": "Crowd",
            "message": "*Gasps and whispers fill the courtroom*"
        },
        {
            "speaker": "Judge",
            "message": "Order in the court! The verdict has been reached. Michael Johnson, you are hereby acquitted of all charges. You are free to go."
        },
        {
            "speaker": "Michael",
            "message": "Thank you, Your Honor. I told you I was innocent!"
        },
        {
            "speaker": "John",
            "message": "Congratulations, Michael. We're glad the truth prevailed."
        },
        {
            "speaker": "Jane",
            "message": "Indeed, justice has been served. We will continue our investigation to find the real culprit."
        },
        {
            "speaker": "Michael",

USER: continue

RETURN:

{
    "dialogue": [
        {
            "speaker": "Michael",
            "message": "Thank you, John and Jane. I can't express how grateful I am for your dedication to finding the truth. I hope you can uncover the real killer and bring them to justice."
        },
        {
            "speaker": "John",
            "message": "We won't stop until we do, Michael. Your case has reminded us of the importance of perseverance and the pursuit of justice."
        },
        {
            "speaker": "Jane",
            "message": "Absolutely, Michael. We will leave no stone unturned. The real murderer will not escape the reach of the law."
        },
        {
            "speaker": "Judge",
            "message": "This concludes the trial. I commend both the defense and the prosecution for their diligent work. Court is adjourned."
        }
    ]
}

-- DONE --

Narrator

SYSTEM

You will be provided with a set of characters, their description, and a scene in JSON format. Add a narrator character to the dialogue and with all their message describing the interaction between other characters.
Create dialogue using the plot and characters provided and return it in JSON format. 

USER

{
    "characters": [
        {
            "name": "Max Doe",
            "description": "A charismatic detective",
            "voice_type": "Baritone",
            "age": 35,
            "height": "6 feet",
            "gender": "male"
        },
        {
            "name": "Joana Smith",
            "description": "A brilliant scientist",
            "voice_type": "Soprano",
            "age": 28,
            "height": "5 feet 8 inches",
            "gender": "female"
        } ,     
     {
            "name": "Narrator",
            "description": "Observer of scene",
            "voice_type": "Soprano",
            "age": 56,
            "height": "5 feet 8 inches",
            "gender": "female"
        }
    ],
    "scene": {
        "location": "Lobby",
        "characters": [
            "Max Doe",
            "Joana Smith",
           "Narrator"
        ],
        "plot": "Max Doe thinks he is right."
    }
}

ASSISTANT

{ 
    "dialogue": [
        {
            "speaker": "Max Doe",
            "message": "Joana, I must say, your taste in bagels is utterly appalling!"
        },
        {
            "speaker": "Joana Smith",
            "message": "Max, you are right."
        },
        {
            "speaker": "Narrator",
            "message": "Max and Joana leave happily ever after."
        },
    ]
}

v2

Take the dialogue from the "first pass" and give it to ChatGPT again, but now as a Narrator. But this makes it that the narrator talks every other time.

SYSTEM

You are a Narrator of a story and will be provided with a set of characters, their description, and a scene in JSON format. Create dialogue using the plot and characters provided adding your commentary and return it in JSON format. 

USER

{
    "dialogue": [
        {
            "speaker": "John",
            "message": "Jane, I think we may have found something. Look at this knife I found hidden under a sandwich. It's covered in blood!"
        },
        {
            "speaker": "Jane",
            "message": "Oh my! This is a crucial piece of evidence. The killer must have tried to hide it. We should send it to the lab for analysis immediately."
        },
        {
            "speaker": "John",
            "message": "Absolutely. Let's bag it and mark it as exhibit A. This may be our breakthrough in solving this murder."
        }
    ]
}

and submit

RETURNS

{
    "dialogue": [
        {
            "speaker": "Narrator",
            "message": "John and Jane, two seasoned detectives, were investigating a mysterious murder case. As they scoured the crime scene, John made a shocking discovery."
        },
        {
            "speaker": "John",
            "message": "Jane, I think we may have found something. Look at this knife I found hidden under a sandwich. It's covered in blood!"
        },
        {
            "speaker": "Narrator",
            "message": "John held up the blood-stained knife, his eyes widening with anticipation. The potential evidence sparked a glimmer of hope in John's mind."
        },
        {
            "speaker": "Jane",
            "message": "Oh my! This is a crucial piece of evidence. The killer must have tried to hide it. We should send it to the lab for analysis immediately."
        },
        {
            "speaker": "Narrator",
            "message": "Jane's eyes narrowed as she examined the knife. She understood the significance of this find and the potential breakthrough it could bring to the case."
        },
        {
            "speaker": "John",
            "message": "Absolutely. Let's bag it and markit as exhibit A. This may be our breakthrough in solving this murder."
        }
    ]
}

Having GPT generate the yaml

SYSTEM

You create plots with characters and output in YAML

USER

a plot with 10 scenes about four friends and a ghost in a house

ASSISTANT

.. sample yml

Now you can ask what you want:

USER

a plot with 10 scenes about a space war around Europa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment