llama-deploy-appserver 0.3.6__py3-none-any.whl → 0.3.8__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.
- llama_deploy/appserver/deployment.py +29 -22
- {llama_deploy_appserver-0.3.6.dist-info → llama_deploy_appserver-0.3.8.dist-info}/METADATA +3 -3
- {llama_deploy_appserver-0.3.6.dist-info → llama_deploy_appserver-0.3.8.dist-info}/RECORD +4 -4
- {llama_deploy_appserver-0.3.6.dist-info → llama_deploy_appserver-0.3.8.dist-info}/WHEEL +0 -0
|
@@ -2,8 +2,8 @@ import asyncio
|
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
|
-
from pathlib import Path
|
|
6
5
|
from typing import Any, Tuple
|
|
6
|
+
from urllib.parse import quote_plus
|
|
7
7
|
|
|
8
8
|
from fastapi import FastAPI
|
|
9
9
|
from fastapi.responses import RedirectResponse
|
|
@@ -13,8 +13,9 @@ from llama_deploy.appserver.types import generate_id
|
|
|
13
13
|
from llama_deploy.appserver.workflow_loader import DEFAULT_SERVICE_ID
|
|
14
14
|
from llama_deploy.appserver.workflow_store.agent_data_store import AgentDataStore
|
|
15
15
|
from llama_deploy.core.deployment_config import DeploymentConfig
|
|
16
|
+
from starlette.requests import Request
|
|
17
|
+
from starlette.responses import HTMLResponse
|
|
16
18
|
from starlette.routing import Route
|
|
17
|
-
from starlette.staticfiles import StaticFiles
|
|
18
19
|
from workflows import Context, Workflow
|
|
19
20
|
from workflows.handler import WorkflowHandler
|
|
20
21
|
from workflows.server import SqliteWorkflowStore, WorkflowServer
|
|
@@ -129,29 +130,35 @@ class Deployment:
|
|
|
129
130
|
include_in_schema=True, # change to false when schemas are added to workflow server
|
|
130
131
|
tags=["workflows"],
|
|
131
132
|
)
|
|
132
|
-
# kludge, temporarily make it accessible to the debugger, which hard codes
|
|
133
|
-
app.add_api_route(
|
|
134
|
-
f"{route.path}",
|
|
135
|
-
route.endpoint,
|
|
136
|
-
name=f"_kludge_{config.name}_{route.name}",
|
|
137
|
-
methods=route.methods,
|
|
138
|
-
include_in_schema=False,
|
|
139
|
-
)
|
|
140
133
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
@app.get("/debugger", include_in_schema=False)
|
|
135
|
+
@app.get("/debugger/", include_in_schema=False)
|
|
136
|
+
def redirect_to_debugger(request: Request) -> RedirectResponse:
|
|
137
|
+
return RedirectResponse(
|
|
138
|
+
"/debugger/index.html?api=" + quote_plus("/deployments/" + config.name)
|
|
139
|
+
)
|
|
144
140
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
@app.get("/debugger/index.html", include_in_schema=False)
|
|
142
|
+
def serve_debugger(api: str | None = None):
|
|
143
|
+
if not api:
|
|
148
144
|
return RedirectResponse(
|
|
149
|
-
|
|
145
|
+
"/debugger/index.html?api="
|
|
146
|
+
+ quote_plus("/deployments/" + config.name)
|
|
150
147
|
)
|
|
148
|
+
else:
|
|
149
|
+
return HTMLResponse("""<!doctype html>
|
|
150
|
+
<html lang="en">
|
|
151
|
+
<head>
|
|
152
|
+
<meta charset="UTF-8" />
|
|
153
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
154
|
+
<title>workflow-debugger</title>
|
|
155
|
+
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@llamaindex/workflow-debugger@latest/dist/app.js"></script>
|
|
156
|
+
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@llamaindex/workflow-debugger@latest/dist/app.css">
|
|
157
|
+
</head>
|
|
158
|
+
<body>
|
|
159
|
+
<div id="root"></div>
|
|
160
|
+
</body>
|
|
161
|
+
</html>
|
|
162
|
+
""")
|
|
151
163
|
|
|
152
|
-
app.mount(
|
|
153
|
-
f"/deployments/{config.name}/debugger",
|
|
154
|
-
StaticFiles(directory=server_debugger),
|
|
155
|
-
name=f"debugger-{config.name}",
|
|
156
|
-
)
|
|
157
164
|
return server
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: llama-deploy-appserver
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Application server components for LlamaDeploy
|
|
5
5
|
Author: Massimiliano Pippi, Adrian Lyjak
|
|
6
6
|
Author-email: Massimiliano Pippi <mpippi@gmail.com>, Adrian Lyjak <adrianlyjak@gmail.com>
|
|
7
7
|
License: MIT
|
|
8
|
-
Requires-Dist: llama-index-workflows[server]>=2.
|
|
8
|
+
Requires-Dist: llama-index-workflows[server]>=2.5.0
|
|
9
9
|
Requires-Dist: pydantic-settings>=2.10.1
|
|
10
10
|
Requires-Dist: fastapi>=0.100.0
|
|
11
11
|
Requires-Dist: websockets>=12.0
|
|
12
|
-
Requires-Dist: llama-deploy-core>=0.3.
|
|
12
|
+
Requires-Dist: llama-deploy-core>=0.3.8,<0.4.0
|
|
13
13
|
Requires-Dist: httpx>=0.24.0,<1.0.0
|
|
14
14
|
Requires-Dist: prometheus-fastapi-instrumentator>=7.1.0
|
|
15
15
|
Requires-Dist: packaging>=25.0
|
|
@@ -3,7 +3,7 @@ llama_deploy/appserver/app.py,sha256=2a44039fd3ea017095894a35eea1c7b906f26f35268
|
|
|
3
3
|
llama_deploy/appserver/bootstrap.py,sha256=fa32be007f18b4b3af92c878bac417416c9afb09b1beddf51b5cd73115e6b7c6,2453
|
|
4
4
|
llama_deploy/appserver/configure_logging.py,sha256=194dd1ebed3c1d9065d9174f7828d557a577eaac8fb0443b3102430b1f578c19,6329
|
|
5
5
|
llama_deploy/appserver/correlation_id.py,sha256=8ac5bc6160c707b93a9fb818b64dd369a4ef7a53f9f91a6b3d90c4cf446f7327,572
|
|
6
|
-
llama_deploy/appserver/deployment.py,sha256=
|
|
6
|
+
llama_deploy/appserver/deployment.py,sha256=527ca4e2454b4e7ecff1c78aeb2264414fb5229d6ad3b92c4a940d10b9c43ceb,6462
|
|
7
7
|
llama_deploy/appserver/deployment_config_parser.py,sha256=e2b6c483203d96ab795c4e55df15c694c20458d5a03fab89c2b71e481291a2d3,510
|
|
8
8
|
llama_deploy/appserver/interrupts.py,sha256=14f262a0cedc00bb3aecd3d6c14c41ba0e88e7d2a6df02cd35b5bea1940822a2,1622
|
|
9
9
|
llama_deploy/appserver/process_utils.py,sha256=befee4918c6cf72082dca8bf807afb61ad3d6c83f01bc0c007594b47930570d8,6056
|
|
@@ -19,6 +19,6 @@ llama_deploy/appserver/workflow_loader.py,sha256=aa06b3cdc9cdbf7e4c58c1b5bbd2802
|
|
|
19
19
|
llama_deploy/appserver/workflow_store/agent_data_store.py,sha256=7b8d1b8cb6f741ff631d668fc955ca76a82e8da0bf8a27ee3bc9a8ef71123701,3594
|
|
20
20
|
llama_deploy/appserver/workflow_store/keyed_lock.py,sha256=bb1504d9de09d51a8f60721cc77b14d4051ac5a897ace6f9d9cba494f068465e,950
|
|
21
21
|
llama_deploy/appserver/workflow_store/lru_cache.py,sha256=7511231b6aba81ea96044cf644cd9c1f11d78190b7b7f578b1b5a55e2c218f9f,1323
|
|
22
|
-
llama_deploy_appserver-0.3.
|
|
23
|
-
llama_deploy_appserver-0.3.
|
|
24
|
-
llama_deploy_appserver-0.3.
|
|
22
|
+
llama_deploy_appserver-0.3.8.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
|
23
|
+
llama_deploy_appserver-0.3.8.dist-info/METADATA,sha256=e6b77d0e8bf46aa821e7eca04a7ec891e7081190f649cc320090711ce272601c,1007
|
|
24
|
+
llama_deploy_appserver-0.3.8.dist-info/RECORD,,
|
|
File without changes
|