mirror of
https://github.com/open-webui/bot
synced 2025-06-26 18:16:24 +00:00
feat: smolagents example
This commit is contained in:
2
utils.py
2
utils.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user