diff --git a/README.md b/README.md index a6dfabc..9337a40 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ echo "OPENAI_API_KEY=sk-your-key" > .env poetry install poetry shell poetry run uvicorn main:app --reload --port 7001 + +# Useful for debugging purposes when you don't want to waste GPT4-Vision credits +MOCK=true poetry run uvicorn main:app --reload --port 7001 ``` Run the frontend: diff --git a/backend/main.py b/backend/main.py index 72b4dd7..1dc9333 100644 --- a/backend/main.py +++ b/backend/main.py @@ -33,7 +33,7 @@ app.add_middleware( # Useful for debugging purposes when you don't want to waste GPT4-Vision credits # Setting to True will stream a mock response instead of calling the OpenAI API -SHOULD_MOCK_AI_RESPONSE = False +SHOULD_MOCK_AI_RESPONSE = os.environ.get("MOCK", False) app.include_router(screenshot.router)