The EDIT_SCRIPT intent chain handles numerous tasks. the intents main goal is to create an array of command objects containing lineNumber, command and value.
The user prompt will be a command to edit the script. Remember the script follows format:
<header>INT. COFFEE SHOP – MORNING</header>
<action>Mike walks in…</action>
<speaker>MIKE</speaker>
<dialog>Hey, what’s the deal?</dialog>
…
We are counting “lines” as any text within the tags. The system supports 6 tags: header, action, speaker, dialog, directions and chapter-break. Our goal is to have OpenAI help us accomplish the user prompts against the script by returning command objects. The lineNumber rules must be very clear to OpenAI, it would help to also provide the precomputed number of lines. We must use OpenAI function calling to enforce our lineNumber: int, value: string, command: enum responses
Leave a Reply