{"id":28814903,"url":"https://github.com/uchida-r/my_llm","last_synced_at":"2026-05-08T05:04:31.295Z","repository":{"id":298717337,"uuid":"1000778226","full_name":"uchida-R/My_LLM","owner":"uchida-R","description":"研究室の論文やスライドを対話形式で検索・活用するためのRAGプロトタイプ。Ollamaを使いローカル環境で動作します。","archived":false,"fork":false,"pushed_at":"2025-06-12T13:10:58.000Z","size":14897,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T14:26:42.927Z","etag":null,"topics":["chromadb","docker","docker-compose","llama-index","llm","local-llm","ollama","open-webui","prototype","python","rag-chatbot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uchida-R.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-12T09:59:12.000Z","updated_at":"2025-06-12T13:29:43.000Z","dependencies_parsed_at":"2025-06-12T14:37:06.688Z","dependency_job_id":null,"html_url":"https://github.com/uchida-R/My_LLM","commit_stats":null,"previous_names":["uchida-r/my_llm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uchida-R/My_LLM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchida-R%2FMy_LLM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchida-R%2FMy_LLM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchida-R%2FMy_LLM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchida-R%2FMy_LLM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uchida-R","download_url":"https://codeload.github.com/uchida-R/My_LLM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uchida-R%2FMy_LLM/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260586145,"owners_count":23032253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromadb","docker","docker-compose","llama-index","llm","local-llm","ollama","open-webui","prototype","python","rag-chatbot"],"created_at":"2025-06-18T16:03:07.270Z","updated_at":"2026-05-08T05:04:31.280Z","avatar_url":"https://github.com/uchida-R.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lab-Knowledge RAG Prototype\n\n## 概要\n\nこのプロジェクトは、研究室内に蓄積された発表スライドや論文PDFなどの資料を、対話形式で検索・活用するためのRAG (Retrieval-Augmented Generation) 機能付きローカルLLMプロトタイプです。\n\n過去の研究資産へのアクセス性を高め、新たな着想の獲得や議論の活性化を目的としています。\n\n---\n\n\u003e **⚠️ 注意**\n\u003e\n\u003e このシステムは現在開発中の**プロトタイプ**です。\n\u003e * 予期せぬバグや、意図しない挙動を示す可能性があります。\n\u003e * 機能は限定的であり、今後変更される予定です。\n\u003e * 利用にあたっては、以下の手順をよくご確認ください。\n\n---\n\n\n## 🏛️ システム構成\n\nこのシステムは、以下のオープンソースソフトウェアをDocker Composeで連携させて構築されています。\n\n* **Web UI:** [Open WebUI](https://github.com/open-webui/open-webui) - チャットを行うためのフロントエンドです。\n* **LLM実行環境:** [Ollama](https://github.com/ollama/ollama) - 大規模言語モデル(LLM)をローカルで実行します。\n* **ベクトルDB:** [ChromaDB](https://github.com/chroma-core/chroma) - ドキュメントのベクトルデータを保存・管理します。\n* **データインデクサー:** [LlamaIndex](https://github.com/run-llama/llama_index) - ドキュメントを読み込み、ベクトル化してChromaDBに保存するためのカスタムサービスです([`llamaindexer/code/get_index_for_RAG.py`](uchida-r/my_llm/My_LLM-d1772139c812d03a15b9c19e63bc76296601977d/llamaindexer/code/get_index_for_RAG.py))。\n* **パイプライン (オプション):** [Pipelines](https://github.com/open-webui/pipelines) - Open WebUIとバックエンド間の通信を仲介します。\n\n\u003cdetails\u003e\n\u003csummary\u003eネットワーク図 (クリックで展開)\u003c/summary\u003e\n\n\n![ネットワーク図1](img/network_diagram_1.png)\n![ネットワーク図2](img/network_diagram_2.png)\n![ネットワーク図3](img/network_diagram_3.png)\n\n\n\u003c/details\u003e\n\n## ✨ 特徴\n\n* **ローカル実行:** すべてのコンポーネントとLLMモデルがローカル環境で動作するため、外部APIは不要で、機密性の高い研究データも安心して扱えます。\n* **ドキュメント同期:** 起動時に既存のドキュメントとベクトルDBの状態を比較し、新規・更新されたファイルのみを自動でインデックスする同期機能を備えています。\n* **OSSベース:** 実績のあるオープンソースのみで構成されており、透明性と拡張性に優れています。\n\n## ⚙️ 動作要件\n\n* **GPU環境:** LLMを快適に動作させるためにGPU環境を強く推奨します。\n* **Docker \u0026 Docker Compose:** 各サービスをコンテナとして管理・実行するために必須です。\n* **Git:** リポジトリのクローンに必要です。\n\n## 🚀 セットアップと使い方\n\n### Step 1: 環境構築\n\n1.  **リポジトリをクローンして移動**\n    ```bash\n    git clone [このリポジトリのURL]\n    cd [リポジトリ名]\n    ```\n\n\n### Step 2: システムの起動とデータ準備\n\n1.  **資料の配置**\n    `data` フォルダに、LLMに読み込ませたいスライド(`.pptx`)やPDFファイル(`.pdf`)を格納します。\n\n2.  **システムの起動**\n    ```bash\n    docker compose up\n    ```\n    \u003e **☕️ 初回起動時の注意**\n    \u003e 初めてこのコマンドを実行する際、LLMモデルのダウンロードも開始されます。完了までには**非常に長い時間**がかかる場合があります。気長にお待ちください。\n\n### Step 3: ドキュメントのベクトル化\n\nシステムを起動したまま、**別のターミナル（bash）**を開き、同じディレクトリで以下のコマンドを実行します。これにより、`data`フォルダ内のファイルがベクトル化され、LLMが検索できるデータベースに保存されます。\n\n```bash\ndocker compose exec llama_indexer bash -c \"python3 get_index_for_RAG.py\"\n```\n\n### Step 4:Web UIの設定\n\n1. **Open WebUIにアクセス**\n    Webブラウザで http://[ホストマシンのIPアドレス]:3000 を開きます。\n    (Dockerを動かしているPC上でブラウザを開く場合は http://localhost:3000 です)\n\n2. **pipelineへの接続**\n    右上のアカウント名-\u003e 管理者パネル-\u003e 設定-\u003e 接続へと進みます。\n    OpenAI API接続の管理の項目の右側にある ＋ ボタンをクリックします\n    以下の情報を入力します。\n        URL: http://pipeline:9099\n        キー: 0p3n-w3bu!\n    入力後、右下の「保存」ボタンを押します。\n\n3. **モデルの選択**\n    チャットのメイン画面に戻ります。\n    画面上部にある「モデルを選択」のドロップダウンメニューから llamaindex_ollama_pipeline を選択します。\n\n4. **チャット開始！**\n    以上で全ての設定は完了です！\n    チャット入力欄に、dataフォルダに入れた資料に関する質問をしてみてください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuchida-r%2Fmy_llm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuchida-r%2Fmy_llm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuchida-r%2Fmy_llm/lists"}