RAG_PLAYGROUND - Error loading Knowledge Base Files
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu với kb.py quanh dòng 39 và tái hiện thao tác upload theo luồng Basic Examples bằng cả tệp .txt và .pdf. Kiểm tra phần validation của Gradio UploadButton được hiển thị trong traceback; hoàn tất khi cả hai loại tệp được hỗ trợ đều upload thành công mà không gặp lỗi Invalid file type.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
Using Basic Examples, langchain or llamaindex, upload_button fail to upload .txt or .pdf files in "kb.py" file line 39
with gr.Row():
upload_button = gr.UploadButton("Add File", file_types=["pdf","txt"], file_count="multiple")
gradio.exceptions.Error: "Invalid file type. Please upload a file that is one of these formats: ['pdf', 'txt']"
Thanks for your help!
log below:
milvus-standalone | [2025/06/15 15:08:03.033 +00:00] [WARN] [dist/dist_handler.go:112] ["node last heart beat time lag too behind"] [now=2025/06/15 15:08:03.033 +00:00] [lastHeartBeatTime=2025/06/15 15:07:42.235 +00:00] [nodeID=14]
rag-playground | [1] Jun 15 15:07:46 [ INFO] - uvicorn.access - 172.20.0.1:45696 - "POST /content/kb/gradio_api/upload HTTP/1.1" 200
rag-playground | [1] Jun 15 15:07:46 [ INFO] - uvicorn.access - 172.20.0.1:45696 - "POST /content/kb/gradio_api/queue/join?__theme=light HTTP/1.1" 200
rag-playground | Traceback (most recent call last):
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 625, in process_events
rag-playground | response = await route_utils.call_process_api(
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 322, in call_process_api
rag-playground | output = await app.get_blocks().process_api(
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 2216, in process_api
rag-playground | inputs = await self.preprocess_data(
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1882, in preprocess_data
rag-playground | processed_input.append(block.preprocess(inputs_cached))
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/components/upload_button.py", line 190, in preprocess
rag-playground | return [self._process_single_file(f) for f in payload] # type: ignore
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/components/upload_button.py", line 190, in
rag-playground | return [self._process_single_file(f) for f in payload] # type: ignore
rag-playground | File "/usr/local/lib/python3.10/dist-packages/gradio/components/upload_button.py", line 157, in _process_single_file
rag-playground | raise Error(
rag-playground | gradio.exceptions.Error: "Invalid file type. Please upload a file that is one of these formats: ['pdf', 'txt']"
rag-playground | [1] Jun 15 15:07:46 [ INFO] - uvicorn.access - 172.20.0.1:45696 - "GET /content/kb/gradio_api/queue/data?session_hash=6jcjgqfkk19 HTTP/1.1" 200
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 4.2k
- Fork
- 1.1k
- Merge trung bình
- 10 giờ 15 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/GenerativeAIExamples
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
NVIDIA/GenerativeAIExamples#361 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/GenerativeAIExamples#299 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
NVIDIA/GenerativeAIExamples#437 ·
-
hyperlink not working Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 45/100
NVIDIA/GenerativeAIExamples#400 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
NVIDIA/GenerativeAIExamples#399 ·
Tất cả issue của NVIDIA/GenerativeAIExamples
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#118863 ·
-
automation missing-model model-sync provider:pioneer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/models.dev#7701 ·
-
external-plugin ready-for-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/awesome-copilot#3586 · 2 bình luận ·
-
bug-unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100