Skip to content

Commit 7fe300a

Browse files
authored
remove content array subunion (#598)
1 parent 2aaa980 commit 7fe300a

File tree

1 file changed

+3
-33
lines changed

1 file changed

+3
-33
lines changed

responses/response.go

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"fmt"
1010
"net/http"
1111
"net/url"
12-
"strings"
1312
"slices"
13+
"strings"
1414

1515
"github.com/openai/openai-go/v3/internal/apijson"
1616
"github.com/openai/openai-go/v3/internal/apiquery"
@@ -11249,10 +11249,8 @@ func (r *ResponseMcpListToolsInProgressEvent) UnmarshalJSON(data []byte) error {
1124911249
//
1125011250
// Use the methods beginning with 'As' to cast the union to one of its variants.
1125111251
type ResponseOutputItemUnion struct {
11252-
ID string `json:"id"`
11253-
// This field is a union of [[]ResponseOutputMessageContentUnion],
11254-
// [[]ResponseReasoningItemContent]
11255-
Content ResponseOutputItemUnionContent `json:"content"`
11252+
ID string `json:"id"`
11253+
Content []ResponseOutputMessageContentUnion `json:"content"`
1125611254
// This field is from variant [ResponseOutputMessage].
1125711255
Role constant.Assistant `json:"role"`
1125811256
Status string `json:"status"`
@@ -11515,34 +11513,6 @@ func (r *ResponseOutputItemUnion) UnmarshalJSON(data []byte) error {
1151511513
return apijson.UnmarshalRoot(data, r)
1151611514
}
1151711515

11518-
// ResponseOutputItemUnionContent is an implicit subunion of
11519-
// [ResponseOutputItemUnion]. ResponseOutputItemUnionContent provides convenient
11520-
// access to the sub-properties of the union.
11521-
//
11522-
// For type safety it is recommended to directly use a variant of the
11523-
// [ResponseOutputItemUnion].
11524-
//
11525-
// If the underlying value is not a json object, one of the following properties
11526-
// will be valid: OfResponseOutputMessageContentArray
11527-
// OfResponseReasoningItemContentArray]
11528-
type ResponseOutputItemUnionContent struct {
11529-
// This field will be present if the value is a
11530-
// [[]ResponseOutputMessageContentUnion] instead of an object.
11531-
OfResponseOutputMessageContentArray []ResponseOutputMessageContentUnion `json:",inline"`
11532-
// This field will be present if the value is a [[]ResponseReasoningItemContent]
11533-
// instead of an object.
11534-
OfResponseReasoningItemContentArray []ResponseReasoningItemContent `json:",inline"`
11535-
JSON struct {
11536-
OfResponseOutputMessageContentArray respjson.Field
11537-
OfResponseReasoningItemContentArray respjson.Field
11538-
raw string
11539-
} `json:"-"`
11540-
}
11541-
11542-
func (r *ResponseOutputItemUnionContent) UnmarshalJSON(data []byte) error {
11543-
return apijson.UnmarshalRoot(data, r)
11544-
}
11545-
1154611516
// ResponseOutputItemUnionAction is an implicit subunion of
1154711517
// [ResponseOutputItemUnion]. ResponseOutputItemUnionAction provides convenient
1154811518
// access to the sub-properties of the union.

0 commit comments

Comments
 (0)