Class N8nChatController
java.lang.Object
com.bytedesk.ai.springai.providers.n8n.N8nChatController
@RestController
@RequestMapping("/api/v1/n8n")
@ConditionalOnProperty(name="bytedesk.n8n.enabled",
havingValue="true",
matchIfMissing=false)
public class N8nChatController
extends Object
RAGFlow Chat Controller
https://n8n.io/docs/dev/http_api_reference
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
RAGFlow 聊天请求数据结构static class
RAGFlow 简单消息请求数据结构 -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>
createAgentCompletion
(String agentId, N8nChatController.N8nChatRequest request) 创建代理完成 - OpenAI 兼容接口org.springframework.http.ResponseEntity<?>
createChatCompletion
(String chatId, N8nChatController.N8nChatRequest request) 创建聊天完成 - OpenAI 兼容接口org.springframework.http.ResponseEntity<?>
quickAgentChat
(String agentId, String content, Boolean stream) 快速代理聊天接口(GET 方式)org.springframework.http.ResponseEntity<?>
快速聊天接口(GET 方式)org.springframework.http.ResponseEntity<?>
sendAgentMessage
(String agentId, N8nChatController.N8nMessageRequest request) 发送简单代理消息org.springframework.http.ResponseEntity<?>
sendChatMessage
(String chatId, N8nChatController.N8nMessageRequest request) 发送简单聊天消息
-
Field Details
-
n8nChatService
-
-
Constructor Details
-
N8nChatController
public N8nChatController()
-
-
Method Details
-
createChatCompletion
@PostMapping("/chats/{chatId}/completions") public org.springframework.http.ResponseEntity<?> createChatCompletion(@PathVariable String chatId, @RequestBody N8nChatController.N8nChatRequest request) 创建聊天完成 - OpenAI 兼容接口 -
createAgentCompletion
@PostMapping("/agents/{agentId}/completions") public org.springframework.http.ResponseEntity<?> createAgentCompletion(@PathVariable String agentId, @RequestBody N8nChatController.N8nChatRequest request) 创建代理完成 - OpenAI 兼容接口 -
sendChatMessage
@PostMapping("/chats/{chatId}/message") public org.springframework.http.ResponseEntity<?> sendChatMessage(@PathVariable String chatId, @RequestBody N8nChatController.N8nMessageRequest request) 发送简单聊天消息 -
sendAgentMessage
@PostMapping("/agents/{agentId}/message") public org.springframework.http.ResponseEntity<?> sendAgentMessage(@PathVariable String agentId, @RequestBody N8nChatController.N8nMessageRequest request) 发送简单代理消息 -
quickChat
@GetMapping("/chats/{chatId}/quick") public org.springframework.http.ResponseEntity<?> quickChat(@PathVariable String chatId, @RequestParam String content, @RequestParam(required=false,defaultValue="false") Boolean stream) 快速聊天接口(GET 方式) -
quickAgentChat
@GetMapping("/agents/{agentId}/quick") public org.springframework.http.ResponseEntity<?> quickAgentChat(@PathVariable String agentId, @RequestParam String content, @RequestParam(required=false,defaultValue="false") Boolean stream) 快速代理聊天接口(GET 方式)
-