codingknees

Results 5 comments of codingknees
trafficstars

Organization/Company: Quwan Holding Limited Website: https://52tt.com Country: 中国(China) Contact: travelwithheart##yeah.net Usage scenario: 一个内部使用的研发辅助工具,gitlab的webhook服务 Status: production

when there are Emoji in string, Marshal would fail: `json: error calling MarshalJSON for type openai.EscapeString: invalid character 'U' in string escape code` for example, 😗 will be quoted to...

> when there are Emoji in string, Marshal would fail: > > `json: error calling MarshalJSON for type openai.EscapeString: invalid character 'U' in string escape code` > > for example,...

hack as ` EscapeString string func (esc EscapeString) MarshalJSON() ([]byte, error) { x := strings.ReplaceAll(strconv.QuoteToASCII(string(esc)), "\\U", "\\u") return []byte(x), nil }`