RAG_PLAYGROUND - Error loading Knowledge Base Files
まだ誰も着手していません。
評価
調査の方向性
kb.py の39行目付近から始め、.txt と .pdf の両方のファイルを使って Basic Examples のフローでアップロードを再現します。traceback に表示された Gradio UploadButton のバリデーションを確認します。両方のサポート対象ファイル形式が Invalid file type エラーなしで正常にアップロードできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Jupyter Notebook
- スター
- 4.2k
- フォーク
- 1.1k
- 平均マージ
- 10時間 15分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/GenerativeAIExamples のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
NVIDIA/GenerativeAIExamples#361 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/GenerativeAIExamples#299 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
NVIDIA/GenerativeAIExamples#437 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
NVIDIA/GenerativeAIExamples#400 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
NVIDIA/GenerativeAIExamples#399 ·
NVIDIA/GenerativeAIExamples の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3263 ·
-
[Bug]: context-limit error parsing has no pattern for llama.cpp's "context size (N tokens)" phrasing オープンarea/compression area/local-models area/sessions comp/agent duplicate P2 sweeper:risk-session-state type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#117793 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
BasedHardware/omi#15236 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
areal-project/AReaL#1741 ·