import os
import requests
payload = {
"input_prompt": "What about the XPS 16 Laptop by Dell?",
"messages": [
{"role": "user", "content": "hi"},
{
"role": "assistant",
"content": "Welcome to Carbon Bot. I'm an AI 🤖 designed to help calculate the environmental footprint of various consumer products. Send me a text or 🎙️voice note with the name of a product (or include a photo of the product) and I'll give you an answer based on reliable sources in my database. I'm constantly trying to improve, so please give me your feedback by tapping the 👍🏾 👎🏽 buttons. Now, what would you like to know? 🌱",
},
{
"role": "user",
"content": "What is the carbon footprint of a Mercedes-Benz GLS-Class",
},
{
"role": "assistant",
"content": "The carbon footprint for manufacturing a luxury SUV like the Mercedes-Benz GLS-Class ranges from 20,000 to 26,500 kg of CO2e. For the use phase, let's assume an average CO2 emission of about 200 g/km (a typical value for large SUVs) and an annual driving distance of 15,000 km. This results in approximately 3,000 kg of CO2e emitted per year during use.",
},
],
}
response = requests.post(
"https://api.gooey.ai/v2/video-bots?example_id=l0ynz3rd9h0x",
headers={
"Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
},
json=payload,
)
assert response.ok, response.content
result = response.json()
print(response.status_code, result)