go-chatgpt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
234 B

  1. package gogpt
  2. import (
  3. "encoding/json"
  4. )
  5. type marshaller interface {
  6. marshal(value any) ([]byte, error)
  7. }
  8. type jsonMarshaller struct{}
  9. func (jm *jsonMarshaller) marshal(value any) ([]byte, error) {
  10. return json.Marshal(value)
  11. }