Class MaxkbChatController
java.lang.Object
com.bytedesk.ai.springai.providers.maxkb.MaxkbChatController
@RestController
@RequestMapping("/api/v1/maxkb")
@ConditionalOnProperty(name="bytedesk.maxkb.enabled",
havingValue="true",
matchIfMissing=false)
@Description("MaxKB Chat Controller - MaxKB knowledge base chat API with OpenAI compatibility")
public class MaxkbChatController
extends Object
MaxKB Chat Controller - MaxKB 对话 API 控制器
https://maxkb.cn/docs/v1/dev_manual/APIKey_chat/#1-openai-api
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>
createChatCompletion
(String applicationId, MaxkbChatRequest request) 聊天完成接口 - OpenAI 兼容 APIorg.springframework.http.ResponseEntity<?>
健康检查接口org.springframework.http.ResponseEntity<?>
快速测试接口org.springframework.http.ResponseEntity<?>
sendMessage
(String applicationId, MaxkbMessageRequest request) 发送简单消息接口org.springframework.http.ResponseEntity<?>
sendMessageWithSystemRole
(String applicationId, MaxkbSystemRoleRequest request) 发送带系统角色的消息接口
-
Field Details
-
maxkbChatService
-
-
Constructor Details
-
MaxkbChatController
public MaxkbChatController()
-
-
Method Details
-
createChatCompletion
@PostMapping("/applications/{applicationId}/chat/completions") public org.springframework.http.ResponseEntity<?> createChatCompletion(@PathVariable String applicationId, @RequestBody MaxkbChatRequest request) 聊天完成接口 - OpenAI 兼容 API -
sendMessage
@PostMapping("/applications/{applicationId}/message") public org.springframework.http.ResponseEntity<?> sendMessage(@PathVariable String applicationId, @RequestBody MaxkbMessageRequest request) 发送简单消息接口 -
sendMessageWithSystemRole
@PostMapping("/applications/{applicationId}/message/with-role") public org.springframework.http.ResponseEntity<?> sendMessageWithSystemRole(@PathVariable String applicationId, @RequestBody MaxkbSystemRoleRequest request) 发送带系统角色的消息接口 -
quickTest
@GetMapping("/applications/{applicationId}/quick") public org.springframework.http.ResponseEntity<?> quickTest(@PathVariable String applicationId, @RequestParam String content, @RequestParam(defaultValue="false") Boolean stream) 快速测试接口 -
healthCheck
@GetMapping("/health") public org.springframework.http.ResponseEntity<?> healthCheck()健康检查接口
-