import os
import requests
payload = {
"input_prompt": "what's BC?",
"messages": [
{"role": "user", "content": "Hi"},
{
"role": "assistant",
"content": "Welcome to Farmer.CHAT. I'm an AI 🤖 designed to help farmers and extension agents. Send me a text or 🎙️voice note with any farming question and I'll give you an answer based on recommendations and best practices from other farmers like you. 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": "Hello"},
{"role": "assistant", "content": "Hello! How can I assist you today?"},
{"role": "user", "content": "What saving advice would you have for me?"},
{
"role": "assistant",
"content": "According to the financial literacy guide, there are a few ways to save money. One way is to reduce expenses on non-essential items by spending judiciously. For example, if you're drinking 4 cups of tea every day, you could consider reducing it to 2 cups and save the money you would have spent on the extra cups. Another way to save is by depositing your savings in a bank account, as it is safer and your money can grow through interest. It's important to save regularly so that you have enough money for emergencies, unexpected events, lean periods, old age, and for purchasing things you cannot afford from regular income. By maintaining a financial diary, you can track your expenses and identify areas where you can cut back spending and increase savings. Remember, the longer you save, the more your savings will grow.",
},
],
}
response = requests.post(
"https://api.gooey.ai/v2/video-bots?example_id=stpdnoyd",
headers={
"Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
},
json=payload,
)
assert response.ok, response.content
result = response.json()
print(response.status_code, result)