Files
Genarrative/server-rs/crates/module-ai/README.md

30 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# module-ai 独立模块 package 占位说明
日期:`2026-04-20`
## 1. package 职责
`module-ai` 是 AI 编排模块 package后续负责
1. 剧情、聊天、自定义世界、运行时物品等生成型流程的模块级编排
2. prompt 组织、阶段状态、结果引用与模块间协同
3.`apps/api-server` 的流式输出与兼容接口对接
4.`apps/spacetime-module` 的任务状态、结果引用聚合对接
## 2. 当前阶段说明
当前提交仅完成目录占位,不提前进入模型调用、流式编排与结果回写实现。
后续与本 package 直接相关的任务包括:
1. 设计多模型编排与任务状态抽象
2. 对齐剧情、聊天、自定义世界等生成链路
3. 对齐流式输出、阶段事件与兼容响应结构
4. 接入模块级结果回写与任务引用绑定
## 3. 边界约束
1. `module-ai` 负责生成型流程的模块级编排,不把供应商 SDK 直接散落到各业务模块里。
2. 实际模型接入通过 `packages/platform-llm` 完成,状态与结果引用最终回写到 `apps/spacetime-module` 聚合的状态模型中。
3. 前端兼容 REST 与 SSE 由 `apps/api-server` 暴露,但 AI 编排过程不能再次退回单个大 orchestrator 的黑盒写法。