mirror of
https://github.com/ManyakRus/starter.git
synced 2025-11-26 23:10:42 +02:00
16 lines
235 B
Go
16 lines
235 B
Go
package openai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type Marshaller interface {
|
|
Marshal(value any) ([]byte, error)
|
|
}
|
|
|
|
type JSONMarshaller struct{}
|
|
|
|
func (jm *JSONMarshaller) Marshal(value any) ([]byte, error) {
|
|
return json.Marshal(value)
|
|
}
|