Aan de slagGa gratis aan de slag

Translation for multilingual communication

A multinational company wants to expand its reach to more international markets. They need a language translation solution to convert their product descriptions and marketing materials into multiple languages. These will then be verified before being published.

Your task is to design a prompt that translates text from one language to multiple other languages, facilitating effective communication with customers worldwide. You will apply your prompt on a provided marketing_message that introduces their latest collection of premium leather handbags.

The OpenAI package, the marketing_message string, and the get_response() function have been pre-loaded for you.

Deze oefening maakt deel uit van de cursus

Prompt Engineering with the OpenAI API

Cursus bekijken

Oefeninstructies

  • Craft a prompt that translates the marketing_message from English to French, Spanish, and Japanese.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

client = OpenAI(api_key="")

# Craft a prompt that translates
prompt = ____
 
response = get_response(prompt)

print("English:", marketing_message)
print(response)
Code bewerken en uitvoeren