deepseek大模型api
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

3 months ago
3 months ago
  1. package com.bw.qanda.controller;
  2. import javax.annotation.Resource;
  3. import lombok.extern.slf4j.Slf4j;
  4. import org.springframework.stereotype.Controller;
  5. import org.springframework.web.bind.annotation.PostMapping;
  6. import org.springframework.web.bind.annotation.RequestBody;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestMethod;
  9. import org.springframework.web.bind.annotation.ResponseBody;
  10. import com.bw.qanda.service.QandaService;
  11. /**
  12. * @author jian.mao
  13. * @date 2023年11月8日
  14. * @description
  15. */
  16. @Controller
  17. @RequestMapping("/qanda")
  18. @Slf4j
  19. public class QandaController {
  20. @Resource
  21. private QandaService qandaService;
  22. @PostMapping("/putQuestion")
  23. @ResponseBody
  24. public String putQuestion(@RequestBody String dataJson){
  25. String response = qandaService.putQuestion(dataJson);
  26. return response;
  27. }
  28. /**
  29. * 本地模型调用
  30. * @param dataJson
  31. * @return
  32. */
  33. @PostMapping("/putLocalQuestion")
  34. @ResponseBody
  35. public String putLocalQuestion(@RequestBody String dataJson){
  36. String response = qandaService.putLocalQuestion(dataJson);
  37. return response;
  38. }
  39. @RequestMapping(value = "/hello", method = RequestMethod.GET)
  40. @ResponseBody
  41. public String hello(String param, String token) {
  42. return "123";
  43. }
  44. }