> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# サードパーティ統合

> このドキュメントは AI によって自動翻訳されています。不正確な部分がある場合は、[英語版](/en/self-host/deploy/troubleshooting/integrations) を参照してください。

## Notion統合

Notion OAuthはHTTPSのみをサポートしているため、ローカルデプロイメントでは内部統合を使用する必要があります。

### 環境変数の設定

`.env`に設定：

```
NOTION_INTEGRATION_TYPE=internal
NOTION_INTERNAL_SECRET=your_internal_secret_here
```

パブリック統合の場合（HTTPSのみ）：

```
NOTION_INTEGRATION_TYPE=public
NOTION_CLIENT_SECRET=oauth_client_secret
NOTION_CLIENT_ID=oauth_client_id
```

認証情報は[Notion Integrations](https://www.notion.so/my-integrations)から取得してください。

## テキスト音声変換（TTS）

### FFmpegが未インストールのエラー

OpenAI TTSは音声ストリームのセグメンテーションにFFmpegが必要です。

**macOS**:

```bash theme={null}
brew install ffmpeg
```

**Ubuntu**:

```bash theme={null}
sudo apt-get update
sudo apt-get install ffmpeg
```

**CentOS**:

```bash theme={null}
sudo yum install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum update
sudo yum install ffmpeg ffmpeg-devel
```

**Windows**:

1. [FFmpeg website](https://ffmpeg.org/download.html)からダウンロード
2. 展開して`C:\Program Files\`に移動
3. FFmpegのbinディレクトリをシステムPATHに追加
4. 確認：`ffmpeg -version`

## モデルトークナイザー

### 'gpt2'のトークナイザーを読み込めない

エラー：

```
Can't load tokenizer for 'gpt2'. If you were trying to load it from 'https://huggingface.co/models'...
```

環境変数でHugging Faceミラーまたはプロキシを設定してください。詳細については[環境ドキュメント](https://docs.dify.ai/en/self-host/deploy/configuration/environments)をご覧ください。

## セキュリティポリシー

### Content Security Policy（CSP）

XSS攻撃を軽減するためにCSPを有効にします。

`.env`内：

```
CSP_WHITELIST=https://api.example.com,https://cdn.example.com
```

アプリケーションで使用するすべてのドメイン（API、CDN、アナリティクスなど）を追加してください。

詳細については[MDN CSPドキュメント](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)をご覧ください。
