Merge branch 'main' into anthropic-implement

This commit is contained in:
Zishan
2025-02-05 15:37:45 +01:00
3 changed files with 59 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
# Python cache and test artifacts
__pycache__/
.pytest_cache/
.py[oc]
# Coverage and build artifacts
.coverage
htmlcov/
build/
dist/
wheels/
*.egg-info
# Virtual environment
.venv/
+5 -1
View File
@@ -6,7 +6,11 @@ from routes.anthropic import proxy as anthropic_proxy
from routes.open_ai import proxy as open_ai_proxy
from starlette_compress import CompressMiddleware
app = fastapi.FastAPI()
app = fastapi.app = fastapi.FastAPI(
docs_url="/api/v1/proxy/docs",
redoc_url="/api/v1/proxy/redoc",
openapi_url="/api/v1/proxy/openapi.json",
)
app.add_middleware(CompressMiddleware)
router = fastapi.APIRouter(prefix="/api/v1")
Executable
+39
View File
@@ -0,0 +1,39 @@
up() {
# Ensure the main network exists
docker network inspect invariant-explorer-web >/dev/null 2>&1 || \
docker network create invariant-explorer-web
# Start your local docker-compose services
docker compose -f docker-compose.local.yml up -d
echo "Proxy started at http://localhost/api/v1/proxy/"
echo "See http://localhost/api/v1/proxy/docs for API documentation"
}
build() {
# Build local services
docker compose -f docker-compose.local.yml build
}
down() {
# Bring down local services
docker compose -f docker-compose.local.yml down
}
# -----------------------------
# Command dispatcher
# -----------------------------
case "$1" in
"up")
up
;;
"build")
build
;;
"down")
down
;;
"logs")
docker compose -f docker-compose.local.yml logs -f
;;
esac