committed by
GitHub
parent
980504b47e
commit
62eb4beed2
15
internal/unmarshaler.go
Normal file
15
internal/unmarshaler.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package openai
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type Unmarshaler interface {
|
||||
Unmarshal(data []byte, v any) error
|
||||
}
|
||||
|
||||
type JSONUnmarshaler struct{}
|
||||
|
||||
func (jm *JSONUnmarshaler) Unmarshal(data []byte, v any) error {
|
||||
return json.Unmarshal(data, v)
|
||||
}
|
||||
Reference in New Issue
Block a user