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

can't login #840

Open Mikemansour opened 1 month ago

Mikemansour commented 1 month ago

after installation , trying to login to the dashboard i get "Login failed. Please check your credentials and try again."

NolanTrem commented 1 month ago

Hey @Mikemansour would you be able to check your server side logs? It would be great to see why the log in is failing. Below, I have a successful log in (which used the default admin username/password) as well as a bad log in.

Screenshot 2024-08-05 at 9 09 03 AM
smig23 commented 1 month ago

fyi: I found that --config-name=local_llm worked but --config-name=local_llm_neo4j_kg resulted in this symptom. Change the database provider from pgvector to postgres solved the issue for me

Mikemansour commented 1 month ago

no matter what i do it shows errors reading the config file it happens when i --config-name=local_llm do this config

kShines commented 1 month ago

fyi: I found that --config-name=local_llm worked but --config-name=local_llm_neo4j_kg resulted in this symptom. Change the database provider from pgvector to postgres solved the issue for meFYI: 我发现 --config-name=local_llm 可以工作,但 --config-name=local_llm_neo4j_kg 导致了这个问题。将数据库提供者从 pgvector 更改为 postgres 解决了我的问题

how to change it fastly?

bookandlover commented 1 month ago
image image

when using knowdelge graphs cannot log in even change vector dabase from pgvector to postgres

bookandlover commented 1 month ago
image
Mikemansour commented 1 month ago

yea exactly my problem I like the idea of this software so much I just wish it could work , i am sorry i am not a coder myself i wish i could contribute to this project

NolanTrem commented 1 month ago

Hey @Mikemansour we shipped version v0.2.84 today which should solve this problem. If you're running Docker, you might have to prune your images (Docker likes to cache versions, and you'll need to make sure that your R2R container is updated!).

Hope this helps, but let me know if you run into any issues!

kShines commented 1 month ago

Hey @Mikemansour we shipped version v0.2.84 today which should solve this problem. If you're running Docker, you might have to prune your images (Docker likes to cache versions, and you'll need to make sure that your R2R container is updated!).

Hope this helps, but let me know if you run into any issues!

Thank you very much @NolanTrem . After cleaning up the R2R image and upgrading to version 0.2.84, there are no more errors. But I'm still curious, is this config a default configuration? If I want to use my own configuration, such as just changing the model called by ollama, what should I do? I saw the toml file demo in the knowgraph docs, but I didn't see a complete example of the toml file and how to use it (via the command line).

kShines commented 1 month ago

@NolanTrem 并且 我应该怎么进入neo4j的界面,我尝试了很多的neo4j的用户名和密码都是错的

Mikemansour commented 1 month ago

2024-08-08 21:50:44 return _bootstrap._gcd_import(name[level:], package, level) 2024-08-08 21:50:44 File "", line 1050, in _gcd_import 2024-08-08 21:50:44 File "", line 1027, in _find_and_load 2024-08-08 21:50:44 File "", line 1006, in _find_and_load_unlocked 2024-08-08 21:50:44 File "", line 688, in _load_unlocked 2024-08-08 21:50:44 File "", line 883, in exec_module 2024-08-08 21:50:44 File "", line 241, in _call_with_frames_removed 2024-08-08 21:50:44 File "/app/r2r/main/app_entry.py", line 79, in 2024-08-08 21:50:44 app = r2r_app( 2024-08-08 21:50:44 File "/app/r2r/main/app_entry.py", line 51, in r2r_app 2024-08-08 21:50:44 wrapper = R2RExecutionWrapper( 2024-08-08 21:50:44 File "/app/r2r/main/execution.py", line 59, in init 2024-08-08 21:50:44 self.app = R2R(config=config) 2024-08-08 21:50:44 File "/app/r2r/main/r2r.py", line 55, in init 2024-08-08 21:50:44 built = builder.build() 2024-08-08 21:50:44 File "/app/r2r/main/assembly/builder.py", line 235, in build 2024-08-08 21:50:44 providers = provider_factory(self.config).create_providers( 2024-08-08 21:50:44 File "/app/r2r/main/assembly/factory.py", line 304, in create_providers 2024-08-08 21:50:44 or self.create_database_provider( 2024-08-08 21:50:44 File "/app/r2r/main/assembly/factory.py", line 145, in create_database_provider 2024-08-08 21:50:44 raise ValueError( 2024-08-08 21:50:44 ValueError: Database provider pgvector not supported 2024-08-08 21:51:37 2024-08-08 13:51:37,650 - INFO - r2r.main.app_entry - Environment CONFIG_NAME: local_llm_neo4j_kg 2024-08-08 21:51:37 2024-08-08 13:51:37,650 - INFO - r2r.main.app_entry - Environment CONFIG_PATH: 2024-08-08 21:51:37 2024-08-08 13:51:37,650 - INFO - r2r.main.app_entry - Environment CLIENT_MODE: False 2024-08-08 21:51:37 2024-08-08 13:51:37,650 - INFO - r2r.main.app_entry - Environment BASE_URL: None 2024-08-08 21:51:37 2024-08-08 13:51:37,650 - INFO - r2r.main.app_entry - Environment PIPELINE_TYPE: qna 2024-08-08 21:51:37 2024-08-08 13:51:37,653 - INFO - r2r.main.r2r - Starting R2R with version 0.2.76 2024-08-08 21:51:37 2024-08-08 13:51:37,653 - INFO - r2r.providers.prompts.r2r_prompts - Loading prompts from /app/r2r/providers/prompts/defaults 2024-08-08 21:51:37 2024-08-08 13:51:37,666 - 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-08 21:51:37 2024-08-08 13:51:37,666 - INFO - r2r.base.providers.embedding - Initializing EmbeddingProvider with config extra_fields={} provider='ollama' base_model='mxbai-embed-large' base_dimension=1024 rerank_model=None rerank_dimension=None rerank_transformer_type=None batch_size=32 prefixes=None add_title_as_prefix=True concurrent_request_limit=256 max_retries=2 initial_backoff=1.0 max_backoff=60.0. 2024-08-08 21:51:37 2024-08-08 13:51:37,666 - INFO - r2r.providers.embeddings.ollama - Using Ollama API base URL: http://host.docker.internal:11434 2024-08-08 21:51:37 2024-08-08 13:51:37,708 - INFO - r2r.base.providers.llm - Initializing CompletionProvider with config: extra_fields={'concurrent_request_limit': 1} provider='litellm' generation_config=GenerationConfig(model='ollama/llama3.1', 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-08 21:51:38 WARNING:neo4j.notifications:Received notification from DBMS server: {severity: WARNING} {code: Neo.ClientNotification.Statement.FeatureDeprecationWarning} {category: DEPRECATION} {title: This feature is deprecated and will be removed in future versions.} {description: The procedure has a deprecated field. ('config' used by 'apoc.meta.graphSample' is deprecated.)} {position: line: 1, column: 1, offset: 0} for query: "CALL apoc.meta.graphSample() YIELD nodes, relationships RETURN nodes, [rel in relationships | {name:apoc.any.property(rel, 'type'), count: apoc.any.property(rel, 'count')}] AS relationships" 2024-08-08 21:51:38 Traceback (most recent call last): 2024-08-08 21:51:38 File "/usr/local/bin/uvicorn", line 8, in 2024-08-08 21:51:38 sys.exit(main()) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in call 2024-08-08 21:51:38 return self.main(args, kwargs) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main 2024-08-08 21:51:38 rv = self.invoke(ctx) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke 2024-08-08 21:51:38 return ctx.invoke(self.callback, ctx.params) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke 2024-08-08 21:51:38 return __callback(args, **kwargs) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 418, in main 2024-08-08 21:51:38 run( 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 587, in run 2024-08-08 21:51:38 server.run() 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run 2024-08-08 21:51:38 return asyncio.run(self.serve(sockets=sockets)) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run 2024-08-08 21:51:38 return loop.run_until_complete(main) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete 2024-08-08 21:51:38 return future.result() 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve 2024-08-08 21:51:38 config.load() 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 458, in load 2024-08-08 21:51:38 self.loaded_app = import_from_string(self.app) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string 2024-08-08 21:51:38 module = importlib.import_module(module_str) 2024-08-08 21:51:38 File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module 2024-08-08 21:51:38 return _bootstrap._gcd_import(name[level:], package, level) 2024-08-08 21:51:38 File "", line 1050, in _gcd_import 2024-08-08 21:51:38 File "", line 1027, in _find_and_load 2024-08-08 21:51:38 File "", line 1006, in _find_and_load_unlocked 2024-08-08 21:51:38 File "", line 688, in _load_unlocked 2024-08-08 21:51:38 File "", line 883, in exec_module 2024-08-08 21:51:38 File "", line 241, in _call_with_frames_removed 2024-08-08 21:51:38 File "/app/r2r/main/app_entry.py", line 79, in 2024-08-08 21:51:38 app = r2r_app( 2024-08-08 21:51:38 File "/app/r2r/main/app_entry.py", line 51, in r2r_app 2024-08-08 21:51:38 wrapper = R2RExecutionWrapper( 2024-08-08 21:51:38 File "/app/r2r/main/execution.py", line 59, in init 2024-08-08 21:51:38 self.app = R2R(config=config) 2024-08-08 21:51:38 File "/app/r2r/main/r2r.py", line 55, in init 2024-08-08 21:51:38 built = builder.build() 2024-08-08 21:51:38 File "/app/r2r/main/assembly/builder.py", line 235, in build 2024-08-08 21:51:38 providers = provider_factory(self.config).create_providers( 2024-08-08 21:51:38 File "/app/r2r/main/assembly/factory.py", line 304, in create_providers 2024-08-08 21:51:38 or self.create_database_provider( 2024-08-08 21:51:38 File "/app/r2r/main/assembly/factory.py", line 145, in create_database_provider 2024-08-08 21:51:38 raise ValueError( 2024-08-08 21:51:38 ValueError: Database provider pgvector not supported

Mikemansour commented 1 month ago

now it can login but still buggy

NolanTrem commented 1 month ago

@Mikemansour it looks like your R2R CLI might be caught up, but Docker is using a cached image. In your logs it says that that it's starting R2R with version 0.2.76.

Screenshot 2024-08-08 at 8 34 42 AM

If you're fine wiping out your existing docker containers and can do a clean install, you might try running these commands (assuming you're on a Mac/Linux): docker stop $(docker ps -a -q) This stops all existing running images docker system prune -af --volumes This clears all of the containers and volumes from your docker. docker network prune --force This cleans up any docker networks that were left in a bad state docker volume rm $(docker volume ls -qf dangling=true) As a failsafe, this should clean up any remaining docker volumes that the first command didn't get

Then, just make sure that you're on the most recent CLI version by running r2r version—it should be v0.2.84. Then just run your command r2r serve --docker and your container should be good to go, and it will build with the most recent image.

TSECP commented 1 month ago

I use the Mac M2 Pro , and I run the command of "r2r --config-name=local_llm serve --docker", there are two problems: A) it shows the details of r2r container can't running in the docker desktop with the message that "lack of OPENAI_API_KEY and said that it's "ImagePraser need this key". B) Can't log in (I am not sure whether it's the above problem related also or not)

Just for your reference and hope to get it solved soon , thx for attention.

kShines commented 1 month ago

A) it shows the details of r2r container can't running in the docker desktop with the message that "lack of OPENAI_API_KEY and said that it's "ImagePraser need this key". B) Can't log in (I am not sure whether it's the above problem related also or not)

Just for your reference and hope to get it solved soon , thx for attention.

You can set OPENAI_API_KEY to anything; I set it to "ollama". I guess this is because when the project starts, it imports the OpenAI client, which checks for OPENAI_API_KEY but doesn't actually use it.

iSevenDays commented 1 month ago

I have the same issue after cloning the latest repo. I can't login and I had to spend over 3 hours just trying to get to login page. Sorry, that's completely unusable to me. Your video is already outdated https://www.youtube.com/watch?v=fXLqtmgFQTU&t=2s documentation specifies commands that no longer exists - it is a complete mess. I wish it did work from the start.

NolanTrem commented 1 month ago

@iSevenDays Which repo did you clone? Our recommended install process to use R2R and the dashboard is as follows:

pip install r2r export OPENAI_API_KEY=sk-... r2r serve --docker

Cloning the repo should be done if you want to contribute/develop on top of R2R for yourself.

The above commands will automatically launch the login page for you. The docs here are up to date, as far as I can tell. If you found something that was outdated, we'd love to know.

The video is outdated, but this is due to us iterating and implementing improvements quickly. It's an unfortunate consequence of creating static content like this. I'd love for you to get up to running with the project, so if the installation above doesn't work, please let me know. Happy to help more then.

salja03-t21 commented 4 weeks ago

On the latest version, completely clean install, on a linux server (headless), and when connecting to the server I get the login page, but when I set the server ip as the instance url it refuses first login.

Note that there are no errors in any of the docker logs.

image image

sanzhar-rakhimkul commented 3 weeks ago

@salja03-t21 Have you able to solve the problem ?

salja03-t21 commented 3 weeks ago

No, not yet. Have not paid much attention to it yet. Hopefully someone can help me to resolve it.

emrgnt-cmplxty commented 2 weeks ago

Any luck guys?

ajinkyaT commented 2 weeks ago

Wow still no answer!

NolanTrem commented 2 weeks ago

No, not yet. Have not paid much attention to it yet. Hopefully someone can help me to resolve it.

@salja03-t21 it looks like you're trying to log into your dashboard using the URL at which your dashboard is deployed? The URL that you should use is for your R2R deployment.By default this is at localhost 8000. The dashboard needs to communicate with a server to work.

If you clear out any cached docker images and run r2r serve --docker I'm almost certain it will allow you to log in.