| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.yb.util.OkHttpUtil; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.annotation.Resource; |
| | | |
| | |
| | | |
| | | |
| | | @GetMapping("/chat") |
| | | @Operation(summary = "大模型对话") |
| | | public String chat(@RequestParam(value = "message",defaultValue = "Hi") String message){ |
| | | return chatModel.call("请用中文回答如下问题,如果有地名出现,回到内容包括经纬度并使用json返回,"+message); |
| | | } |
| | | |
| | | @GetMapping("/intent") |
| | | @Operation(summary = "意图请求") |
| | | public String intent(@RequestParam(value = "message",defaultValue = "Hi") String message){ |
| | | String json = okHttpUtil.getMessage(intent+"="+message); |
| | | Map<String,String> hashMap = new HashMap<>() ; |
| | |
| | | } |
| | | |
| | | @GetMapping("/mix") |
| | | @Operation(summary = "意图与大模型请求") |
| | | public String mix(@RequestParam(value = "message",defaultValue = "Hi") String message){ |
| | | String json = okHttpUtil.postFastgpt(message); |
| | | System.out.println(message); |
| | |
| | | } |
| | | |
| | | @GetMapping("/fastgpt") |
| | | public String fastgpt(@RequestParam(value = "message",defaultValue = "Hi") String message){ |
| | | @Operation(summary = "知识库查询") |
| | | public String fastgpt(@RequestParam(value = "message",defaultValue = "三维实景") String message){ |
| | | |
| | | okHttpUtil.requesFast(message); |
| | | String json = okHttpUtil.requesFast(message); |
| | |
| | | } |
| | | |
| | | @GetMapping("/fastgpt_list") |
| | | public String fastgpt_list(String parentId){ |
| | | @Operation(summary = "知识库列表") |
| | | public String fastgpt_list(){ |
| | | |
| | | |
| | | String json = okHttpUtil.requesFast_kl(parentId); |
| | | String json = okHttpUtil.requesFast_kl(); |
| | | |
| | | return json ; |
| | | } |