mirror of
https://github.com/openai/openai-go.git
synced 2026-04-01 09:07:22 +09:00
fix: fix issue with unmarshaling in some cases
This commit is contained in:
@@ -4,7 +4,6 @@ package realtime
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
@@ -99,7 +98,7 @@ func (r CallAcceptParams) MarshalJSON() (data []byte, err error) {
|
||||
return shimjson.Marshal(r.RealtimeSessionCreateRequest)
|
||||
}
|
||||
func (r *CallAcceptParams) UnmarshalJSON(data []byte) error {
|
||||
return json.Unmarshal(data, &r.RealtimeSessionCreateRequest)
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
type CallReferParams struct {
|
||||
|
||||
Reference in New Issue
Block a user