Files
Genarrative/server-rs/crates/platform-llm/README.md

29 lines
1.1 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.
# platform-llm 平台适配 package 占位说明
日期:`2026-04-20`
## 1. package 职责
`platform-llm` 是大模型平台适配 package后续负责
1. DashScope、Ark 与其他模型供应商适配
2. 统一模型调用、流式输出、重试、超时与日志策略
3.`module-ai``module-story``module-npc``module-custom-world` 等模块复用的模型基础设施能力
## 2. 当前阶段说明
当前提交仅完成目录占位,不提前进入具体模型 SDK、流式调用与供应商切换实现。
后续与本 package 直接相关的任务包括:
1. 落地统一模型请求与响应适配
2. 落地流式文本输出与阶段事件适配
3. 落地重试、超时、错误与日志策略
4. 设计多供应商切换与能力分层
## 3. 边界约束
1. `platform-llm` 只承接模型平台适配,不承接业务模块的状态真相与业务规则。
2. 生成型状态与结果引用最终由业务模块和 `apps/spacetime-module` 管理,前端接口由 `apps/api-server` 暴露。
3. 不允许把供应商 SDK、流式细节和重试策略重新散落到多个业务模块里各自实现。