Dev#1611
Merged
Merged
Conversation
- Introduced LLM Provider declarations in plugin manifests, allowing plugins to specify their LLM capabilities. - Implemented validation for LLM Provider declarations to prevent duplicates and conflicts. - Enhanced the PluginRunner to handle LLM Provider invocation requests, enabling plugins to interact with LLM Providers seamlessly. - Added a ClientRegistry to manage LLM Provider registrations and ensure no conflicts arise between different plugins. - Created a PluginLLMClient to facilitate communication with LLM Providers through the plugin runtime. - Developed tests to ensure proper registration and conflict handling of LLM Providers.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (100)
总体概览此PR删除了整个agentlite包及其相关的文档、示例和测试,同时在LLM模型客户端、插件系统和Maisaka对话引擎等方面进行了显著增强,包括新的LLM Provider注册、缓存统计功能和配置升级机制。 变更内容
序列图sequenceDiagram
participant Plugin as 插件
participant Supervisor as 主机监管器
participant Registry as 客户端注册表
participant LLMClient as LLM客户端实例
participant Provider as LLM提供商
Plugin->>Supervisor: 注册插件(llm_providers)
Supervisor->>Registry: 验证提供商替换
Supervisor->>Registry: 注册提供商(factory)
Supervisor->>LLMClient: 创建PluginLLMClient实例
LLMClient->>Supervisor: invoke_llm_provider(client_type)
Supervisor->>Plugin: RPC调用提供商方法
Plugin->>Provider: 执行LLM操作
Provider-->>Plugin: 返回响应
Plugin-->>Supervisor: 返回结果
Supervisor-->>LLMClient: 返回APIResponse
sequenceDiagram
participant Runtime as Maisaka运行时
participant HistoryProcessor as 历史处理器
participant LLMService as LLM服务
participant CacheStats as 缓存统计
Runtime->>HistoryProcessor: 处理聊天历史
HistoryProcessor->>HistoryProcessor: 计算修剪目标
HistoryProcessor->>HistoryProcessor: 迭代删除最早消息
HistoryProcessor->>Runtime: 返回修剪结果
Runtime->>LLMService: 生成响应
LLMService->>LLMService: 序列化消息为缓存统计文本
LLMService->>CacheStats: 记录缓存使用情况
CacheStats->>CacheStats: 更新聚合统计
LLMService-->>Runtime: 返回响应
代码审查工作量估计🎯 5 (严重) | ⏱️ ~120+ 分钟 可能相关的PR
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zh-CN目标翻译作为常规 GitHub 编辑面;常规翻译以 Crowdin ->l10n_*PR 回流为准,详见docs/i18n.md请填写以下内容
(删除掉中括号内的空格,并替换为小写的x)
main分支 禁止修改,请确认本次提交的分支 不是main分支src/A_memorix,我确认已阅读src/A_memorix/MODIFICATION_POLICY.md,不涉及则无需勾选其他信息
Summary by CodeRabbit
发布说明
功能移除
新增功能
改进与优化
配置更新