mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
12 lines
231 B
Python
12 lines
231 B
Python
|
import requests
|
||
|
|
||
|
|
||
|
def post_webhook(url: str, json: dict) -> bool:
|
||
|
try:
|
||
|
r = requests.post(url, json=json)
|
||
|
r.raise_for_status()
|
||
|
return True
|
||
|
except Exception as e:
|
||
|
print(e)
|
||
|
return False
|