import openai
client = openai.OpenAI()
script_prompt = "Here's the data from a scene index for a video from a jewellery product photoshoot. Study this and then generate a synced script based on the description below. Make sure the script is in the language, voice and style of a professional voiceover artist skilled at weaving beautiful storytelling in advertisements.\n \n"
full_prompt = script_prompt
# run this prompt for each scene
for scene in scenes:
full_prompt += f"- {scene}\n"
openai_res = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "system", "content": full_prompt}],
)
voiceover_script = openai_res.choices[0].message.content
# Truncate first 1000 characters of script
# If you have Wellsaid's paid plan remove this
voiceover_script = voiceover_script[:1000]