SciPhi-AI / R2R

The Elasticsearch for RAG. Build, scale, and deploy state of the art Retrieval-Augmented Generation applications
https://r2r-docs.sciphi.ai/
MIT License
3.25k stars 238 forks source link

Website not working - "GET / HTTP/1.1" 404 Not Found" #911

Closed j-pielen closed 3 weeks ago

j-pielen commented 3 weeks ago

Here's how your problem can be applied to the GitHub issue template:


Describe the bug When attempting to serve the R2R application locally, the website displays a blank page instead of the expected content. The CLI indicates that the server has started successfully, but accessing the homepage returns a 404 Not Found error.

To Reproduce Steps to reproduce the behavior:

  1. Configure R2R locally without using Docker.
  2. Successfully ingest and query data via the CLI.
  3. Run the command poetry run r2r serve.
  4. Open a web browser and navigate to http://localhost:8000.
  5. Observe the blank page and check the terminal output for the 404 error.

Expected behavior The website should display the main interface of the R2R application when accessed via the browser.

Screenshots image

Additional context I run this on my remote ubuntu 22 server. Here is the relevant terminal output when running poetry run r2r serve:

2024-08-21 17:24:18,227 - INFO - r2r.main.r2r - Starting R2R with version 0.2.85
2024-08-21 17:24:18,227 - INFO - r2r.providers.prompts.r2r_prompts - Loading prompts from /home/R2R/r2r/providers/prompts/defaults
2024-08-21 17:24:18,235 - INFO - r2r.base.providers.prompt - Initializing PromptProvider with config extra_fields={} provider='r2r' default_system_name='default_system' default_task_name='default_rag' file_path=None.
2024-08-21 17:24:18,235 - INFO - r2r.base.providers.embedding - Initializing EmbeddingProvider with config extra_fields={} provider='litellm' base_model='openai/text-embedding-3-small' base_dimension=512 rerank_model=None rerank_dimension=None rerank_transformer_type=None batch_size=128 prefixes=None add_title_as_prefix=False concurrent_request_limit=256 max_retries=2 initial_backoff=1.0 max_backoff=60.0.
2024-08-21 17:24:18,235 - INFO - r2r.base.providers.llm - Initializing CompletionProvider with config: extra_fields={'concurrent_request_limit': 16} provider='litellm' generation_config=GenerationConfig(model='openai/gpt-4o', temperature=0.1, top_p=1.0, max_tokens_to_sample=1024, stream=False, functions=None, tools=None, add_generation_kwargs={}, api_base=None) concurrency_limit=16 max_retries=2 initial_backoff=1.0 max_backoff=60.0
2024-08-21 17:24:18,246 - INFO - r2r.base.providers.database - Initializing DatabaseProvider with config extra_fields={} provider='postgres'.
2024-08-21 17:24:18,246 - INFO - r2r.providers.database.postgres - Using TCP connection
2024-08-21 17:24:18,256 - INFO - r2r.providers.database.postgres - Successfully initialized PGVectorDB with collection: r2r_vectors
2024-08-21 17:24:18,262 - INFO - r2r.providers.auth.r2r_auth - Default admin user already exists.
2024-08-21 17:24:18,463 - INFO - r2r.main.r2r - Starting R2R with version 0.2.85
INFO:     Started server process [343566]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     127.0.0.1:36192 - "POST /v1/ingest_files HTTP/1.1" 200 OK
INFO:     127.0.0.1:38494 - "GET / HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:38494 - "GET / HTTP/1.1" 404 Not Found
NolanTrem commented 3 weeks ago

Hey @j-pielen R2R does not ship with the R2R dashboard by default—you'll either want to run with docker, poetry run r2r --docker which will bundle the R2R Application which you're expecting to see or you'll want to follow the install instructions here: https://github.com/SciPhi-AI/R2R-Application.

Also, note that the r2r server uses a v1 prefix on routes, so you'll want to navigate to routes with e.g. /v1/health