Spaces:
Runtime error
Runtime error
Update from brunch
Browse files- app/api/tools_server.py +5 -5
- token.json +1 -1
app/api/tools_server.py
CHANGED
|
@@ -3,6 +3,8 @@ import uvicorn
|
|
| 3 |
from app.agents.igor_agent import IgorAgent
|
| 4 |
import os
|
| 5 |
from app.utils.waapi_utils import receive_message
|
|
|
|
|
|
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
|
|
@@ -24,11 +26,10 @@ async def waapi_webhook(request: Request):
|
|
| 24 |
igor_agent.process_whatsapp_message(parsed_message)
|
| 25 |
return {"status": 200}
|
| 26 |
|
| 27 |
-
@app.get('/')
|
| 28 |
async def home():
|
| 29 |
"""Home page with information about the application's abilities."""
|
| 30 |
-
return (
|
| 31 |
-
"""
|
| 32 |
<html>
|
| 33 |
<head>
|
| 34 |
<title>IgorAI Tools Server</title>
|
|
@@ -54,8 +55,7 @@ async def home():
|
|
| 54 |
</div>
|
| 55 |
</body>
|
| 56 |
</html>
|
| 57 |
-
"""
|
| 58 |
-
)
|
| 59 |
|
| 60 |
if __name__ == '__main__':
|
| 61 |
uvicorn.run(app, host='0.0.0.0', port=9796)
|
|
|
|
| 3 |
from app.agents.igor_agent import IgorAgent
|
| 4 |
import os
|
| 5 |
from app.utils.waapi_utils import receive_message
|
| 6 |
+
from fastapi.responses import HTMLResponse
|
| 7 |
+
import textwrap
|
| 8 |
|
| 9 |
app = FastAPI()
|
| 10 |
|
|
|
|
| 26 |
igor_agent.process_whatsapp_message(parsed_message)
|
| 27 |
return {"status": 200}
|
| 28 |
|
| 29 |
+
@app.get('/', response_class=HTMLResponse)
|
| 30 |
async def home():
|
| 31 |
"""Home page with information about the application's abilities."""
|
| 32 |
+
return textwrap.dedent("""
|
|
|
|
| 33 |
<html>
|
| 34 |
<head>
|
| 35 |
<title>IgorAI Tools Server</title>
|
|
|
|
| 55 |
</div>
|
| 56 |
</body>
|
| 57 |
</html>
|
| 58 |
+
""")
|
|
|
|
| 59 |
|
| 60 |
if __name__ == '__main__':
|
| 61 |
uvicorn.run(app, host='0.0.0.0', port=9796)
|
token.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"token": "ya29.
|
|
|
|
| 1 |
+
{"token": "ya29.a0AW4XtxijeMYRxQ-Ne3XwzQopcwX3vBHj73v2a_PPH_kIuCe0dgzE4IeHwUa_qnd5ZoYCOltWF0gdNQkyV2gG9oO0hkcs0KR5blrgluisyfuZkzSQh1MO_ByQgl8ajE9taCpnGSLfJvRzyZyChqGKXzIAxt64cBoiy43wu_g5aCgYKAXMSARcSFQHGX2Mic_lGew5DUeNAKHi0mx1rPA0175", "refresh_token": "1//09rB0vt1byBPUCgYIARAAGAkSNwF-L9Irnb-722oUr1qWxNyTrgHBw5g4CXPlqh2F1IMoGCkTCkYRiuaEHWiAChQUzCFi_8LjTEA", "token_uri": "https://oauth2.googleapis.com/token", "client_id": "499564774088-rh5r95cgo1p1o4lr94fvbrd7jg9p494f.apps.googleusercontent.com", "client_secret": "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", "scopes": ["https://www.googleapis.com/auth/gmail.readonly", "https://www.googleapis.com/auth/gmail.send"], "universe_domain": "googleapis.com", "account": "", "expiry": "2025-05-21T21:24:24.874847Z"}
|