Package com.bytedesk.ai.robot
Class AbstractRobotService
java.lang.Object
com.bytedesk.ai.robot.AbstractRobotService
- Direct Known Subclasses:
RobotAgentService,RobotService
Robot服务的抽象基类,提供通用的LLM请求处理方法
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate MessageProtobufcreateImageMessage(String imageUrl, String textQuery) 创建包含图片信息的MessageProtobufprotected abstract RobotRestService获取RobotRestService实例,由子类实现protected abstract SpringAIServiceRegistry获取SpringAIServiceRegistry实例,由子类实现protected StringprocessMultiModalSyncRequest(String robotName, String orgUid, String textQuery, String imageUrl, String errorMessage, boolean searchKnowledgeBase) 通用的多模态直接调用 LLM 方法,支持图片URL输入protected StringprocessSyncRequest(String robotName, String orgUid, String query) 通用的直接调用 LLM 方法 统一了企业模块和核心模块的 processLlmRequest 实现protected StringprocessSyncRequest(String robotName, String orgUid, String query, String errorMessage) 通用的直接调用 LLM 方法,支持自定义错误消息protected StringprocessSyncRequest(String robotName, String orgUid, String query, String errorMessage, boolean searchKnowledgeBase) 通用的直接调用 LLM 方法,支持自定义错误消息和控制是否查询知识库
-
Constructor Details
-
AbstractRobotService
public AbstractRobotService()
-
-
Method Details
-
getRobotRestService
获取RobotRestService实例,由子类实现 -
getSpringAIServiceRegistry
获取SpringAIServiceRegistry实例,由子类实现 -
processSyncRequest
通用的直接调用 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
创建包含图片信息的MessageProtobuf
-