boweniac 4 месяцев назад
Родитель
Сommit
f03467b1a5
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      internal/logic/UsageDetail/get_usage_detail_list_logic.go

+ 7 - 1
internal/logic/UsageDetail/get_usage_detail_list_logic.go

@@ -48,6 +48,12 @@ func (l *GetUsageDetailListLogic) GetUsageDetailList(req *types.UsageDetailListR
 	resp.Data.Total = data.PageDetails.Total
 
 	for _, v := range data.List {
+		request := v.Request
+		if v.App == 2 {
+			request = "问题优化"
+		} else if v.App == 4 {
+			request = "节点判断"
+		}
 		resp.Data.Data = append(resp.Data.Data,
 			types.UsageDetailInfo{
 				BaseIDInfo: types.BaseIDInfo{
@@ -60,7 +66,7 @@ func (l *GetUsageDetailListLogic) GetUsageDetailList(req *types.UsageDetailListR
 				BotId:            &v.BotID,
 				App:              &v.App,
 				SessionId:        &v.SessionID,
-				Request:          &v.Request,
+				Request:          &request,
 				Response:         &v.Response,
 				TotalTokens:      &v.TotalTokens,
 				PromptTokens:     &v.PromptTokens,