> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/devops-ja/she-ding/ai-she-ding/kasutamu-ai-moderuno.md).

# カスタム AI モデルの追加

{% hint style="warning" %}

#### 旧UI向けに作成

この記事は旧UI向けに作成されました。手順は今でも使用できますが、スクリーンショットは古くなっています。場合によっては、手順で参照されている項目が移動または変更されていることがあります。項目が見つからない場合は、 [どこに行ったのか](/devops/devops-ja/shii-uiux-heno/dokonittanoka.md) 記事。
{% endhint %}

## ![](https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) 概要

この記事では、カスタム AI モデルを DevOps に接続し、Flosum の共有 AI リソースを置き換える方法を説明します。独自のモデルを使用すると、パフォーマンスの向上、レイテンシの低減、そして Flosum の共有 AI リソースに対する高負荷によって発生する一時的なエラーの防止に役立ちます。セルフホスト型モデルは、クラウド AI プロバイダーよりも強力な情報セキュリティを提供できる場合もあります。選択するプロバイダーとモデルによっては、速度と信頼性の向上が見られることがあります。接続するには、選択したプロバイダーの API トークンが必要です。DevOps の AI 機能の詳細については、次の記事を参照してください。

* [AI 機能の概要](/devops/devops-ja/she-ding/ai-she-ding/ai-no.md)

{% hint style="info" %}

#### ベスト プラクティス

* より広く展開する前に、本番以外のブランチでカスタム AI モデルの構成を検証してください。
* セキュリティ要件（クラウド vs セルフホスト）を満たす AI モデル プロバイダーの API エンドポイントを使用してください。
* API トークンは安全に保管し、セキュリティ要件に基づいてローテーションしてください。
  {% endhint %}

### 対応 AI モデル

* DeepSeek Chat
* DeepSeek Reasoner
* GPT 4o
* GPT 4o Mini
* GPT 4.1
* GPT 4.1 Mini
* GPT 5
* GPT 5 Mini

## カスタムモデルの追加

{% stepper %}
{% step %}

### AI 設定にアクセス

1. 次をクリックします **設定** を左側のサイドバー メニューから。
2. 次をクリックします **一般** タブ。
3. 次をクリックします **AI 設定**.

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F4ttPCgSU5HP1IPyvoqYJ%2FAddingACustomAiModel-S01-01.png?alt=media&amp;token=f69f004f-466a-4b97-9dc3-ebf029cf924c" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### カスタムモデルを有効化

1. 有効にする **カスタムモデル** 切り替え。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fofv151HeCuDIiIukdNut%2FAddingACustomAiModel-S02-01.png?alt=media&amp;token=42bcde25-985b-4d60-80d6-806305804745" alt="" width="563"><figcaption></figcaption></figure></div>
2. 次をクリックします **モデル** ドロップダウン メニュー。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FTAmUyHgwM6MVUp12MAj9%2FAddingACustomAiModel-S02-02.png?alt=media&amp;token=ae1b724c-cf90-42aa-899c-787f4906dc4a" alt="" width="563"><figcaption></figcaption></figure></div>
3. 接続する AI モデルを選択します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F86nH2jjAtyuBxtWRkir8%2FAddingACustomAiModel-S02-03.png?alt=media&amp;token=8c543004-9cbe-420e-a2aa-f847dc29d8df" alt="" width="563"><figcaption></figcaption></figure></div>
4. この **API URL** テキストボックスに、接続する AI モデルのエンドポイント URL を入力します。

{% hint style="info" %}

#### API URL

**DeepSeek API エンドポイント**

次の URL を使用して、DeepSeek でホストされている DeepSeek モデルに接続できます。

* <https://api.deepseek.com>

**OpenAI API エンドポイント**

次の URL を使用して、OpenAI でホストされている GPT モデルに接続できます。

* <https://api.openai.com/v1>

**サードパーティまたはセルフホスト型の API エンドポイント**

OpenAI 互換の API エンドポイントを使用する、サードパーティまたはセルフホスト型の AI モデルならどれでも接続できます。API URL は Flosum のサーバーからアクセス可能である必要があります。
{% endhint %}

5. この **トークン** テキストボックスに、AI モデルに接続するための API トークンを入力します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fs5BINaUQSDNfQjxllgfw%2FAddingACustomAiModel-S02-04.png?alt=media&amp;token=63144fa0-4e71-4090-ba50-c4868c98632d" alt="" width="563"><figcaption></figcaption></figure></div>
6. 次をクリックします **保存**.

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FnF10iwJbDWP9zafv50mm%2FAddingACustomAiModel-S02-05.png?alt=media&amp;token=c0c93ab0-3020-40cc-bd8a-c2bec84ec09b" alt="" width="563"><figcaption></figcaption></figure></div>
7. AI モデルへの接続に成功すると、次のメッセージが表示されます: 「**AI モデルの構成に成功しました。**"
   {% endstep %}

{% step %}

### AI 機能の使用

DevOps の AI 機能の使用方法については、次の記事を参照してください:

* AI テストクラス作成ツール
* AI Code Documenter
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/devops-ja/she-ding/ai-she-ding/kasutamu-ai-moderuno.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
