@@ -139,7 +139,7 @@ type ChatCompletionContentPartUserUnionParam struct {
139139}
140140
141141func (c * ChatCompletionContentPartUserUnionParam ) UnmarshalJSON (data []byte ) error {
142- var chatContentPart map [string ]interface {}
142+ var chatContentPart map [string ]any
143143 if err := json .Unmarshal (data , & chatContentPart ); err != nil {
144144 return err
145145 }
@@ -187,7 +187,7 @@ func (c ChatCompletionContentPartUserUnionParam) MarshalJSON() ([]byte, error) {
187187}
188188
189189type StringOrAssistantRoleContentUnion struct {
190- Value interface {}
190+ Value any
191191}
192192
193193func (s * StringOrAssistantRoleContentUnion ) UnmarshalJSON (data []byte ) error {
@@ -213,7 +213,7 @@ func (s StringOrAssistantRoleContentUnion) MarshalJSON() ([]byte, error) {
213213}
214214
215215type StringOrArray struct {
216- Value interface {}
216+ Value any
217217}
218218
219219func (s * StringOrArray ) UnmarshalJSON (data []byte ) error {
@@ -256,7 +256,7 @@ func (s StringOrArray) MarshalJSON() ([]byte, error) {
256256}
257257
258258type StringOrUserRoleContentUnion struct {
259- Value interface {}
259+ Value any
260260}
261261
262262func (s * StringOrUserRoleContentUnion ) UnmarshalJSON (data []byte ) error {
@@ -282,12 +282,12 @@ func (s StringOrUserRoleContentUnion) MarshalJSON() ([]byte, error) {
282282}
283283
284284type ChatCompletionMessageParamUnion struct {
285- Value interface {}
285+ Value any
286286 Type string
287287}
288288
289289func (c * ChatCompletionMessageParamUnion ) UnmarshalJSON (data []byte ) error {
290- var chatMessage map [string ]interface {}
290+ var chatMessage map [string ]any
291291 if err := json .Unmarshal (data , & chatMessage ); err != nil {
292292 return err
293293 }
@@ -502,7 +502,6 @@ type Reasoning struct {
502502 Summary * string `json:"summary,omitempty"`
503503}
504504
505- // ChatCompletionRequest represents a request structure for chat completion API.
506505// ChatCompletionModality represents the output types that the model can generate.
507506type ChatCompletionModality string
508507
@@ -704,7 +703,7 @@ type ChatCompletionRequest struct {
704703 // Stop string / array / null Defaults to null
705704 // Up to 4 sequences where the API will stop generating further tokens.
706705 // Docs: https://platform.openai.com/docs/api-reference/chat/create#chat-create-stop
707- Stop interface {} `json:"stop,omitempty"`
706+ Stop any `json:"stop,omitempty"`
708707
709708 // Stream: If set, partial message deltas will be sent, like in ChatGPT.
710709 // Docs: https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream
@@ -810,7 +809,7 @@ const (
810809
811810// ChatCompletionToolChoice represents the tool choice for chat completions.
812811// It can be either a string (none, auto, required) or a ChatCompletionNamedToolChoice object.
813- type ChatCompletionToolChoice interface {}
812+ type ChatCompletionToolChoice any
814813
815814// ChatCompletionNamedToolChoice specifies a tool the model should use. Use to force the model to call a specific function.
816815type ChatCompletionNamedToolChoice struct {
@@ -1236,7 +1235,7 @@ type Embedding struct {
12361235
12371236// EmbeddingUnion is a union type that can handle both []float64 and string formats.
12381237type EmbeddingUnion struct {
1239- Value interface {}
1238+ Value any
12401239}
12411240
12421241// UnmarshalJSON implements json.Unmarshaler to handle both []float64 and string formats.
0 commit comments