diff --git a/.dockerignore b/.dockerignore index eff3dca4f..a25c7ee96 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,7 +4,7 @@ scripts/ tests/ examples/ -local-server/ +local_server/ *.md *.pyc .dockerignore diff --git a/README.md b/README.md index d4cb5d8f5..85569e9e2 100644 --- a/README.md +++ b/README.md @@ -360,7 +360,7 @@ Append `docs` to the URL shown in the terminal and open it in a browser to acces ### Testing a Localhost Plugin in ChatGPT -To test a localhost plugin in ChatGPT, use the provided [`local-server/main.py`](/local-server/main.py) file, which is specifically configured for localhost testing with CORS settings, no authentication and routes for the manifest, OpenAPI schema and logo. +To test a localhost plugin in ChatGPT, use the provided [`local_server/main.py`](/local_server/main.py) file, which is specifically configured for localhost testing with CORS settings, no authentication and routes for the manifest, OpenAPI schema and logo. Follow these steps to test your localhost plugin: diff --git a/local-server/ai-plugin.json b/local_server/ai-plugin.json similarity index 100% rename from local-server/ai-plugin.json rename to local_server/ai-plugin.json diff --git a/local-server/logo.png b/local_server/logo.png similarity index 100% rename from local-server/logo.png rename to local_server/logo.png diff --git a/local-server/main.py b/local_server/main.py similarity index 94% rename from local-server/main.py rename to local_server/main.py index ce274b5a2..93182aa9f 100644 --- a/local-server/main.py +++ b/local_server/main.py @@ -41,19 +41,19 @@ @app.route("/.well-known/ai-plugin.json") async def get_manifest(request): - file_path = "./local-server/ai-plugin.json" + file_path = "./local_server/ai-plugin.json" return FileResponse(file_path, media_type="text/json") @app.route("/.well-known/logo.png") async def get_logo(request): - file_path = "./local-server/logo.png" + file_path = "./local_server/logo.png" return FileResponse(file_path, media_type="text/json") @app.route("/.well-known/openapi.yaml") async def get_openapi(request): - file_path = "./local-server/openapi.yaml" + file_path = "./local_server/openapi.yaml" return FileResponse(file_path, media_type="text/json") @@ -142,4 +142,4 @@ async def startup(): def start(): - uvicorn.run("local-server.main:app", host="localhost", port=PORT, reload=True) + uvicorn.run("local_server.main:app", host="localhost", port=PORT, reload=True) diff --git a/local-server/openapi.yaml b/local_server/openapi.yaml similarity index 100% rename from local-server/openapi.yaml rename to local_server/openapi.yaml diff --git a/pyproject.toml b/pyproject.toml index d4d4e1ddb..67f539898 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ pgvector = "^0.1.7" [tool.poetry.scripts] start = "server.main:start" -dev = "local-server.main:start" +dev = "local_server.main:start" [tool.poetry.group.dev.dependencies] httpx = "^0.23.3"