工业互联网平台2.0版本后端代码
houzhongjian
2025-06-05 ca6ad5acfb389b852211355c4a56c71769a018c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.iailab.module.ai.api.chat;
 
import com.iailab.module.ai.api.chat.dto.AiChatMessageSendRespDTO;
import com.iailab.module.ai.api.chat.dto.AiChatMessageSendReqDTO;
import com.iailab.module.ai.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
 
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 大模型消息")
public interface AiChatMessageApi {
 
    String PREFIX = ApiConstants.PREFIX + "/message";
 
    @PostMapping(PREFIX + "/send-message")
    @Operation(summary = "发送消息(段式)", description = "一次性返回,响应较慢")
    AiChatMessageSendRespDTO sendMessage(@Valid @RequestBody AiChatMessageSendReqDTO sendReqDTO);
}