import openai openai.api_key = "input-api-key-here" MODEL = "gpt-3.5-turbo" text_to_translate = "Explain asynchronous programming in the style of the pirate Blackbeard." response = openai.ChatCompletion.create( model=MODEL, messages=[ {"role": "system", "content": "You will be provided with a sentence in English, and your task is to translate it into Vietnamese."}, {"role": "user", "content": f"{text_to_translate}"}, ], temperature=0, ) print(response['choices'][0]['message']['content'])