语言

你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

StructuredInputDefinition Class

Definition

An structured input that can participate in prompt template substitutions and tool argument binding.

public class StructuredInputDefinition : System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.Agents.StructuredInputDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.Agents.StructuredInputDefinition>
type StructuredInputDefinition = class
    interface IJsonModel<StructuredInputDefinition>
    interface IPersistableModel<StructuredInputDefinition>
Public Class StructuredInputDefinition
Implements IJsonModel(Of StructuredInputDefinition), IPersistableModel(Of StructuredInputDefinition)
Inheritance
StructuredInputDefinition
Implements

Constructors

Name Description
StructuredInputDefinition()

Initializes a new instance of StructuredInputDefinition.

Properties

Name Description
DefaultValue

The default value for the input if no run-time value is provided.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Description

A human-readable description of the input.

IsRequired

Whether this input is required when invoking the agent.

Schema

The JSON schema for the structured input (optional).

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<StructuredInputDefinition>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<StructuredInputDefinition>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<StructuredInputDefinition>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<StructuredInputDefinition>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<StructuredInputDefinition>.Write(ModelReaderWriterOptions)

Applies to