Class SpringAIDeepseekController

java.lang.Object
com.bytedesk.ai.springai.deepseek.SpringAIDeepseekController

@RestController @RequestMapping("/springai/deepseek") @ConditionalOnProperty(name="spring.ai.deepseek.chat.enabled", havingValue="true") public class SpringAIDeepseekController extends Object
DeepSeek接口
  • Field Details

  • Constructor Details

    • SpringAIDeepseekController

      public SpringAIDeepseekController()
  • Method Details

    • chatSync

      @GetMapping("/chat/sync") public org.springframework.http.ResponseEntity<JsonResult<?>> chatSync(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      方式1:同步调用 http://127.0.0.1:9003/springai/deepseek/chat/sync?message=hello
    • chatStream

      @GetMapping("/chat/stream") public reactor.core.publisher.Flux<org.springframework.ai.chat.model.ChatResponse> chatStream(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      方式2:异步流式调用 http://127.0.0.1:9003/springai/deepseek/chat/stream?message=hello
    • chatSSE

      @GetMapping(value="/chat/sse", produces="text/event-stream") public org.springframework.web.servlet.mvc.method.annotation.SseEmitter chatSSE(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      方式3:SSE调用 http://127.0.0.1:9003/springai/deepseek/chat/sse?message=hello
    • chatCustom

      @GetMapping("/chat/custom") public org.springframework.http.ResponseEntity<?> chatCustom(@RequestParam(value="message",defaultValue="Tell me a joke") String message)
      自定义模型参数的调用示例 http://127.0.0.1:9003/springai/deepseek/chat/custom?message=hello
    • destroy

      public void destroy()