AIFunctionDeclaration.JsonSchema 속성

정의

함수 및 해당 입력 매개 변수를 설명하는 JSON 스키마를 가져옵니다.

public:
 virtual property System::Text::Json::JsonElement JsonSchema { System::Text::Json::JsonElement get(); };
public virtual System.Text.Json.JsonElement JsonSchema { get; }
member this.JsonSchema : System.Text.Json.JsonElement
Public Overridable ReadOnly Property JsonSchema As JsonElement

속성 값

설명

지정하면 함수 및 해당 입력 매개 변수를 설명하는 자체 포함 JSON 스키마 문서를 선언합니다. 두 숫자를 함께 추가하는 함수에 대한 JSON 스키마의 간단한 예는 다음과 같습니다.

{
  "type": "object",
  "properties": {
    "a" : { "type": "number" },
    "b" : { "type": ["number","null"], "default": 1 }
  },
  "required" : ["a"]
}

스키마 문서에 있는 메타데이터는 AI 함수 호출을 안내하는 데 중요한 역할을 합니다.

AIFunction 스키마를 통해 AIFunctionFactory만들어지면 구성된 JsonSerializerOptions 스키마를 사용하여 메서드의 매개 변수에서 자동으로 파생됩니다 AIJsonSchemaCreateOptions.

스키마가 지정되지 않은 경우 채팅 클라이언트를 사용하는 경우 JSON 입력이 허용됨을 나타내는 "{}" 또는 "true" 스키마를 가정해야 합니다.

적용 대상