This function prepares a request to the OpenAI API to generate a concise summary in the language needed from a given transcript.
def generate_summary_from_transcription(transcription):
messages = [
{"role": "system", "content": "You are a concise summary writer."},
{"role": "user", "content": f"From the content of the generated transcript, make a summary in Spanish.\n\nTranscripción:\n{transcription}"}
]