danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
19.34k stars 3.23k forks source link

[Bug]: 404 error from RAG endpoint with custom embeddings #4693

Closed erickrf closed 2 weeks ago

erickrf commented 2 weeks ago

What happened?

I have a Kubernetes deployment of LibreChat with self-hosted LLMs, and am trying to add the RAG endpoint. Whenever I try to add a file to a prompt, the frontend crashes, and the RAG API logs the following error:

Request POST http://rag-api.cluster.local:8000//embed - 404
//embed - {'id': '66e40907775cb306f9544665', 'username': 'erick', 'provider': 'local', 'email': 'my_email', 'iat': 1731343695, 'exp': 1731344595}

Steps to Reproduce

In my .env, I have the following RAG-related values:

RAG_API_URL=http://rag-api.cluster.local:8000
RAG_OPENAI_BASEURL=http://litellm.cluster.local:4000
EMBEDDINGS_PROVIDER=openai
EMBEDDINGS_MODEL=gte-large

What browsers are you seeing the problem on?

Firefox

Relevant log output

No response

Screenshots

No response

Code of Conduct

alvieirajr commented 2 weeks ago

@erickrf Are you using a custom RAG app ? The /embed endpoint asks for file_id, file, user, etc... I don't think so the embedding interfer in some way on the librechat frontend ou backend. I build and integrated a custom RAG app with Librechat without worrying with kind of embedding or database my RAG app are using.

Can you give more details about you configuration, request and user operation on screen ?