You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15")
126
+
127
+
res:=new(ListFilesResp)
128
+
httpResp, err:=c.client.Do(httpReq)
129
+
iferr!=nil {
130
+
returnnil, errors.Wrap(err, "[ai_client]send request to send msg error")
131
+
}
132
+
deferhttpResp.Body.Close()
133
+
bodyBytes, err:=io.ReadAll(httpResp.Body)
134
+
// fmt.Println(string(bodyBytes))
135
+
iferr!=nil {
136
+
returnnil, errors.Wrap(err, "[ai_resp]read resp body failed")
137
+
}
138
+
err=json.Unmarshal(bodyBytes, res)
139
+
iferr!=nil {
140
+
returnnil, errors.Wrap(err, "[ai_resp]unmarshal resp body failed")
// req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15")
202
+
203
+
res:=new(DeleteFileResp)
204
+
205
+
httpResp, err:=c.client.Do(httpReq)
206
+
iferr!=nil {
207
+
returnnil, errors.Wrap(err, "[ai_client]send request to send msg error")
208
+
}
209
+
deferhttpResp.Body.Close()
210
+
211
+
bodyBytes, err:=io.ReadAll(httpResp.Body)
212
+
iferr!=nil {
213
+
returnnil, errors.Wrap(err, "[ai_resp]read resp body failed")
214
+
}
215
+
err=json.Unmarshal(bodyBytes, res)
216
+
iferr!=nil {
217
+
returnnil, errors.Wrap(err, "[ai_resp]unmarshal resp body failed")
0 commit comments