Class AbstractRobotService

java.lang.Object
com.bytedesk.ai.robot.AbstractRobotService
Direct Known Subclasses:
RobotAgentService, RobotService

public abstract class AbstractRobotService extends Object
Robot服务的抽象基类,提供通用的LLM请求处理方法
  • Constructor Details

    • AbstractRobotService

      public AbstractRobotService()
  • Method Details

    • getRobotRestService

      protected abstract RobotRestService getRobotRestService()
      获取RobotRestService实例,由子类实现
    • getSpringAIServiceRegistry

      protected abstract SpringAIServiceRegistry getSpringAIServiceRegistry()
      获取SpringAIServiceRegistry实例,由子类实现
    • processSyncRequest

      protected String processSyncRequest(String robotName, String orgUid, String query)
      通用的直接调用 LLM 方法 统一了企业模块和核心模块的 processLlmRequest 实现
    • processSyncRequest

      protected String processSyncRequest(String robotName, String orgUid, String query, String errorMessage)
      通用的直接调用 LLM 方法,支持自定义错误消息
    • processSyncRequest

      protected String processSyncRequest(String robotName, String orgUid, String query, String errorMessage, boolean searchKnowledgeBase)
      通用的直接调用 LLM 方法,支持自定义错误消息和控制是否查询知识库
    • processMultiModalSyncRequest

      protected String processMultiModalSyncRequest(String robotName, String orgUid, String textQuery, String imageUrl, String errorMessage, boolean searchKnowledgeBase)
      通用的多模态直接调用 LLM 方法,支持图片URL输入
    • createImageMessage

      private MessageProtobuf createImageMessage(String imageUrl, String textQuery)
      创建包含图片信息的MessageProtobuf