[PR #524] [MERGED] feat: Allow RAG on XML and arbitrary text files including source code #7158

Closed
opened 2025-11-11 17:18:39 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/524
Author: @Marclass
Created: 1/19/2024
Status: Merged
Merged: 1/19/2024
Merged by: @tjbck

Base: mainHead: rag-arbitrary-files


📝 Commits (7)

  • 43d8466 feat: Add RAG support for various programming languages
  • cf6b3fa remove html type and add js/css
  • 8dacc86 Merge branch 'ollama-webui:main' into main
  • 9b63788 Update constants.ts
  • c7cee3e Update constants.ts
  • 6070e6b add svelte type to RAG
  • aa1d386 Allow any file to be used for RAG.

📊 Changes

4 files changed (+46 additions, -38 deletions)

View changed files

📝 backend/apps/rag/main.py (+30 -31)
📝 src/lib/components/chat/MessageInput.svelte (+5 -3)
📝 src/lib/constants.ts (+7 -2)
📝 src/routes/(app)/documents/+page.svelte (+4 -2)

📄 Description

Improvement on #495 so we won't have to play wack a mole as browsers change file MIME types for source code files.

If a user uploads a file with an unknown type it will display a warning toast, but process it as a text file.

Here the codellama model is able to read the Ollama-webui RAG code and modify it.
example


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/524 **Author:** [@Marclass](https://github.com/Marclass) **Created:** 1/19/2024 **Status:** ✅ Merged **Merged:** 1/19/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `rag-arbitrary-files` --- ### 📝 Commits (7) - [`43d8466`](https://github.com/open-webui/open-webui/commit/43d8466677e54a2492b58ef7049fc98d93871515) feat: Add RAG support for various programming languages - [`cf6b3fa`](https://github.com/open-webui/open-webui/commit/cf6b3fa48aa11142f5df2ee0dda28391f326514b) remove html type and add js/css - [`8dacc86`](https://github.com/open-webui/open-webui/commit/8dacc86ab0156307ed304996f5fadae24bf21864) Merge branch 'ollama-webui:main' into main - [`9b63788`](https://github.com/open-webui/open-webui/commit/9b6378813535291f78d0694e239b71d949823370) Update constants.ts - [`c7cee3e`](https://github.com/open-webui/open-webui/commit/c7cee3ec250131722ad27b242e5ccf40cc3571fd) Update constants.ts - [`6070e6b`](https://github.com/open-webui/open-webui/commit/6070e6bcd1cb18dc7387389a2394ec464f1353d9) add svelte type to RAG - [`aa1d386`](https://github.com/open-webui/open-webui/commit/aa1d386042cc6e30dea92ddd99684eecf7edc7c1) Allow any file to be used for RAG. ### 📊 Changes **4 files changed** (+46 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `backend/apps/rag/main.py` (+30 -31) 📝 `src/lib/components/chat/MessageInput.svelte` (+5 -3) 📝 `src/lib/constants.ts` (+7 -2) 📝 `src/routes/(app)/documents/+page.svelte` (+4 -2) </details> ### 📄 Description Improvement on #495 so we won't have to play wack a mole as browsers change file MIME types for source code files. If a user uploads a file with an unknown type it will display a warning toast, but process it as a text file. Here the codellama model is able to read the Ollama-webui RAG code and modify it. ![example](https://github.com/ollama-webui/ollama-webui/assets/5996181/c4f6489d-e888-4408-869f-006f47c24c30) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 17:18:39 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#7158