Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Ollama-instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ cp api/config/embedder.ollama.json.bak api/config/embedder.json

Start the backend:
```bash
python -m pip install poetry==2.0.1 && poetry install
python -m api.main
python -m pip install poetry==2.0.1 && poetry --directory api install
poetry --directory api run python -m api.main
```

Start the frontend:
Expand Down Expand Up @@ -88,7 +88,7 @@ npm run dev
-v ~/.adalflow:/root/.adalflow \
-e OLLAMA_HOST=your_ollama_host \
deepwiki:ollama-local

# For local repository analysis
docker run -p 3000:3000 -p 8001:8001 --name deepwiki \
-v ~/.adalflow:/root/.adalflow \
Expand Down
4 changes: 2 additions & 2 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Instalar dependencias de Python
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# Iniciar el servidor API
python -m api.main
poetry --directory api run python -m api.main
```

#### Paso 3: Iniciar el Frontend
Expand Down
12 changes: 6 additions & 6 deletions README.fr.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There appears to be a typo at the beginning of this file. The character 'f' has been added on line 1, which will be rendered as part of the document and looks unintentional. It should probably be removed.

# DeepWiki-Open

![Bannière DeepWiki](screenshots/Deepwiki.png)

**DeepWiki** est ma propre tentative d’implémentation de DeepWiki, un outil qui crée automatiquement des wikis magnifiques et interactifs pour n’importe quel dépôt GitHub, GitLab ou Bitbucket ! Il suffit d’entrer un nom de dépôt, et DeepWiki :

1. Analyse la structure du code
2. Génère une documentation complète
3. Crée des diagrammes visuels pour expliquer le fonctionnement
1. Analyse la structure du code
2. Génère une documentation complète
3. Crée des diagrammes visuels pour expliquer le fonctionnement
4. Organise le tout dans un wiki facile à naviguer

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/sheing)
Expand Down Expand Up @@ -82,10 +82,10 @@ OLLAMA_HOST=votre_hote_ollama

```bash
# Installer dépendances Python
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# Démarrer le serveur API
python -m api.main
poetry --directory api run python -m api.main
```

#### Étape 3 : Démarrer le Frontend
Expand Down
4 changes: 2 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Pythonの依存関係をインストール
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# APIサーバーを起動
python -m api.main
poetry --directory api run python -m api.main
```

#### ステップ 3: フロントエンドの起動
Expand Down
4 changes: 2 additions & 2 deletions README.kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Python 의존성 설치
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# API 서버 실행
python -m api.main
poetry --directory api run python -m api.main
```

#### 3단계: 프론트엔드 시작
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ OLLAMA_HOST=your_ollama_host
python -m pip install poetry==1.8.2 && poetry install -C api

# Start the API server
python -m api.main
poetry --directory api run python -m api.main
```

#### Step 3: Start the Frontend
Expand Down Expand Up @@ -399,7 +399,7 @@ docker-compose up

| Variable | Description | Required | Note |
|----------------------|--------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|
| `GOOGLE_API_KEY` | Google Gemini API key for AI generation and embeddings | No | Required for Google Gemini models and Google AI embeddings
| `GOOGLE_API_KEY` | Google Gemini API key for AI generation and embeddings | No | Required for Google Gemini models and Google AI embeddings
| `OPENAI_API_KEY` | OpenAI API key for embeddings and models | Conditional | Required if using OpenAI embeddings or models |
| `OPENROUTER_API_KEY` | OpenRouter API key for alternative models | No | Required only if you want to use OpenRouter models |
| `AZURE_OPENAI_API_KEY` | Azure OpenAI API key | No | Required only if you want to use Azure OpenAI models |
Expand All @@ -414,7 +414,7 @@ docker-compose up

**API Key Requirements:**
- If using `DEEPWIKI_EMBEDDER_TYPE=openai` (default): `OPENAI_API_KEY` is required
- If using `DEEPWIKI_EMBEDDER_TYPE=google`: `GOOGLE_API_KEY` is required
- If using `DEEPWIKI_EMBEDDER_TYPE=google`: `GOOGLE_API_KEY` is required
- If using `DEEPWIKI_EMBEDDER_TYPE=ollama`: No API key required (local processing)

Other API keys are only required when configuring and using models from the corresponding providers.
Expand Down
6 changes: 3 additions & 3 deletions README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ OLLAMA_HOST=seu_host_ollama

```bash
# Instale as dependências Python
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# Inicie o servidor API
python -m api.main
poetry --directory api run python -m api.main
```

#### Passo 3: Inicie o Frontend
Expand Down Expand Up @@ -297,7 +297,7 @@ docker-compose up

| Variável | Descrição | Obrigatória | Observação |
|----------------------|--------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|
| `GOOGLE_API_KEY` | Chave API Google Gemini para geração com IA | Não | Necessária apenas se você quiser usar modelos Google Gemini
| `GOOGLE_API_KEY` | Chave API Google Gemini para geração com IA | Não | Necessária apenas se você quiser usar modelos Google Gemini
| `OPENAI_API_KEY` | Chave API OpenAI para embeddings | Sim | Nota: Isso é necessário mesmo se você não estiver usando modelos OpenAI, pois é usado para embeddings. |
| `OPENROUTER_API_KEY` | Chave API OpenRouter para modelos alternativos | Não | Necessária apenas se você quiser usar modelos OpenRouter |
| `OLLAMA_HOST` | Host Ollama (padrão: http://localhost:11434) | Não | Necessária apenas se você quiser usar servidor Ollama externo |
Expand Down
16 changes: 8 additions & 8 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
3. Построение визуальных диаграмм, объясняющих работу системы
4. Организацию всего в удобную и структурированную вики

[!["Купить мне кофе"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/sheing)
[![Поддержать в криптовалюте](https://tip.md/badge.svg)](https://tip.md/sng-asyncfunc)
[![Twitter/X](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://x.com/sashimikun_void)
[!["Купить мне кофе"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/sheing)
[![Поддержать в криптовалюте](https://tip.md/badge.svg)](https://tip.md/sng-asyncfunc)
[![Twitter/X](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://x.com/sashimikun_void)
[![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/invite/VQMBGR8u5v)

[English](./README.md) | [简体中文](./README.zh.md) | [繁體中文](./README.zh-tw.md) | [日本語](./README.ja.md) | [Español](./README.es.md) | [한국어](./README.kr.md) | [Tiếng Việt](./README.vi.md) | [Português Brasileiro](./README.pt-br.md) | [Français](./README.fr.md) | [Русский](./README.ru.md)
Expand Down Expand Up @@ -81,10 +81,10 @@ OLLAMA_HOST=ваш_ollama_host

```bash
# Установка зависимостей
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory install

# Запуск API
python -m api.main
poetry --directory api run python -m api.main
```

#### Шаг 3: Запуск frontend-интерфейса
Expand Down Expand Up @@ -452,13 +452,13 @@ docker build --build-arg CUSTOM_CERT_DIR=certs .

## 📱 Скриншоты

![Интерфейс](screenshots/Interface.png)
![Интерфейс](screenshots/Interface.png)
*Основной интерфейс DeepWiki*

![Приватный доступ](screenshots/privaterepo.png)
![Приватный доступ](screenshots/privaterepo.png)
*Доступ к приватным репозиториям*

![DeepResearch](screenshots/DeepResearch.png)
![DeepResearch](screenshots/DeepResearch.png)
*DeepResearch анализирует сложные темы*

### Видео-демо
Expand Down
4 changes: 2 additions & 2 deletions README.vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Cài đặt Python dependencies
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory install

# Chạy API server
python -m api.main
poetry --directory api run python -m api.main
```

#### Bước 3: Bắt đầu với Frontend
Expand Down
6 changes: 3 additions & 3 deletions README.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ OLLAMA_HOST=your_ollama_host

```bash
# 安裝 Python 相依性
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# 啟動 API 伺服器
python -m api.main
poetry --directory api run python -m api.main
```

#### 步驟 3:啟動前端
Expand Down Expand Up @@ -304,7 +304,7 @@ docker-compose up

| 變數 | 說明 | 必需 | 備註 |
|----------------------|--------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|
| `GOOGLE_API_KEY` | Google Gemini API 金鑰,用於 AI 產生 | 否 | 只有在您想使用 Google Gemini 模型時才需要
| `GOOGLE_API_KEY` | Google Gemini API 金鑰,用於 AI 產生 | 否 | 只有在您想使用 Google Gemini 模型時才需要
| `OPENAI_API_KEY` | OpenAI API 金鑰,用於嵌入 | 是 | 備註:即使您不使用 OpenAI 模型,這個也是必需的,因為它用於嵌入 |
| `OPENROUTER_API_KEY` | OpenRouter API 金鑰,用於替代模型 | 否 | 只有在您想使用 OpenRouter 模型時才需要 |
| `OLLAMA_HOST` | Ollama 主機(預設:http://localhost:11434) | 否 | 只有在您想使用外部 Ollama 伺服器時才需要 |
Expand Down
4 changes: 2 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# 安装Python依赖
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install

# 启动API服务器
python -m api.main
poetry --directory api run python -m api.main
```

#### 步骤3:启动前端
Expand Down
2 changes: 1 addition & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is the backend API for DeepWiki, providing smart code analysis and AI-power

```bash
# From the project root
python -m pip install poetry==2.0.1 && poetry install
python -m pip install poetry==2.0.1 && poetry --directory api install
```

### Step 2: Set Up Environment Variables
Expand Down
22 changes: 11 additions & 11 deletions api/data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def count_tokens(text: str, embedder_type: str = None, is_ollama_embedder: bool
# Handle backward compatibility
if embedder_type is None and is_ollama_embedder is not None:
embedder_type = 'ollama' if is_ollama_embedder else None

# Determine embedder type if not specified
if embedder_type is None:
from api.config import get_embedder_type
Expand Down Expand Up @@ -141,7 +141,7 @@ def download_repo(repo_url: str, local_path: str, repo_type: str = None, access_
# Alias for backward compatibility
download_github_repo = download_repo

def read_all_documents(path: str, embedder_type: str = None, is_ollama_embedder: bool = None,
def read_all_documents(path: str, embedder_type: str = None, is_ollama_embedder: bool = None,
excluded_dirs: List[str] = None, excluded_files: List[str] = None,
included_dirs: List[str] = None, included_files: List[str] = None):
"""
Expand Down Expand Up @@ -388,7 +388,7 @@ def prepare_data_pipeline(embedder_type: str = None, is_ollama_embedder: bool =
# Handle backward compatibility
if embedder_type is None and is_ollama_embedder is not None:
embedder_type = 'ollama' if is_ollama_embedder else None

# Determine embedder type if not specified
if embedder_type is None:
embedder_type = get_embedder_type()
Expand Down Expand Up @@ -444,9 +444,9 @@ def get_github_file_content(repo_url: str, file_path: str, access_token: str = N
"""
Retrieves the content of a file from a GitHub repository using the GitHub API.
Supports both public GitHub (github.com) and GitHub Enterprise (custom domains).

Args:
repo_url (str): The URL of the GitHub repository
repo_url (str): The URL of the GitHub repository
(e.g., "https://github.com/username/repo" or "https://github.company.com/username/repo")
file_path (str): The path to the file within the repository (e.g., "src/main.py")
access_token (str, optional): GitHub personal access token for private repositories
Expand Down Expand Up @@ -478,7 +478,7 @@ def get_github_file_content(repo_url: str, file_path: str, access_token: str = N
else:
# GitHub Enterprise - API is typically at https://domain/api/v3/
api_base = f"{parsed_url.scheme}://{parsed_url.netloc}/api/v3"

# Use GitHub API to get file content
# The API endpoint for getting file content is: /repos/{owner}/{repo}/contents/{path}
api_url = f"{api_base}/repos/{owner}/{repo}/contents/{file_path}"
Expand Down Expand Up @@ -559,7 +559,7 @@ def get_gitlab_file_content(repo_url: str, file_path: str, access_token: str = N
project_headers = {}
if access_token:
project_headers["PRIVATE-TOKEN"] = access_token

project_response = requests.get(project_info_url, headers=project_headers)
if project_response.status_code == 200:
project_data = project_response.json()
Expand Down Expand Up @@ -630,7 +630,7 @@ def get_bitbucket_file_content(repo_url: str, file_path: str, access_token: str
repo_headers = {}
if access_token:
repo_headers["Authorization"] = f"Bearer {access_token}"

repo_response = requests.get(repo_info_url, headers=repo_headers)
if repo_response.status_code == 200:
repo_data = repo_response.json()
Expand Down Expand Up @@ -736,7 +736,7 @@ def prepare_database(self, repo_url_or_path: str, repo_type: str = None, access_
# Handle backward compatibility
if embedder_type is None and is_ollama_embedder is not None:
embedder_type = 'ollama' if is_ollama_embedder else None

self.reset_database()
self._create_repo(repo_url_or_path, repo_type, access_token)
return self.prepare_db_index(embedder_type=embedder_type, excluded_dirs=excluded_dirs, excluded_files=excluded_files,
Expand Down Expand Up @@ -784,7 +784,7 @@ def _create_repo(self, repo_url_or_path: str, repo_type: str = None, access_toke

os.makedirs(root_path, exist_ok=True)
# url
if repo_url_or_path.startswith("https://") or repo_url_or_path.startswith("http://"):
if repo_url_or_path.startswith(("https://", "http://")):
# Extract the repository name from the URL
repo_name = self._extract_repo_name_from_url(repo_url_or_path, repo_type)
logger.info(f"Extracted repo name: {repo_name}")
Expand Down Expand Up @@ -816,7 +816,7 @@ def _create_repo(self, repo_url_or_path: str, repo_type: str = None, access_toke
logger.error(f"Failed to create repository structure: {e}")
raise

def prepare_db_index(self, embedder_type: str = None, is_ollama_embedder: bool = None,
def prepare_db_index(self, embedder_type: str = None, is_ollama_embedder: bool = None,
excluded_dirs: List[str] = None, excluded_files: List[str] = None,
included_dirs: List[str] = None, included_files: List[str] = None) -> List[Document]:
"""
Expand Down