|
@@ -3,17 +3,28 @@ package com.qmth.ops.api.controller.admin;
|
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
|
import com.qmth.boot.core.ai.model.llm.LlmAppType;
|
|
|
import com.qmth.ops.api.constants.OpsApiConstants;
|
|
|
+import com.qmth.ops.api.vo.CodeNameVO;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.LinkedList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@RestController
|
|
|
@RequestMapping(OpsApiConstants.ADMIN_URI_PREFIX + "/llm")
|
|
|
public class LlmInfoController {
|
|
|
|
|
|
+ private List<CodeNameVO> appTypeList;
|
|
|
+
|
|
|
@RequestMapping("/app_types")
|
|
|
@Aac(auth = false)
|
|
|
public Object list() {
|
|
|
- return LlmAppType.values();
|
|
|
+ if (appTypeList == null) {
|
|
|
+ appTypeList = new LinkedList<>();
|
|
|
+ appTypeList.add(new CodeNameVO(LlmAppType.AUTO_SCORE.toString(), "自动评分"));
|
|
|
+ appTypeList.add(new CodeNameVO(LlmAppType.AUTO_GENERATE_QUESTION.toString(), "自动命题"));
|
|
|
+ }
|
|
|
+ return appTypeList;
|
|
|
}
|
|
|
|
|
|
}
|