一般的な標準仕様
本文では、プラグイン開発における共通構造について簡単に説明します。
パス仕様
マニフェストまたは任意の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): デフォルト値、基本タイプfloatintstringのみサポート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に準拠
ProviderConfigType(string)
secret-input(string):設定情報が暗号化されるtext-input(string):プレーンテキストselect(string):ドロップダウンボックスboolean(bool):スイッチmodel-selector(object):プロバイダー名、モデル名、モデルパラメータなどを含むモデル設定情報app-selector(object):アプリIDtool-selector(object):ツールプロバイダー、名前、パラメータなどを含むツール設定情報dataset-selector(string):TBD
ProviderConfigScope(string)
typeがmodel-selectorの場合allllmtext-embeddingrerankttsspeech2textmoderationvision
typeがapp-selectorの場合allchatworkflowcompletion
typeがtool-selectorの場合allpluginapiworkflow
ModelConfig
provider(string): プラグインIDを含むプロバイダー名、形式はlanggenius/openai/openaimodel(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]): 利用可能なオプション
Last updated