import requests
url = "https://api.sunbird.ai/tasks/sunflower_inference"
payload = {
"messages": [
{"role": "system", "content": "You are a helpful assistant who speaks Luganda."},
{"role": "user", "content": "Translate 'Welcome' to Luganda."},
{"role": "assistant", "content": "In Luganda, 'Welcome' is 'Tukusanyukidde'."},
{"role": "user", "content": "How do I respond to that?"}
]
}
headers = {
"Authorization": "Bearer <YOUR_TOKEN>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())