Language

AIJsonUtilities.AddAIContentType メソッド

定義

オーバーロード

Name 説明
AddAIContentType(JsonSerializerOptions, Type, String)

AIContentのポリモーフィックな構成にカスタム コンテンツ タイプを追加します。

AddAIContentType<TContent>(JsonSerializerOptions, String)

AIContentのポリモーフィックな構成にカスタム コンテンツ タイプを追加します。

AddAIContentType(JsonSerializerOptions, Type, String)

AIContentのポリモーフィックな構成にカスタム コンテンツ タイプを追加します。

public:
[System::Runtime::CompilerServices::Extension]
 static void AddAIContentType(System::Text::Json::JsonSerializerOptions ^ options, Type ^ contentType, System::String ^ typeDiscriminatorId);
public static void AddAIContentType(this System.Text.Json.JsonSerializerOptions options, Type contentType, string typeDiscriminatorId);
static member AddAIContentType : System.Text.Json.JsonSerializerOptions * Type * string -> unit
<Extension()>
Public Sub AddAIContentType (options As JsonSerializerOptions, contentType As Type, typeDiscriminatorId As String)

パラメーター

options
JsonSerializerOptions

構成するオプション インスタンス。

contentType
Type

構成するカスタム コンテンツ タイプ。

typeDiscriminatorId
String

コンテンツ タイプの型識別子 ID。

例外

options、 contentType、または typeDiscriminatorId が null。

contentType は組み込みのコンテンツ タイプであるか、 AIContentから派生していません。

options は読み取り専用インスタンスです。

適用対象

AddAIContentType<TContent>(JsonSerializerOptions, String)

AIContentのポリモーフィックな構成にカスタム コンテンツ タイプを追加します。

public:
generic <typename TContent>
 where TContent : Microsoft::Extensions::AI::AIContent[System::Runtime::CompilerServices::Extension]
 static void AddAIContentType(System::Text::Json::JsonSerializerOptions ^ options, System::String ^ typeDiscriminatorId);
public static void AddAIContentType<TContent>(this System.Text.Json.JsonSerializerOptions options, string typeDiscriminatorId) where TContent : Microsoft.Extensions.AI.AIContent;
static member AddAIContentType : System.Text.Json.JsonSerializerOptions * string -> unit (requires 'Content :> Microsoft.Extensions.AI.AIContent)
<Extension()>
Public Sub AddAIContentType(Of TContent As AIContent) (options As JsonSerializerOptions, typeDiscriminatorId As String)

型パラメーター

TContent

構成するカスタム コンテンツ タイプ。

パラメーター

options
JsonSerializerOptions

構成するオプション インスタンス。

typeDiscriminatorId
String

コンテンツ タイプの型識別子 ID。

例外

options または typeDiscriminatorId が null。

TContent は組み込みのコンテンツ タイプです。

options は読み取り専用インスタンスです。

適用対象