Language

OpenApiFunctionDefinition Class

Definition

The input definition information for an openapi function.

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

Constructors

Name Description
OpenApiFunctionDefinition(String, BinaryData, OpenApiAuthenticationDetails)

Initializes a new instance of OpenApiFunctionDefinition.

Properties

Name Description
Authentication

Open API authentication details.

DefaultParameters

List of OpenAPI spec parameters that will use user-provided defaults.

Description

A description of what the function does, used by the model to choose when and how to call the function.

Functions

List of function definitions used by OpenApi tool.

Name

The name of the function to be called.

Specification

The openapi function shape, described as a JSON Schema object.

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" }.

Methods

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

Explicit Interface Implementations

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

Applies to