mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-04-12 06:07:37 +07:00
106 lines
5.3 KiB
Plaintext
106 lines
5.3 KiB
Plaintext
---
|
||
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.
|
||
*/}
|
||
|
||
<CardGroup cols="2">
|
||
<Card
|
||
title="このページを編集する"
|
||
icon="pen-to-square"
|
||
href="https://github.com/langgenius/dify-docs-mintlify/edit/main/plugin-dev-ja/0411-model-plugin-introduction.mdx"
|
||
>
|
||
直接貢献することでドキュメントの改善にご協力ください
|
||
</Card>
|
||
<Card
|
||
title="問題を報告する"
|
||
icon="github"
|
||
href="https://github.com/langgenius/dify-docs-mintlify/issues/new?title=ドキュメントの問題%3A%20model-plugin-introduct&body=%23%23%20問題の説明%0A%3C%21--%20発見した問題について簡単に説明してください%20--%3E%0A%0A%23%23%20ページリンク%0Ahttps%3A%2F%2Fgithub.com%2Flanggenius%2Fdify-docs-mintlify%2Fblob%2Fmain%2Fplugin-dev-ja%2F0411-model-plugin-introduction.mdx%0A%0A%23%23%20提案される変更%0A%3C%21--%20特定の変更案がある場合は、ここで説明してください%20--%3E%0A%0A%3C%21--%20ドキュメントの品質向上にご協力いただきありがとうございます!%20--%3E"
|
||
>
|
||
エラーを見つけたり提案がありますか?お知らせください
|
||
</Card>
|
||
</CardGroup>
|