refactor(llm): 将LLM请求逻辑解耦到专门的组件中

庞大的`LLMRequest`类已被重构为一个协调器,它将任务委托给多个专门的组件。此更改旨在遵循单一职责原则,从而提高代码的结构、可维护性和可扩展性。

核心逻辑被提取到以下新类中:
- `ModelSelector`: 封装了基于负载和可用性选择最佳模型的逻辑。
- `PromptProcessor`: 负责处理所有提示词修改和响应内容的解析。
- `RequestStrategy`: 管理请求的执行流程,包括故障转移和并发请求策略。

这种新的架构使系统更加模块化,更易于测试,并且未来可以更轻松地扩展新的请求策略。
This commit is contained in:
minecraft1024a
2025-09-26 19:21:55 +08:00
committed by Windpicker-owo
parent b99cb95416
commit 2c183d9288
7 changed files with 856 additions and 847 deletions

File diff suppressed because it is too large Load Diff