Class ChatClientInfoService

java.lang.Object
com.bytedesk.ai.springai.service.ChatClientInfoService

@Service public class ChatClientInfoService extends Object
ChatClient信息查询服务 提供查看所有ChatClient和Primary ChatClient的服务
  • Field Details

    • applicationContext

      private final org.springframework.context.ApplicationContext applicationContext
    • primaryChatProvider

      @Value("${spring.ai.model.chat:none}") private String primaryChatProvider
    • zhipuaiChatClient

      @Autowired(required=false) @Qualifier("bytedeskZhipuaiChatClient") private org.springframework.ai.chat.client.ChatClient zhipuaiChatClient
    • ollamaChatClient

      @Autowired(required=false) @Qualifier("bytedeskOllamaChatClient") private org.springframework.ai.chat.client.ChatClient ollamaChatClient
    • dashscopeChatClient

      @Autowired(required=false) @Qualifier("bytedeskDashscopeChatClient") private org.springframework.ai.chat.client.ChatClient dashscopeChatClient
    • deepseekChatClient

      @Autowired(required=false) @Qualifier("deepseekChatClient") private org.springframework.ai.chat.client.ChatClient deepseekChatClient
    • baiduChatClient

      @Autowired(required=false) @Qualifier("baiduChatClient") private org.springframework.ai.chat.client.ChatClient baiduChatClient
    • tencentChatClient

      @Autowired(required=false) @Qualifier("tencentChatClient") private org.springframework.ai.chat.client.ChatClient tencentChatClient
    • volcengineChatClient

      @Autowired(required=false) @Qualifier("volcengineChatClient") private org.springframework.ai.chat.client.ChatClient volcengineChatClient
    • openaiChatClient

      @Autowired(required=false) @Qualifier("openaiChatClient") private org.springframework.ai.chat.client.ChatClient openaiChatClient
    • openrouterChatClient

      @Autowired(required=false) @Qualifier("openrouterChatClient") private org.springframework.ai.chat.client.ChatClient openrouterChatClient
    • siliconflowChatClient

      @Autowired(required=false) @Qualifier("siliconFlowChatClient") private org.springframework.ai.chat.client.ChatClient siliconflowChatClient
    • giteeChatClient

      @Autowired(required=false) @Qualifier("giteeChatClient") private org.springframework.ai.chat.client.ChatClient giteeChatClient
  • Constructor Details

    • ChatClientInfoService

      public ChatClientInfoService()
  • Method Details

    • testChatClient

      public Map<String,Object> testChatClient(String provider)
      测试指定的ChatClient
    • testAllChatClients

      public Map<String,Object> testAllChatClients()
      测试所有可用的ChatClient
    • getAllChatClientsInfo

      public Map<String,Object> getAllChatClientsInfo()
      获取所有ChatClient信息
    • getPrimaryChatClientInfo

      public Map<String,Object> getPrimaryChatClientInfo()
      获取Primary ChatClient信息
    • getRagChatClientInfo

      public Map<String,Object> getRagChatClientInfo()
      获取RAG使用的ChatClient信息
    • addChatClientInfoIfAvailable

      private void addChatClientInfoIfAvailable(List<Map<String,Object>> chatClients, String provider, org.springframework.ai.chat.client.ChatClient client, boolean isPrimary)
      添加ChatClient信息(如果可用)
    • getChatClientInfo

      private Map<String,Object> getChatClientInfo(String provider, org.springframework.ai.chat.client.ChatClient client, boolean isPrimary)
      获取单个ChatClient的详细信息
    • getProviderDescription

      private String getProviderDescription(String provider)
      获取提供商描述
    • getProviderClientType

      private String getProviderClientType(String provider)
      获取提供商客户端类型
    • getChatClientByProvider

      private org.springframework.ai.chat.client.ChatClient getChatClientByProvider(String provider)
      根据提供商获取ChatClient
    • getPrimaryChatClient

      private org.springframework.ai.chat.client.ChatClient getPrimaryChatClient()
      获取Primary ChatClient