Files
dify-docs/plugin-dev-ja/0411-model-plugin-introduction.mdx
2025-07-16 16:42:34 +08:00

94 lines
4.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
dimensions:
type:
primary: reference
detail: core
level: beginner
standard_title: Model Plugin Introduction
language: ja
title: モデルプラグイン
description: モデルプラグインの基本概念と構造を紹介します。モデルプラグインは、DifyがさまざまなプロバイダーOpenAI、Anthropic、Googleなどの、大規模言語モデルLLM、テキスト埋め込み、音声テキスト変換といったさまざまなタイプのモデルを呼び出すことを可能にします。
---
Modelプラグインは、DifyプラットフォームがそのモデルプロバイダーのすべてのLLMを呼び出すことを可能にします。例えば、OpenAIモデルプラグインをインストールすると、DifyプラットフォームはOpenAIが提供する`GPT-4`、`GPT-4o-2024-05-13`などのモデルを呼び出すことができます。
## モデルプラグインの構造
モデルプラグイン開発プロセスで関連する可能性のある概念を理解しやすくするために、以下にモデルプラグイン内の構造の簡単な紹介を示します。
* **モデルプロバイダー**:大規模モデルの開発会社。例:**OpenAI、Anthropic、Google**など。
* **モデルカテゴリ**モデルプロバイダーによって、大規模言語モデルLLM、テキスト埋め込みモデルText embedding、音声テキスト変換Speech2textなどのカテゴリが存在します。
* **特定のモデル**`claude-3-5-sonnet`、`gpt-4-turbo`など。
プラグインプロジェクト内のコード階層構造:
```bash
- モデルプロバイダー
- モデルカテゴリ
- 特定のモデル
```
**Anthropic**を例にとると、モデルプラグインのサンプル構造は次のようになります。
```bash
- Anthropic
- llm
claude-3-5-sonnet-20240620
claude-3-haiku-20240307
claude-3-opus-20240229
claude-3-sonnet-20240229
claude-instant-1.2
claude-instant-1
```
OpenAIを例にとると、複数のモデルタイプをサポートしているため、複数のモデルカテゴリレイヤーが存在し、構造は次のようになります。
```bash
├── models
│ ├── llm
│ │ ├── chatgpt-4o-latest
│ │ ├── gpt-3.5-turbo
│ │ ├── gpt-4-0125-preview
│ │ ├── gpt-4-turbo
│ │ ├── gpt-4o
│ │ ├── llm
│ │ ├── o1-preview
│ │ └── text-davinci-003
│ ├── moderation
│ │ ├── moderation
│ │ └── text-moderation-stable
│ ├── speech2text
│ │ ├── speech2text
│ │ └── whisper-1
│ ├── text_embedding
│ │ ├── text-embedding-3-large
│ │ └── text_embedding
│ └── tts
│ ├── tts-1-hd
│ ├── tts-1
│ └── tts
```
## モデル設定
モデルプラグインは、設定ファイルを通じてモデルの動作と属性を定義します。詳細なモデル設計ルールと設定フォーマットについては、[モデル設計ルール](/plugin-dev-ja/0411-model-designing-rules)ドキュメントと[モデルスキーマ](/plugin-dev-ja/0412-model-schema)仕様を参照してください。
## さらに読む
- [新しいモデルの迅速な統合](/plugin-dev-ja/0211-getting-started-new-model) - 既にサポートされているプロバイダーに新しいモデルを追加する方法を学ぶ
- [モデル設計ルール](/plugin-dev-ja/0411-model-designing-rules) - モデル設定の仕様を詳しく理解する
- [モデルスキーマ](/plugin-dev-ja/0412-model-schema) - モデルプラグインのアーキテクチャを深く理解する
- [共通仕様定義](/plugin-dev-ja/0411-general-specifications) - プラグインメタデータの定義方法を理解する
- [プラグイン開発の基本概念](/plugin-dev-ja/0111-getting-started-dify-plugin) - プラグイン開発入門ガイドに戻る
{/*
Contributing Section
DO NOT edit this section!
It will be automatically generated by the script.
*/}
---
[このページを編集する](https://github.com/langgenius/dify-docs/edit/main/plugin-dev-ja/0411-model-plugin-introduction.mdx) | [問題を報告する](https://github.com/langgenius/dify-docs/issues/new?template=docs.yml)