{"id":14964862,"url":"https://github.com/jonaskahn/asktube","last_synced_at":"2025-10-06T22:50:54.634Z","repository":{"id":255445767,"uuid":"851421609","full_name":"jonaskahn/asktube","owner":"jonaskahn","description":"AskTube - An AI-powered YouTube video summarizer and QA assistant powered by Retrieval Augmented Generation (RAG) 🤖. Run it entirely on your local machine with Ollama, or cloud-based models like Claude, OpenAI, Gemini, Mistral, and more.","archived":false,"fork":false,"pushed_at":"2024-11-18T15:16:20.000Z","size":7995,"stargazers_count":83,"open_issues_count":0,"forks_count":22,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-08T22:03:39.670Z","etag":null,"topics":["ai-agent","ai-agents","ai-bot","claude","gemini","gpt","gpt-4o","gpt-4o-mini","llama3","mistral","nuxt","ollama","openai","python","qwen2","rag","speech-to-text","voyageai","youtube"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonaskahn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-09-03T04:23:28.000Z","updated_at":"2025-08-24T03:57:59.000Z","dependencies_parsed_at":"2024-09-12T17:44:47.465Z","dependency_job_id":"b19a360f-dc4b-4214-bcee-3b4b92fec7dc","html_url":"https://github.com/jonaskahn/asktube","commit_stats":{"total_commits":194,"total_committers":1,"mean_commits":194.0,"dds":0.0,"last_synced_commit":"51ea38fcb8e3b8dc8527268bea211529c3c394bf"},"previous_names":["jonaskahn/asktube"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/jonaskahn/asktube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaskahn%2Fasktube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaskahn%2Fasktube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaskahn%2Fasktube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaskahn%2Fasktube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonaskahn","download_url":"https://codeload.github.com/jonaskahn/asktube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaskahn%2Fasktube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278692914,"owners_count":26029405,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai-agent","ai-agents","ai-bot","claude","gemini","gpt","gpt-4o","gpt-4o-mini","llama3","mistral","nuxt","ollama","openai","python","qwen2","rag","speech-to-text","voyageai","youtube"],"created_at":"2024-09-24T13:33:52.554Z","updated_at":"2025-10-06T22:50:54.614Z","avatar_url":"https://github.com/jonaskahn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/logo.png\" alt=\"AskTube's Logo\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eAskTube - An AI-powered YouTube video summarizer and QA assistant powered by Retrieval Augmented Generation (RAG) 🤖\u003c/strong\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eRun it entirely on your local machine with Ollama, or cloud-based models like Claude, OpenAI, Gemini, Mistral, and more\u003c/i\u003e\n\u003c/p\u003e\n\n---\n## 🏃🏽‍➡️ Demo \u0026 Screenshot\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/demo-21.png\" alt=\"Demo 21\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/demo-22.png\" alt=\"Demo 22\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/demo-23.png\" alt=\"Demo 23\"/\u003e\n\u003c/p\u003e\n\n## [Watch \"AskTube First Demo\" on YouTube](https://www.youtube.com/watch?v=S5T0nVjYRbQ)\n\n\nhttps://github.com/user-attachments/assets/610ec00b-e25a-4ac5-900c-145c8485675f\n\n---\n## 💤 Features\n- [x] Work even with unsubtitle video\n- [x] No limit video time\n- [x] Support multiple AI vendors\n- [x] Focus on RAG implemetation\n- [x] Fully run on your local machine \n\n## 🤷🏽 Why does this project exist?\n\n- I’ve seen several GitHub repositories offering **AI-powered** summaries for YouTube videos, but none include **Q\u0026A**\n  functionality.\n- I want to implement a more comprehensive solution while also gaining experience with AI to build my own RAG application.\n\n---\n\n## 🔨 Technology\n\n- **Language**: Python, JS\n- **Server**: Python@v3.10, Bun@v1\n- **Framework/Lib**: Sanic, Peewee, Pytubefix, Sentence Transformers, Sqlite, Chroma, NuxtJs/DaisyUI, etc.\n- **Embedding Provider (Analysis Provider)**:\n  - [x] OpenAI\n  - [x] Gemini\n  - [x] VoyageAI\n  - [x] Mistral\n  - [x] Sentence Transformers (Local)\n- **AI Provider**:\n  - [x] OpenAI\n  - [x] Claude\n  - [x] Gemini\n  - [x] Mistral\n  - [x] Ollama (Local)\n- **Speech To Text**:\n  - [x] [Faster-Whisper (Local)](https://github.com/SYSTRAN/faster-whisper)\n  - [x] [AssemblyAI](https://www.assemblyai.com/docs)\n  - [x] [OpenAI](https://platform.openai.com/docs/guides/speech-to-text)\n  - [x] [Gemini](https://ai.google.dev/gemini-api/docs/audio)\n\n---\n\n## 🗓️ Next Todo Tasks\n\n- [ ] Implement Speech To Text for cloud models\n  - [ ] AssemblyAI\n  - [ ] OpenAI\n  - [ ] Gemini\n- [ ] Enhance\n  - [x] ~Skip using RAG for short videos~\n  - [ ] Chat prompts, chat messages by context limit\n  - [ ] RAG: Implement Query Translation\n    - [x] ~Multiquery~\n    - [ ] Fusion\n    - [ ] Decomposition\n    - [ ] Step back\n    - [ ] HyDE\n\n---\n\n## 🚀 How to run ?\n\n\u003e For the first time running, the program maybe a bit slow due they need to install local models.\n\n### Run on your machine\n\n- Ensure you installed:\n  - [Python 3.10](https://www.python.org/downloads/)\n    - **Windows User**, please [download here](https://www.python.org/downloads/release/python-31011/)\n    - **Linux, MacOS User**, please use `homebrew` or your install package command `(apt, dnf, etc)`\n    - Or use `conda`\n  - [Poetry](https://python-poetry.org/docs/#installation)\n    - **Windows User** open `Powershell` and run:\n\n    ```shell\n    (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -\n    ```\n\n    - **Linux, MacOS User** open `Terminal` and run:\n\n    ```shell\n    curl -sSL https://install.python-poetry.org | python3 -\n    ```\n\n  - [Bun](https://bun.sh/)\n  - [ffmpeg](https://www.ffmpeg.org/download.html)\n    - **MacOS User**\n\n    ```shell\n    brew install ffmpeg\n    ```\n\n    - **Linux User**\n\n    ```shell\n    # Ubuntu\n    sudo apt install ffmpeg\n    # Fedora\n    sudo dnf install -y ffmpeg\n    ```\n\n    - **Windows**, please follow this tutorial [Install ffmpeg for Windows](https://phoenixnap.com/kb/ffmpeg-windows)\n- Clone repostiory\n\n  ```shell\n  git clone https://github.com/jonaskahn/asktube.git\n  ```\n\n- Create file `.env` in `asktube/engine` directory:\n  - [Locally](/engine#prefer-env-for-running-local)\n  - [Free with some limitations](/engine#prefer-env-for-free-with-limitation)\n- Run program\n\n  - _You may need to run first:_\n\n  ```shell\n  poetry env use python\n  ```\n\n  - Open `terminal/cmd/powershell` in `asktube/engine` directory, then run:\n\n  ```shell\n  poetry install \u0026\u0026 poetry run python engine/server.py\n  ```\n\n  - Open `terminal/cmd/powershell` in `asktube/web` directory, then run:\n\n  ```shell\n  bun install \u0026\u0026 bun run dev\n  ```\n\n- Open web: [http://localhost:3000](http://localhost:3000)\n\n### With docker (In process)\n\n**Before You Start**\n\n\u003e 1. I built these services to docker images, but if you want to build local images, please run `build.local.bat` for **`Windows`** or `build.local.amd64.sh` or `build.local.aarch64.sh` for **`MacOS`**, **`Linux`**\n\u003e 2. If you have a GPU (cuda or rocm), please refer **ENV settings** above, change params like above\n\n**Locally**\n\n- Use [local.yaml](compose/local.yaml) compose file to start\n- Open `terminal/cmd/powershell` in `asktube` directory\n\n```shell\ndocker compose -f compose/local.yaml pull \u0026\u0026 docker compose -f compose/local.yaml up -d\n```\n\n- After run, you need install `Ollama` model `qwen2` and `llama3.1` for QA\n\n```shell\ndocker run ollama ollama run qwen2\ndocker run ollama ollama run llama3.1\n```\n\n**Free** (with rate limit)\n\n- You need to go Google Gemini and VoyageAI to register account and generate your own API keys:\n  - Gemini is free with your Google Account\n  - VoyageAI (recommended by Claude) gives you free 50M tokens (a huge amount) but you need to add your credit card first.\n- Replace your ENV setting in docker file [free](compose/free.yaml) and start docker\n- Open `terminal/cmd/powershell` in `asktube` directory\n\n```shell\ndocker compose -f compose/free.yaml pull \u0026\u0026 docker compose -f compose/free.yaml up -d\n```\n\n**Ideal**\n\n- Using `VoyageAI` for embedding texts\n- Using `OpenAI` and `Claude` for QA, register account and generate your own API keys\n- Replace your ENV setting in docker file [ideal](compose/ideal.yaml) and start docker\n- Open `terminal/cmd/powershell` in `asktube` directory\n\n```shell\ndocker compose -f compose/ideal.yaml pull \u0026\u0026 docker compose -f compose/ideal.yaml up -d\n```\n\n**Result**\n\n- Open web: [http://localhost:8080](http://localhost:8080)\n\n---\n\n## 💡 Architecture\n\n\u003e The real implementation might differ from this art due to its complexity.\n\n### 1️⃣ Extract data from given URL\n\n![P1.png](docs/images/P1.png)\n\n### 2️⃣ Storing embedding chapter subtitles\n\n![P2.png](docs/images/P2.png)\n\n### 3️⃣ Asking (included enrich question)\n\n![P3.png](docs/images/P3.png)\n\n---\n\n## 🪧 Notice\n\n\u003e 1. Do not use this for production. This aimed for end-users on their local machines.\n\u003e 2. Do not request any advanced features for management.\n\n\n## ✍🏿 For development\n\n- [Backend](./engine/README.md)\n- [Frontend](./web/README.md)\n\n---\n\n## ⁉️ FAQ and Troubleshooting\n\n- [FQA](./docs/FQA.md)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonaskahn%2Fasktube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonaskahn%2Fasktube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonaskahn%2Fasktube/lists"}