类 DeepSeekService

java.lang.Object
top.aoyudi.deepseek.service.DeepSeekService

@Component public class DeepSeekService extends Object
DeepSeek 服务类 用于与 DeepSeek API 进行交互
  • 字段详细资料

    • deepSeekConfig

      @Autowired private DeepSeekConfig deepSeekConfig
    • logger

      private static final org.slf4j.Logger logger
    • properties

      private final DeepSeekProperties properties
    • restTemplate

      private final org.springframework.web.client.RestTemplate restTemplate
  • 构造器详细资料

    • DeepSeekService

      public DeepSeekService(DeepSeekProperties properties)
      构造函数,初始化 DeepSeekProperties 和 RestTemplate
  • 方法详细资料

    • sendMessage

      public DSResponse sendMessage(DeepSeekRequest request)
      发送消息到 DeepSeek API,并返回响应
      参数:
      request - DeepSeek 请求对象
      返回:
      DeepSeek 的响应
    • handleResponse

      private DSResponse handleResponse(org.springframework.http.ResponseEntity<DSResponse> response)