Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- Dockerfile +5 -1
- __pycache__/app.cpython-312.pyc +0 -0
- app.py +5 -3
- src/opencode_api/routes/__pycache__/docs.cpython-312.pyc +0 -0
- src/opencode_api/routes/docs.py +1 -1
Dockerfile
CHANGED
|
@@ -4,10 +4,14 @@ WORKDIR /app
|
|
| 4 |
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
build-essential \
|
|
|
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
-
RUN pip install --no-cache
|
| 11 |
|
| 12 |
COPY . .
|
| 13 |
|
|
|
|
| 4 |
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
build-essential \
|
| 7 |
+
curl \
|
| 8 |
+
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
ENV PATH="/root/.local/bin:$PATH"
|
| 12 |
+
|
| 13 |
COPY requirements.txt .
|
| 14 |
+
RUN uv pip install --system --no-cache -r requirements.txt
|
| 15 |
|
| 16 |
COPY . .
|
| 17 |
|
__pycache__/app.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
|
|
|
app.py
CHANGED
|
@@ -40,6 +40,8 @@ app = FastAPI(
|
|
| 40 |
description="LLM Agent API Server - ported from TypeScript opencode",
|
| 41 |
version="0.1.0",
|
| 42 |
lifespan=lifespan,
|
|
|
|
|
|
|
| 43 |
)
|
| 44 |
|
| 45 |
# CORS settings for aicampus frontend
|
|
@@ -82,9 +84,9 @@ async def root():
|
|
| 82 |
"name": "OpenCode API",
|
| 83 |
"version": "0.1.0",
|
| 84 |
"status": "running",
|
| 85 |
-
"docs": "/
|
| 86 |
-
"swagger": "/docs",
|
| 87 |
-
"redoc": "/redoc"
|
| 88 |
}
|
| 89 |
|
| 90 |
|
|
|
|
| 40 |
description="LLM Agent API Server - ported from TypeScript opencode",
|
| 41 |
version="0.1.0",
|
| 42 |
lifespan=lifespan,
|
| 43 |
+
docs_url="/swagger-docs",
|
| 44 |
+
redoc_url="/redoc-docs",
|
| 45 |
)
|
| 46 |
|
| 47 |
# CORS settings for aicampus frontend
|
|
|
|
| 84 |
"name": "OpenCode API",
|
| 85 |
"version": "0.1.0",
|
| 86 |
"status": "running",
|
| 87 |
+
"docs": "/docs",
|
| 88 |
+
"swagger": "/swagger-docs",
|
| 89 |
+
"redoc": "/redoc-docs"
|
| 90 |
}
|
| 91 |
|
| 92 |
|
src/opencode_api/routes/__pycache__/docs.cpython-312.pyc
CHANGED
|
Binary files a/src/opencode_api/routes/__pycache__/docs.cpython-312.pyc and b/src/opencode_api/routes/__pycache__/docs.cpython-312.pyc differ
|
|
|
src/opencode_api/routes/docs.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from fastapi import APIRouter
|
| 2 |
from typing import List, Dict, Any
|
| 3 |
|
| 4 |
-
router = APIRouter(prefix="/
|
| 5 |
|
| 6 |
API_INFO = {
|
| 7 |
"title": "OpenCode API Documentation",
|
|
|
|
| 1 |
from fastapi import APIRouter
|
| 2 |
from typing import List, Dict, Any
|
| 3 |
|
| 4 |
+
router = APIRouter(prefix="/docs", tags=["Documentation"])
|
| 5 |
|
| 6 |
API_INFO = {
|
| 7 |
"title": "OpenCode API Documentation",
|