Class ChatModelInfoController
java.lang.Object
com.bytedesk.ai.springai.controller.ChatModelInfoController
@RestController
@RequestMapping("/spring/ai/api/v1/chat-models")
@ConditionalOnBean(org.springframework.ai.chat.model.ChatModel.class)
public class ChatModelInfoController
extends Object
ChatModel信息查询控制器
提供查看所有ChatModel和Primary ChatModel的接口
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BytedeskProperties
private final ChatModelInfoService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<JsonResult<?>>
获取所有ChatModel信息 GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/infoorg.springframework.http.ResponseEntity<JsonResult<?>>
获取Primary ChatModel信息 GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/primaryorg.springframework.http.ResponseEntity<JsonResult<?>>
获取RAG使用的ChatModel信息 GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/ragorg.springframework.http.ResponseEntity<JsonResult<?>>
测试所有可用的ChatModel GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/test-allorg.springframework.http.ResponseEntity<JsonResult<?>>
testChatModel
(String provider) 测试指定的ChatModel GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/test/{provider}
-
Field Details
-
chatModelInfoService
-
bytedeskProperties
-
-
Constructor Details
-
ChatModelInfoController
public ChatModelInfoController()
-
-
Method Details
-
getAllChatModelsInfo
@GetMapping("/info") public org.springframework.http.ResponseEntity<JsonResult<?>> getAllChatModelsInfo()获取所有ChatModel信息 GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/info -
getPrimaryChatModelInfo
@GetMapping("/primary") public org.springframework.http.ResponseEntity<JsonResult<?>> getPrimaryChatModelInfo()获取Primary ChatModel信息 GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/primary -
getRagChatModelInfo
@GetMapping("/rag") public org.springframework.http.ResponseEntity<JsonResult<?>> getRagChatModelInfo()获取RAG使用的ChatModel信息 GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/rag -
testChatModel
@GetMapping("/test/{provider}") public org.springframework.http.ResponseEntity<JsonResult<?>> testChatModel(@PathVariable String provider) 测试指定的ChatModel GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/test/{provider} -
testAllChatModels
@GetMapping("/test-all") public org.springframework.http.ResponseEntity<JsonResult<?>> testAllChatModels()测试所有可用的ChatModel GET http://127.0.0.1:9003/spring/ai/api/v1/chat-models/test-all
-