How to Expose an External API for the RAG Environment in open-webui with Ollama? #4117

Closed
opened 2025-11-11 15:46:18 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Lance-He on GitHub (Feb 25, 2025).

I have successfully deployed open-webui locally, configured it to call deepseek R1 via the Ollama API, and uploaded my own knowledge base. However, I am currently facing a challenge: I need to expose my configured RAG environment as an external API so that it can be accessed by external applications (e.g., my chatbot).

Specifically, I’m looking for guidance on the following points:

  • API Endpoint Creation:
    What is the recommended approach to create an external API endpoint that wraps the RAG functionality?
    Should I integrate a lightweight web framework like Flask or FastAPI into my current setup, or is there a built-in method within open-webui?

  • Integration with Existing Configuration:
    How can I ensure that the API correctly leverages the existing open-webui configuration and the ollama interface (calling deepseek R1) for model inference and knowledge retrieval?

Any detailed examples, configuration snippets, or pointers to documentation would be greatly appreciated. Thank you for your assistance!

Originally created by @Lance-He on GitHub (Feb 25, 2025). I have successfully deployed open-webui locally, configured it to call deepseek R1 via the Ollama API, and uploaded my own knowledge base. However, I am currently facing a challenge: I need to expose my configured RAG environment as an external API so that it can be accessed by external applications (e.g., my chatbot). Specifically, I’m looking for guidance on the following points: - **API Endpoint Creation:** What is the recommended approach to create an external API endpoint that wraps the RAG functionality? Should I integrate a lightweight web framework like Flask or FastAPI into my current setup, or is there a built-in method within open-webui? - **Integration with Existing Configuration:** How can I ensure that the API correctly leverages the existing open-webui configuration and the ollama interface (calling deepseek R1) for model inference and knowledge retrieval? Any detailed examples, configuration snippets, or pointers to documentation would be greatly appreciated. Thank you for your assistance!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4117