From b5c1530d976d6d062c3057748be5a5d447417288 Mon Sep 17 00:00:00 2001 From: icarus Date: Fri, 29 Aug 2025 17:53:05 +0800 Subject: [PATCH] =?UTF-8?q?docs(OrchestrateService):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E=E6=9A=82=E6=97=B6=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E7=B1=BB=E5=92=8C=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E7=94=A8=E9=80=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/services/OrchestrateService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderer/src/services/OrchestrateService.ts b/src/renderer/src/services/OrchestrateService.ts index e21bfc2369..c4c6522011 100644 --- a/src/renderer/src/services/OrchestrateService.ts +++ b/src/renderer/src/services/OrchestrateService.ts @@ -22,6 +22,7 @@ export interface OrchestrationRequest { * The OrchestrationService is responsible for orchestrating the different services * to handle a user's message. It contains the core logic of the application. */ +// NOTE:暂时没有用到这个类 export class OrchestrationService { constructor() { // In the future, this could be a singleton, but for now, a new instance is fine. @@ -55,6 +56,11 @@ export class OrchestrationService { } } +/** + * 将用户消息转换为LLM可以理解的格式并发送请求 + * @param request - 包含消息内容和助手信息的请求对象 + * @param onChunkReceived - 接收流式响应数据的回调函数 + */ // 目前先按照函数来写,后续如果有需要到class的地方就改回来 export async function transformMessagesAndFetch( request: OrchestrationRequest,