|
@@ -36,7 +36,16 @@ type ServiceContext struct {
|
|
|
func AppendUsageDetailLog(ctx context.Context, svcCtx *ServiceContext,
|
|
|
authToken string, req *types.CompApiReq, resp *types.CompOpenApiResp) error {
|
|
|
|
|
|
- rawReqResp := custom_types.OriginalData{Request: req, Response: resp}
|
|
|
+ tmp0 := make([]custom_types.VResponseData, 0)
|
|
|
+ for _, tmp1 := range resp.ResponseData {
|
|
|
+ tmp21, _ := tmp1["id"].(string)
|
|
|
+ tmp22, _ := tmp1["model"].(string)
|
|
|
+ tmp2 := custom_types.VResponseData{ID: tmp21, Model: tmp22}
|
|
|
+ tmp0 = append(tmp0, tmp2)
|
|
|
+ }
|
|
|
+ tmp3 := custom_types.VResponse{ID: resp.ID, Model: resp.Model, ResponseData: tmp0}
|
|
|
+
|
|
|
+ rawReqResp := custom_types.OriginalData{Request: req, Response: resp, VResponse: &tmp3}
|
|
|
orgId := uint64(0)
|
|
|
apiKeyObj, ok := contextkey.AuthTokenInfoKey.GetValue(ctx)
|
|
|
if ok {
|