mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-26 13:18:34 +07:00
147 lines
6.1 KiB
Plaintext
147 lines
6.1 KiB
Plaintext
---
|
||
title: 一般的な標準仕様
|
||
---
|
||
|
||
|
||
|
||
{/*
|
||
コントリビューター注:
|
||
----------------
|
||
これはレガシードキュメントであり、非推奨になります。
|
||
このバージョンに変更を加えないでください。
|
||
すべての更新は新しいバージョンに向けられるべきです:
|
||
/plugin_dev_ja/0411-general-specifications.ja
|
||
*/}
|
||
|
||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin_dev_ja/0411-general-specifications.ja">
|
||
<p>ドキュメント再編の一環として、このページは段階的に廃止されます。</p>
|
||
|
||
<p><u><b>このカードをクリックして</b></u>、最新情報が含まれる更新版にリダイレクトしてください。</p>
|
||
|
||
<p>新しいドキュメントに不一致や改善が必要な箇所を見つけた場合は、ページ下部の「問題を報告」ボタンを使用してください。</p>
|
||
</Card>
|
||
|
||
本文では、プラグイン開発における共通構造について簡単に説明します。
|
||
|
||
### **パス仕様**
|
||
|
||
マニフェストまたは任意のyamlファイルでファイルパスを指定する場合、ファイルタイプに基づいて以下の2つのルールに従ってください:
|
||
|
||
* 画像や動画などのマルチメディアファイル(例:プラグインの`icon`)の場合、プラグインのルートディレクトリの下の`_assets`フォルダに配置します。
|
||
* `.py`や`.yaml`などの通常のテキストファイルの場合、プラグインプロジェクト内の絶対パスを使用します。
|
||
|
||
### **共通構造**
|
||
|
||
プラグインを定義する際、ツール、モデル、インターフェース間で共有できるデータ構造があります。以下がこれらの共有構造です。
|
||
|
||
#### **I18nObject**
|
||
|
||
`I18nObject`は、IETF BCP 47標準に準拠した国際化構造で、現在4つの言語をサポートしています:
|
||
|
||
* en\_US
|
||
* zh\_Hans
|
||
* ja\_Jp
|
||
* pt\_BR
|
||
|
||
#### **ProviderConfig**
|
||
|
||
`ProviderConfig`は、`Tool`と`Endpoint`の両方に適用可能な共通プロバイダーフォーム構造です。
|
||
|
||
* `name` (string): フォーム項目名
|
||
* `label` (I18nObject, 必須): IETF BCP 47に準拠
|
||
* `type` (provider\_config\_type, 必須): フォームタイプ
|
||
* `scope` (provider\_config\_scope): オプション範囲、`type`により異なる
|
||
* `required` (bool): 空にできない
|
||
* `default` (any): デフォルト値、基本タイプ`float` `int` `string`のみサポート
|
||
* `options` (list\[provider\_config\_option]): オプション、typeが`select`の場合のみ使用
|
||
* `helper` (object): ヘルプドキュメントリンクラベル、IETF BCP 47に準拠
|
||
* `url` (string): ヘルプドキュメントリンク
|
||
* `placeholder` (object): IETF BCP 47に準拠
|
||
|
||
#### ProviderConfigOption(object)
|
||
|
||
* `value`(string, 必須):値
|
||
* `label`(object, 必須):[IETF BCP 47](https://tools.ietf.org/html/bcp47)に準拠
|
||
|
||
#### ProviderConfigType(string)
|
||
|
||
* `secret-input` (string):設定情報が暗号化される
|
||
* `text-input`(string):プレーンテキスト
|
||
* `select`(string):ドロップダウンボックス
|
||
* `boolean`(bool):スイッチ
|
||
* `model-selector`(object):プロバイダー名、モデル名、モデルパラメータなどを含むモデル設定情報
|
||
* `app-selector`(object):アプリID
|
||
* `tool-selector`(object):ツールプロバイダー、名前、パラメータなどを含むツール設定情報
|
||
* `dataset-selector`(string):TBD
|
||
|
||
#### ProviderConfigScope(string)
|
||
|
||
* `type`が`model-selector`の場合
|
||
* `all`
|
||
* `llm`
|
||
* `text-embedding`
|
||
* `rerank`
|
||
* `tts`
|
||
* `speech2text`
|
||
* `moderation`
|
||
* `vision`
|
||
* `type`が`app-selector`の場合
|
||
* `all`
|
||
* `chat`
|
||
* `workflow`
|
||
* `completion`
|
||
* `type`が`tool-selector`の場合
|
||
* `all`
|
||
* `plugin`
|
||
* `api`
|
||
* `workflow`
|
||
|
||
#### ModelConfig
|
||
|
||
* `provider` (string): プラグインIDを含むプロバイダー名、形式は`langgenius/openai/openai`
|
||
* `model` (string): 具体的なモデル名
|
||
* `model_type` (enum): モデルタイプの列挙、このドキュメントを参照
|
||
|
||
#### NodeResponse
|
||
|
||
* `inputs` (dict): ノードに最終的に入力される変数
|
||
* `outputs` (dict): ノード出力結果
|
||
* `process_data` (dict): ノード実行中に生成されたデータ
|
||
|
||
#### ToolSelector
|
||
|
||
* `provider_id` (string): ツールプロバイダー名
|
||
* `tool_name` (string): ツール名
|
||
* `tool_description` (string): ツールの説明
|
||
* `tool_configuration` (dict\[str, Any]): ツール設定情報
|
||
* `tool_parameters` (dict\[str, dict]): LLM推論が必要なパラメータ
|
||
* `name` (string): パラメータ名
|
||
* `type` (string): パラメータタイプ
|
||
* `required` (bool): 必須かどうか
|
||
* `description` (string): パラメータの説明
|
||
* `default` (any): デフォルト値
|
||
* `options` (list\[string]): 利用可能なオプション
|
||
|
||
{/*
|
||
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/ja-jp/plugins/schema-definition/general-specifications.mdx"
|
||
>
|
||
直接貢献することでドキュメントの改善にご協力ください
|
||
</Card>
|
||
<Card
|
||
title="問題を報告する"
|
||
icon="github"
|
||
href="https://github.com/langgenius/dify-docs-mintlify/issues/new?title=ドキュメントの問題%3A%20al-specificati&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%2Fja-jp/plugins/schema-definition%2Fgeneral-specifications.mdx%0A%0A%23%23%20提案される変更%0A%3C%21--%20特定の変更案がある場合は、ここで説明してください%20--%3E%0A%0A%3C%21--%20ドキュメントの品質向上にご協力いただきありがとうございます!%20--%3E"
|
||
>
|
||
エラーを見つけたり提案がありますか?お知らせください
|
||
</Card>
|
||
</CardGroup>
|