Freigeben über


CreateResponseExtensions.GetInstructionsBinaryData(CreateResponse) Method

Definition

Converts the Instructions string into a BinaryData suitable for assigning to Instructions.

This method properly JSON-encodes the string so it can be round-tripped through Utf8JsonWriter.WriteRawValue. Use this instead of FromString(String), which would produce invalid JSON.

public static BinaryData? GetInstructionsBinaryData(this Azure.AI.AgentServer.Responses.Models.CreateResponse request);
static member GetInstructionsBinaryData : Azure.AI.AgentServer.Responses.Models.CreateResponse -> BinaryData
<Extension()>
Public Function GetInstructionsBinaryData (request As CreateResponse) As BinaryData

Parameters

request
CreateResponse

The create-response request.

Returns

A BinaryData containing the JSON-encoded instructions string, or null if Instructions is null.

Exceptions

request is null.

Applies to