lollmsbot 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lollmsbot/__init__.py +1 -0
- lollmsbot/agent.py +1682 -0
- lollmsbot/channels/__init__.py +22 -0
- lollmsbot/channels/discord.py +408 -0
- lollmsbot/channels/http_api.py +449 -0
- lollmsbot/channels/telegram.py +272 -0
- lollmsbot/cli.py +217 -0
- lollmsbot/config.py +90 -0
- lollmsbot/gateway.py +606 -0
- lollmsbot/guardian.py +692 -0
- lollmsbot/heartbeat.py +826 -0
- lollmsbot/lollms_client.py +37 -0
- lollmsbot/skills.py +1483 -0
- lollmsbot/soul.py +482 -0
- lollmsbot/storage/__init__.py +245 -0
- lollmsbot/storage/sqlite_store.py +332 -0
- lollmsbot/tools/__init__.py +151 -0
- lollmsbot/tools/calendar.py +717 -0
- lollmsbot/tools/filesystem.py +663 -0
- lollmsbot/tools/http.py +498 -0
- lollmsbot/tools/shell.py +519 -0
- lollmsbot/ui/__init__.py +11 -0
- lollmsbot/ui/__main__.py +121 -0
- lollmsbot/ui/app.py +1122 -0
- lollmsbot/ui/routes.py +39 -0
- lollmsbot/wizard.py +1493 -0
- lollmsbot-0.0.1.dist-info/METADATA +25 -0
- lollmsbot-0.0.1.dist-info/RECORD +32 -0
- lollmsbot-0.0.1.dist-info/WHEEL +5 -0
- lollmsbot-0.0.1.dist-info/entry_points.txt +2 -0
- lollmsbot-0.0.1.dist-info/licenses/LICENSE +201 -0
- lollmsbot-0.0.1.dist-info/top_level.txt +1 -0
lollmsbot/ui/routes.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""
|
|
2
|
+
FastAPI router for the LollmsBot Web UI.
|
|
3
|
+
|
|
4
|
+
Provides API routes for the web interface, including health checks,
|
|
5
|
+
settings management, and conversation endpoints.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from fastapi import APIRouter, Request
|
|
9
|
+
from fastapi.responses import JSONResponse
|
|
10
|
+
|
|
11
|
+
ui_router = APIRouter(
|
|
12
|
+
prefix="/ui-api",
|
|
13
|
+
tags=["ui"],
|
|
14
|
+
responses={404: {"description": "Not found"}},
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@ui_router.get("/health")
|
|
19
|
+
async def ui_health() -> dict:
|
|
20
|
+
"""Health check endpoint for the UI."""
|
|
21
|
+
return {
|
|
22
|
+
"status": "ok",
|
|
23
|
+
"service": "lollmsbot-ui",
|
|
24
|
+
"version": "0.1.0",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@ui_router.get("/config")
|
|
29
|
+
async def ui_config(request: Request) -> dict:
|
|
30
|
+
"""Get current UI configuration (safe values only)."""
|
|
31
|
+
# Return non-sensitive configuration for the frontend
|
|
32
|
+
return {
|
|
33
|
+
"max_history": 10,
|
|
34
|
+
"features": {
|
|
35
|
+
"tools": True,
|
|
36
|
+
"settings": True,
|
|
37
|
+
"streaming": True,
|
|
38
|
+
},
|
|
39
|
+
}
|