diff --git a/sdk/ai/azopenai/custom_client.go b/sdk/ai/azopenai/custom_client.go index 3a6a9ba70306..286bc171cedf 100644 --- a/sdk/ai/azopenai/custom_client.go +++ b/sdk/ai/azopenai/custom_client.go @@ -327,3 +327,8 @@ func NewChatRequestUserMessageContent[T string | []ChatCompletionRequestMessageC func (c ChatRequestUserMessageContent) MarshalJSON() ([]byte, error) { return json.Marshal(c.value) } + +// UnmarshalJSON implements the json.Unmarshaller interface for type ChatRequestUserMessageContent. +func (c *ChatRequestUserMessageContent) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &c.value) +} diff --git a/sdk/ai/azopenai/custom_models.go b/sdk/ai/azopenai/custom_models.go index 4c9bb7038fd5..4366965b39df 100644 --- a/sdk/ai/azopenai/custom_models.go +++ b/sdk/ai/azopenai/custom_models.go @@ -185,3 +185,8 @@ func (tf ChatCompletionsToolChoiceFunction) MarshalJSON() ([]byte, error) { func (tc ChatCompletionsToolChoice) MarshalJSON() ([]byte, error) { return json.Marshal(tc.value) } + +// UnmarshalJSON implements the json.Unmarshaller interface for type ChatCompletionsToolChoice. +func (tc *ChatCompletionsToolChoice) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &tc.value) +}