助手列表排序
This commit is contained in:
@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -22,7 +23,25 @@ public class RagFlowApiController {
|
|||||||
//聊天助手列表
|
//聊天助手列表
|
||||||
@RequestMapping("/getChatAssistants")
|
@RequestMapping("/getChatAssistants")
|
||||||
public R getChatAssistants() throws Exception{
|
public R getChatAssistants() throws Exception{
|
||||||
return R.ok().put("list",ragFlowApiUtil.getChatAssistants(""));
|
List<Map<String,Object>> list = ragFlowApiUtil.getChatAssistants("");
|
||||||
|
List<Map<String,Object>> res = list;
|
||||||
|
for (int i=0; i<list.size(); i++) {
|
||||||
|
Map<String,Object> map = list.get(i);
|
||||||
|
if (map.get("name").toString().contains("消化")){
|
||||||
|
res.set(0,map);
|
||||||
|
}else if (map.get("name").toString().contains("呼吸")){
|
||||||
|
res.set(1,map);
|
||||||
|
}else if (map.get("name").toString().contains("风湿免疫")){
|
||||||
|
res.set(2,map);
|
||||||
|
}else if (map.get("name").toString().contains("肿瘤")){
|
||||||
|
res.set(3,map);
|
||||||
|
}else if (map.get("name").toString().contains("妇科")){
|
||||||
|
res.set(4,map);
|
||||||
|
}else if (map.get("name").toString().contains("全科")){
|
||||||
|
res.set(5,map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok().put("list",res);
|
||||||
}
|
}
|
||||||
|
|
||||||
//聊天助手下对话列表
|
//聊天助手下对话列表
|
||||||
|
|||||||
Reference in New Issue
Block a user