Share via


Prompt Class

Definition

Reference to a prompt template and its variables. Learn more.

public class Prompt : Azure.AI.AgentServer.Contracts.Generated.Common.IUtf8JsonSerializable, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.Prompt>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.Prompt>
type Prompt = class
    interface IUtf8JsonSerializable
    interface IJsonModel<Prompt>
    interface IPersistableModel<Prompt>
Public Class Prompt
Implements IJsonModel(Of Prompt), IPersistableModel(Of Prompt), IUtf8JsonSerializable
Inheritance
Prompt
Implements

Constructors

Name Description
Prompt()

Initializes a new instance of Prompt for deserialization.

Prompt(String, String, ResponsePromptVariables, IDictionary<String,BinaryData>)

Initializes a new instance of Prompt.

Prompt(String)

Initializes a new instance of Prompt.

Properties

Name Description
Id

The unique identifier of the prompt template to use.

Variables

Gets or sets the variables.

Version

Optional version of the prompt template.

Methods

Name Description
DeserializePrompt(JsonElement, ModelReaderWriterOptions)
FromResponse(Response)

Deserializes the model from a raw response.

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
ToRequestContent()

Convert into a RequestContent.

Explicit Interface Implementations

Name Description
IJsonModel<Prompt>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<Prompt>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<Prompt>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<Prompt>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<Prompt>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IUtf8JsonSerializable.Write(Utf8JsonWriter)

Applies to