feat: smolagents example

This commit is contained in:
Timothy Jaeryang Baek
2025-01-08 01:56:06 -08:00
parent 231ed9f8dc
commit 0c404448e6
2 changed files with 104 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ from env import WEBUI_URL, TOKEN
async def send_message(channel_id: str, message: str):
url = f"{WEBUI_URL}/api/v1/channels/{channel_id}/messages/post"
headers = {"Authorization": f"Bearer {TOKEN}"}
data = {"content": message}
data = {"content": str(message)}
async with aiohttp.ClientSession() as session:
async with session.post(url, headers=headers, json=data) as response: